diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 1696259bf..4c3a608de 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -803,6 +803,9 @@ class StudentWorkController < ApplicationController @new_score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != "" @new_score.user_id = User.current.id @new_score.student_work_id = @work.id + if @is_teacher && @work.work_status == 0 + @work.update_column('work_status', 1) + end if User.current.admin? @new_score.reviewer_role = 1 else @@ -813,7 +816,6 @@ class StudentWorkController < ApplicationController if @is_teacher @is_new = true @is_last_a = false - @work.update_column('work_status', 1) else @is_new = false end @@ -1229,7 +1231,7 @@ class StudentWorkController < ApplicationController sheet1[count_row,3] = homework.user.user_extensions.student_id sheet1[count_row,4] = homework.user.mail sheet1[count_row,5] = homework.name - sheet1[count_row,6] = strip_html homework.description + sheet1[count_row,6] = strip_html homework.description if !homework.description.nil? sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2) sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2) if @homework.anonymous_comment ==0 diff --git a/app/views/layouts/_project_info.html.erb b/app/views/layouts/_project_info.html.erb index de37841a0..abfebd828 100644 --- a/app/views/layouts/_project_info.html.erb +++ b/app/views/layouts/_project_info.html.erb @@ -27,7 +27,7 @@ 邀请码: <%=@course.generate_invite_code %> <% unless is_teacher %> -