From 756efe616f50f06dfd25aee06b7682651f3fb08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 16 Mar 2020 15:31:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 20 +++++++++++++++---- .../shixunHomework/Listofworksstudentone.js | 14 +++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index c3d4bf465..ec59c46e3 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -295,7 +295,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title: '最终成绩', + title:最终成绩 + 鼠标停留具体分值上可查
+ 看得分明细
+ }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -587,7 +590,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title: '最终成绩', + title:最终成绩 + 鼠标停留具体分值上可查
+ 看得分明细
+ }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -871,7 +877,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title: '最终成绩', + title: 最终成绩 + 鼠标停留具体分值上可查
+ 看得分明细
+ }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', @@ -1095,7 +1104,10 @@ class Studentshavecompletedthelist extends Component { ) }, { - title: '最终成绩', + title: 最终成绩 + 鼠标停留具体分值上可查
+ 看得分明细
+ }>
, dataIndex: 'efficiencyscore', key: 'efficiencyscore', align: 'center', diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 833cdf307..3bd67f6c6 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -461,7 +461,7 @@ class Listofworksstudentone extends Component { ) }, { - title: '当前成绩', + title:'当前成绩', dataIndex: 'work_score', key: 'work_score', align: "center", @@ -856,7 +856,7 @@ class Listofworksstudentone extends Component { ) }, { - title: '当前成绩', + title:'当前成绩', dataIndex: 'work_score', key: 'work_score', align: "center", @@ -1204,7 +1204,10 @@ class Listofworksstudentone extends Component { ) }, { - title: '当前成绩', + title: 当前成绩 + 鼠标停留具体分值上可查
+ 看得分明细
+ }>
, dataIndex: 'work_score', key: 'work_score', align: 'center', @@ -1569,7 +1572,10 @@ class Listofworksstudentone extends Component { ) }, { - title: '当前成绩', + title: 当前成绩 + 鼠标停留具体分值上可查
+ 看得分明细
+ }>
, dataIndex: 'work_score', key: 'work_score', align: 'center', From c700c11aa00338bfe6349455f169470b311a8486 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 16 Mar 2020 15:34:03 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index faea30242..f88217f7b 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -937,8 +937,14 @@ class HomeworkCommonsController < ApplicationController publish_groups = charge_group_ids & group_ids if group_ids # ActiveRecord::Base.transaction do + messages = [] homeworks.each do |homework| # 作业未发布时 + max_end_time = params[:detail] ? group_end_times.max : params[:end_time] + if homework.allow_late && max_end_time.to_time >= homework.late_time + messages << "#{homework.name}" + next + end if homework.homework_detail_manual.try(:comment_status) == 0 if !params[:group_ids].blank? @@ -1018,7 +1024,14 @@ class HomeworkCommonsController < ApplicationController # 更新学生状态及成绩(手动点击计算) # HomeworkPublishUpdateWorkStatusJob.perform_later(tiding_group_ids, homework.id) end - normal_status(0, "发布成功") + unless messages.blank? + return_message = messages.join("、") + return_message += messages.size == 1 ? "" : "等" + return_message += "作业发布失败,原因:截止时间必须早于补交结束时间" + else + return_message = "发布成功" + end + normal_status(0, return_message) # end end From 5512b845fa9dc63202a20d2fcf3c2e56ab0b55e2 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 16 Mar 2020 15:42:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B5=84=E6=BA=90=E7=9A=84=E4=BA=8C?= =?UTF-8?q?=E7=BA=A7=E7=9B=AE=E5=BD=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/attahcment_category_list.json.jbuilder | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/courses/attahcment_category_list.json.jbuilder b/app/views/courses/attahcment_category_list.json.jbuilder index b9acdfe68..fe33bf13c 100644 --- a/app/views/courses/attahcment_category_list.json.jbuilder +++ b/app/views/courses/attahcment_category_list.json.jbuilder @@ -4,9 +4,11 @@ json.course_modules do json.id course_module.id json.module_name course_module.module_name json.course_second_categories course_module.first_categories do |category| - json.(category, :id, :name) - json.course_third_categories category.children do |child| - json.(child, :id, :name) + json.title category.name + json.value category.id + json.children category.children do |child| + json.title child.name + json.value child.id end end end