From 71b7d37627ef5299c989e020b63f43823874f96b Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 17 Mar 2020 17:07:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh-CN.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 4c5c808ac..eac113ee0 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -64,6 +64,7 @@ zh-CN: description: '章节描述' attachment: description: '资源描述' + link: '链接' message: subject: '标题' message_detail: From 20e86d67297acc20f59f0dc616297777007b710a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 17 Mar 2020 18:43:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E5=AD=A6=E9=99=A2?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E7=9A=84=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_works_controller.rb | 2 ++ app/views/student_works/shixun_work_report.json.jbuilder | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/controllers/student_works_controller.rb b/app/controllers/student_works_controller.rb index 6c9de071d..8770a6519 100644 --- a/app/controllers/student_works_controller.rb +++ b/app/controllers/student_works_controller.rb @@ -477,6 +477,8 @@ class StudentWorksController < ApplicationController @user_evaluate_count = 0 end + @view_tpi = ((@user_course_identity < Course::STUDENT && current_user.is_certification_teacher) || current_user.admin_or_business?) && @work.myshixun.present? + # 图形效率图的数据 @echart_data = student_efficiency(@homework, @work) if @work.myshixun end diff --git a/app/views/student_works/shixun_work_report.json.jbuilder b/app/views/student_works/shixun_work_report.json.jbuilder index bd618c2d4..adf0a2ea5 100644 --- a/app/views/student_works/shixun_work_report.json.jbuilder +++ b/app/views/student_works/shixun_work_report.json.jbuilder @@ -87,4 +87,6 @@ if @shixun end end +json.view_tpi @view_tpi +