diff --git a/app/decorators/tiding_decorator.rb b/app/decorators/tiding_decorator.rb index 130e7f4b8..ff198468a 100644 --- a/app/decorators/tiding_decorator.rb +++ b/app/decorators/tiding_decorator.rb @@ -250,6 +250,9 @@ module TidingDecorator when 'shixunPublish' then name = Shixun.find_by(id: parent_container_id)&.name || '---' I18n.t(locale_format(parent_container_type)) % [name, container.score] + when 'Hack' then + name = Hack.find_by(id: container_id)&.name || '---' + I18n.t(locale_format(parent_container_type)) % [name, container.score] else I18n.t(locale_format(parent_container_type)) % container.score end diff --git a/app/views/shixuns/get_data_sets.json.jbuilder b/app/views/shixuns/get_data_sets.json.jbuilder index 82ef309f7..f800d1c32 100644 --- a/app/views/shixuns/get_data_sets.json.jbuilder +++ b/app/views/shixuns/get_data_sets.json.jbuilder @@ -10,4 +10,5 @@ json.data_sets do json.file_path "#{@absolute_folder}/#{set.relative_path_filename}".gsub("/#{@shixun.identifier}", "") end end -json.data_sets_count @data_count \ No newline at end of file +json.data_sets_count @data_count +json.folder_name @absolute_folder \ No newline at end of file diff --git a/config/locales/tidings/zh-CN.yml b/config/locales/tidings/zh-CN.yml index f484efdc1..dc56ad345 100644 --- a/config/locales/tidings/zh-CN.yml +++ b/config/locales/tidings/zh-CN.yml @@ -118,6 +118,7 @@ Answer: true_end: "查看实训%s第%s关的参考答案消耗金币:%s金币" false_end: "查看实训的参考答案消耗金币:%s金币" + Hack_end: "完成题目解答:%s,获得金币奖励:%s金币" Game_end: "通过实训%s的第%s关获得金币奖励:%s金币" Memo_end: "发布的评论或者帖子获得平台奖励:%s金币" Discusses_end: "发布的评论获得金币奖励:%s金币"