|
|
@ -2017,10 +2017,10 @@ class StudentWorkController < ApplicationController
|
|
|
|
if @homework.homework_type == 1 #普通作业
|
|
|
|
if @homework.homework_type == 1 #普通作业
|
|
|
|
if @homework.anonymous_comment ==0
|
|
|
|
if @homework.anonymous_comment ==0
|
|
|
|
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time)])
|
|
|
|
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time), "评语"])
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time)])
|
|
|
|
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time), "评语"])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
count_row = 1
|
|
|
|
count_row = 1
|
|
|
|
items.each do |homework|
|
|
|
|
items.each do |homework|
|
|
|
@ -2039,10 +2039,12 @@ class StudentWorkController < ApplicationController
|
|
|
|
sheet1[count_row,11] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,11] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,12] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,12] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,13] = format_time(homework.update_time)
|
|
|
|
sheet1[count_row,13] = format_time(homework.update_time)
|
|
|
|
|
|
|
|
sheet1[count_row,14] = work_comment(homework)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sheet1[count_row,9] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,9] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,10] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,10] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,11] = format_time(homework.update_time)
|
|
|
|
sheet1[count_row,11] = format_time(homework.update_time)
|
|
|
|
|
|
|
|
sheet1[count_row,12] = work_comment(homework)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -2082,10 +2084,10 @@ class StudentWorkController < ApplicationController
|
|
|
|
elsif @homework.homework_type == 3 #分组作业
|
|
|
|
elsif @homework.homework_type == 3 #分组作业
|
|
|
|
if @homework.anonymous_comment ==0
|
|
|
|
if @homework.anonymous_comment ==0
|
|
|
|
sheet1.row(0).concat([l(:excel_group),l(:excel_group_member),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
sheet1.row(0).concat([l(:excel_group),l(:excel_group_member),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time)])
|
|
|
|
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time), "评语"])
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sheet1.row(0).concat([l(:excel_group),l(:excel_group_member),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
sheet1.row(0).concat([l(:excel_group),l(:excel_group_member),l(:excel_course_group),l(:excel_homework_des),
|
|
|
|
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time)])
|
|
|
|
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time), "评语"])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
count_row = 1
|
|
|
|
count_row = 1
|
|
|
|
items.each do |homework|
|
|
|
|
items.each do |homework|
|
|
|
@ -2101,16 +2103,18 @@ class StudentWorkController < ApplicationController
|
|
|
|
sheet1[count_row,8] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,8] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,9] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,9] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,10] = format_time(homework.update_time)
|
|
|
|
sheet1[count_row,10] = format_time(homework.update_time)
|
|
|
|
|
|
|
|
sheet1[count_row,11] = work_comment(homework)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sheet1[count_row,6] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,6] = (@homework.teacher_priority == 1 && !homework.teacher_score.nil?) ? 0 : homework.late_penalty
|
|
|
|
sheet1[count_row,7] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,7] = homework.respond_to?("work_score") ? homework.work_score.nil? ? l(:label_without_score) : homework.work_score.round(1) : l(:label_without_score)
|
|
|
|
sheet1[count_row,8] = format_time(homework.update_time)
|
|
|
|
sheet1[count_row,8] = format_time(homework.update_time)
|
|
|
|
|
|
|
|
sheet1[count_row,9] = work_comment(homework)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
elsif @homework.homework_type == 4 #实训作业
|
|
|
|
elsif @homework.homework_type == 4 #实训作业
|
|
|
|
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_course_group),l(:excel_homework_complete_time),
|
|
|
|
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_course_group),l(:excel_homework_complete_time),
|
|
|
|
l(:excel_homework_complete_status), l(:excel_homework_evaluate_times), l(:excel_homework_spend_time),l(:excel_homework_total_exp),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time)])
|
|
|
|
l(:excel_homework_complete_status), l(:excel_homework_evaluate_times), l(:excel_homework_spend_time),l(:excel_homework_total_exp),l(:excel_l_penalty),l(:excel_f_score),l(:excel_update_time), "评语"])
|
|
|
|
count_row = 1
|
|
|
|
count_row = 1
|
|
|
|
shixun = @homework.homework_commons_shixuns.shixun
|
|
|
|
shixun = @homework.homework_commons_shixuns.shixun
|
|
|
|
items.each do |homework|
|
|
|
|
items.each do |homework|
|
|
|
@ -2129,6 +2133,7 @@ class StudentWorkController < ApplicationController
|
|
|
|
sheet1[count_row,11] = homework.late_penalty
|
|
|
|
sheet1[count_row,11] = homework.late_penalty
|
|
|
|
sheet1[count_row,12] = homework.respond_to?("work_score") ? homework.work_score.nil? ? "--" : homework.work_score.round(1) : "--"
|
|
|
|
sheet1[count_row,12] = homework.respond_to?("work_score") ? homework.work_score.nil? ? "--" : homework.work_score.round(1) : "--"
|
|
|
|
sheet1[count_row,13] = homework.update_time ? format_time(homework.update_time) : "--"
|
|
|
|
sheet1[count_row,13] = homework.update_time ? format_time(homework.update_time) : "--"
|
|
|
|
|
|
|
|
sheet1[count_row,14] = work_comment(homework)
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|