diff --git a/app/controllers/tidings_controller.rb b/app/controllers/tidings_controller.rb index 5acffcb16..0a28b85e4 100644 --- a/app/controllers/tidings_controller.rb +++ b/app/controllers/tidings_controller.rb @@ -19,6 +19,7 @@ class TidingsController < ApplicationController end tidings = tidings.where(tiding_type: tiding_types) if tiding_types.present? + # coures_message_id = current_user.manage_courses.not_deleted.course_messages.join_course_requests.unhandled tidings = tidings.where(container_type: 'JoinCourse') if params[:type] == 'course_apply' @course_apply_count = tidings.where("created_at > '#{@onclick_time}'").where(container_type: 'JoinCourse').count diff --git a/app/models/student_work.rb b/app/models/student_work.rb index f8f3bee99..384a75da1 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -111,6 +111,7 @@ class StudentWork < ApplicationRecord # 作品总体评价 def overall_appraisal + return nil if work_status == 0 case (self.work_score.to_f / homework_common.total_score).round(2) when (0.90..1.00) '优秀' diff --git a/app/views/student_works/shixun_work_report.json.jbuilder b/app/views/student_works/shixun_work_report.json.jbuilder index 068151856..bd618c2d4 100644 --- a/app/views/student_works/shixun_work_report.json.jbuilder +++ b/app/views/student_works/shixun_work_report.json.jbuilder @@ -4,6 +4,7 @@ json.course_name @course.name json.work_id @work.id json.work_efficiency @homework.work_efficiency json.has_commit @work.myshixun.present? +json.work_status @work.work_status if @shixun json.shixun_name @shixun.name # 总体评价