|
|
@ -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.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.user_id = User.current.id
|
|
|
|
@new_score.student_work_id = @work.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?
|
|
|
|
if User.current.admin?
|
|
|
|
@new_score.reviewer_role = 1
|
|
|
|
@new_score.reviewer_role = 1
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -813,7 +816,6 @@ class StudentWorkController < ApplicationController
|
|
|
|
if @is_teacher
|
|
|
|
if @is_teacher
|
|
|
|
@is_new = true
|
|
|
|
@is_new = true
|
|
|
|
@is_last_a = false
|
|
|
|
@is_last_a = false
|
|
|
|
@work.update_column('work_status', 1)
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@is_new = false
|
|
|
|
@is_new = false
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -1229,7 +1231,7 @@ class StudentWorkController < ApplicationController
|
|
|
|
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
|
|
|
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
|
|
|
sheet1[count_row,4] = homework.user.mail
|
|
|
|
sheet1[count_row,4] = homework.user.mail
|
|
|
|
sheet1[count_row,5] = homework.name
|
|
|
|
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,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)
|
|
|
|
sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
|
|
|
if @homework.anonymous_comment ==0
|
|
|
|
if @homework.anonymous_comment ==0
|
|
|
|