|
|
@ -1190,9 +1190,16 @@ class CoursesController < ApplicationController
|
|
|
|
@all_members = searchmember_by_name(student_homework_score(0, 0, 10,"desc"), q)
|
|
|
|
@all_members = searchmember_by_name(student_homework_score(0, 0, 10,"desc"), q)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
@homeworks = @course.homework_commons.where("publish_time <= '#{Time.now}'").order("publish_time asc")
|
|
|
|
@homeworks = @course.homework_commons.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
@exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc")
|
|
|
|
@exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
@tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("publish_time asc")
|
|
|
|
@tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@homeworks.where(:homework_type => 4).each do |homework|
|
|
|
|
|
|
|
|
items = homework.student_works.where("work_status != 0")
|
|
|
|
|
|
|
|
if items.count == 0 && homework.publish_time < Time.now && !@course.is_end
|
|
|
|
|
|
|
|
update_shixun_work_status homework
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.xls {
|
|
|
|
format.xls {
|
|
|
@ -2390,8 +2397,8 @@ class CoursesController < ApplicationController
|
|
|
|
sheet1[4,3] = "学号"
|
|
|
|
sheet1[4,3] = "学号"
|
|
|
|
sheet1[4,4] = "分班"
|
|
|
|
sheet1[4,4] = "分班"
|
|
|
|
current_col = 4
|
|
|
|
current_col = 4
|
|
|
|
for i in 0 ... homeworks.where(:homework_type => 4).count
|
|
|
|
homeworks.where(:homework_type => 4).each do |homework|
|
|
|
|
sheet1[4,current_col+=1] = "实训作业第"+(i+1).to_s+"次"
|
|
|
|
sheet1[4,current_col+=1] = "#{homework.name}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
for i in 0 ... homeworks.where(:homework_type => 1).count
|
|
|
|
for i in 0 ... homeworks.where(:homework_type => 1).count
|
|
|
|
sheet1[4,current_col+=1] = "普通作业第"+(i+1).to_s+"次"
|
|
|
|
sheet1[4,current_col+=1] = "普通作业第"+(i+1).to_s+"次"
|
|
|
@ -2425,63 +2432,63 @@ class CoursesController < ApplicationController
|
|
|
|
sheet1[count_row,column+=1] = member.course_group_id == 0 ? "暂无" : member.course_group.name
|
|
|
|
sheet1[count_row,column+=1] = member.course_group_id == 0 ? "暂无" : member.course_group.name
|
|
|
|
# current_col = 5
|
|
|
|
# current_col = 5
|
|
|
|
shixun_score = 0
|
|
|
|
shixun_score = 0
|
|
|
|
homeworks.where(:homework_type => 4).each do |homework|
|
|
|
|
homeworks.where(:homework_type => 4).includes(:student_works).each do |homework|
|
|
|
|
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
|
|
|
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
|
|
|
if student_works.empty?
|
|
|
|
if student_works.empty?
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
|
|
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
shixun_score += work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
shixun_score += work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# current_col += 1
|
|
|
|
# current_col += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
common_score = 0
|
|
|
|
common_score = 0
|
|
|
|
homeworks.where(:homework_type => 1).each do |homework|
|
|
|
|
homeworks.where(:homework_type => 1).includes(:student_works).each do |homework|
|
|
|
|
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
|
|
|
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
|
|
|
if student_works.empty?
|
|
|
|
if student_works.empty?
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
|
|
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
common_score += work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
common_score += work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# current_col += 1
|
|
|
|
# current_col += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
group_score = 0
|
|
|
|
group_score = 0
|
|
|
|
homeworks.where(:homework_type => 3).each do |homework|
|
|
|
|
homeworks.where(:homework_type => 3).includes(:student_works).each do |homework|
|
|
|
|
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
|
|
|
student_works = homework.student_works.where("user_id = #{member.user.id}")
|
|
|
|
if student_works.empty?
|
|
|
|
if student_works.empty?
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
|
|
|
work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
group_score += work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
group_score += work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# current_col += 1
|
|
|
|
# current_col += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
exercise_score = 0
|
|
|
|
exercise_score = 0
|
|
|
|
exercises.each do |exercise|
|
|
|
|
exercises.includes(:exercise_users).each do |exercise|
|
|
|
|
exercise_user = exercise.exercise_users.where("user_id = #{member.user.id}")
|
|
|
|
exercise_user = exercise.exercise_users.where("user_id = #{member.user.id}")
|
|
|
|
if exercise_user.empty?
|
|
|
|
if exercise_user.empty?
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
work_score = exercise_user.first.score.nil? ? 0 : exercise_user.first.score
|
|
|
|
work_score = exercise_user.first.score.nil? ? 0 : exercise_user.first.score
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
exercise_score += work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
exercise_score += work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# current_col += 1
|
|
|
|
# current_col += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
graduation_score = 0
|
|
|
|
graduation_score = 0
|
|
|
|
tasks.each do |task|
|
|
|
|
tasks.includes(:graduation_works).each do |task|
|
|
|
|
graduation_works = task.graduation_works.where("user_id = #{member.user.id}")
|
|
|
|
graduation_works = task.graduation_works.where("user_id = #{member.user.id}")
|
|
|
|
if graduation_works.empty?
|
|
|
|
if graduation_works.empty?
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
sheet1[count_row,column+=1] = 0
|
|
|
|
else
|
|
|
|
else
|
|
|
|
work_score = graduation_works.first.work_score.nil? ? 0 : graduation_works.first.work_score
|
|
|
|
work_score = graduation_works.first.work_score.nil? ? 0 : graduation_works.first.work_score
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
graduation_score += work_score < 0 ? 0 : work_score.round(2)
|
|
|
|
graduation_score += work_score < 0 ? 0 : work_score.round(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# current_col += 1
|
|
|
|
# current_col += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -2494,7 +2501,7 @@ class CoursesController < ApplicationController
|
|
|
|
if tasks.count > 0
|
|
|
|
if tasks.count > 0
|
|
|
|
sheet1[count_row,column+=1] = graduation_score
|
|
|
|
sheet1[count_row,column+=1] = graduation_score
|
|
|
|
end
|
|
|
|
end
|
|
|
|
sheet1[count_row,column+=1] = sum.round(2)
|
|
|
|
sheet1[count_row,column+=1] = sum.round(1)
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -2550,8 +2557,8 @@ class CoursesController < ApplicationController
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
homeworks.where(:homework_type => 4).each_with_index do |home, i|
|
|
|
|
homeworks.where(:homework_type => 4).includes(:student_works).each_with_index do |home, i|
|
|
|
|
sheet = book.create_worksheet :name => "实训作业第#{i+1}次"
|
|
|
|
sheet = book.create_worksheet :name => "#{home.name}"
|
|
|
|
sheet[0,0] = "课程编号"
|
|
|
|
sheet[0,0] = "课程编号"
|
|
|
|
sheet[0,1] = course.id
|
|
|
|
sheet[0,1] = course.id
|
|
|
|
sheet[1,0] = "课程名称"
|
|
|
|
sheet[1,0] = "课程名称"
|
|
|
@ -2567,6 +2574,10 @@ class CoursesController < ApplicationController
|
|
|
|
sheet.row(4).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_des),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
|
|
|
sheet.row(4).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_des),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
|
|
|
count_row = 5
|
|
|
|
count_row = 5
|
|
|
|
items = home.student_works.where("work_status != 0").order("work_score desc")
|
|
|
|
items = home.student_works.where("work_status != 0").order("work_score desc")
|
|
|
|
|
|
|
|
if items.count == 0 && home.publish_time < Time.now && !course.is_end
|
|
|
|
|
|
|
|
update_shixun_work_status home
|
|
|
|
|
|
|
|
items = StudentWork.where("work_status != 0 and homework_common_id = #{home.id}").order("work_score desc")
|
|
|
|
|
|
|
|
end
|
|
|
|
items.each_with_index do |stu, j|
|
|
|
|
items.each_with_index do |stu, j|
|
|
|
|
sheet[count_row,0]= j + 1
|
|
|
|
sheet[count_row,0]= j + 1
|
|
|
|
sheet[count_row,1] = stu.user.show_real_name
|
|
|
|
sheet[count_row,1] = stu.user.show_real_name
|
|
|
@ -2574,13 +2585,13 @@ class CoursesController < ApplicationController
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,4] = strip_html stu.description
|
|
|
|
sheet[count_row,4] = strip_html stu.description
|
|
|
|
sheet[count_row,5] = stu.late_penalty
|
|
|
|
sheet[count_row,5] = stu.late_penalty
|
|
|
|
sheet[count_row,6] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
|
|
|
sheet[count_row,6] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1)
|
|
|
|
sheet[count_row,7] = format_time(stu.commit_time)
|
|
|
|
sheet[count_row,7] = format_time(stu.commit_time)
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
homeworks.where(:homework_type => 1).each_with_index do |home, i|
|
|
|
|
homeworks.where(:homework_type => 1).includes(:student_works).each_with_index do |home, i|
|
|
|
|
sheet = book.create_worksheet :name => "普通作业第#{i+1}次"
|
|
|
|
sheet = book.create_worksheet :name => "普通作业第#{i+1}次"
|
|
|
|
sheet[0,0] = "课程编号"
|
|
|
|
sheet[0,0] = "课程编号"
|
|
|
|
sheet[0,1] = course.id
|
|
|
|
sheet[0,1] = course.id
|
|
|
@ -2609,17 +2620,17 @@ class CoursesController < ApplicationController
|
|
|
|
sheet[count_row,2] = stu.user.login
|
|
|
|
sheet[count_row,2] = stu.user.login
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,4] = strip_html stu.description
|
|
|
|
sheet[count_row,4] = strip_html stu.description
|
|
|
|
sheet[count_row,5] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2)
|
|
|
|
sheet[count_row,5] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(1)
|
|
|
|
sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
|
|
|
|
sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(1)
|
|
|
|
if home.anonymous_comment ==0
|
|
|
|
if home.anonymous_comment ==0
|
|
|
|
sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
|
|
|
|
sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(1)
|
|
|
|
sheet[count_row,8] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.absence_penalty
|
|
|
|
sheet[count_row,8] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.absence_penalty
|
|
|
|
sheet[count_row,9] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,9] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
|
|
|
sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1)
|
|
|
|
sheet[count_row,11] = format_time(stu.commit_time)
|
|
|
|
sheet[count_row,11] = format_time(stu.commit_time)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sheet[count_row,7] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,7] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
|
|
|
sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1)
|
|
|
|
sheet[count_row,9] = format_time(stu.commit_time)
|
|
|
|
sheet[count_row,9] = format_time(stu.commit_time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
@ -2627,7 +2638,7 @@ class CoursesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
homeworks.where(:homework_type => 3).each_with_index do |home, i|
|
|
|
|
homeworks.where(:homework_type => 3).includes(:student_works).each_with_index do |home, i|
|
|
|
|
sheet = book.create_worksheet :name => "分组作业第#{i+1}次"
|
|
|
|
sheet = book.create_worksheet :name => "分组作业第#{i+1}次"
|
|
|
|
sheet[0,0] = "课程编号"
|
|
|
|
sheet[0,0] = "课程编号"
|
|
|
|
sheet[0,1] = course.id
|
|
|
|
sheet[0,1] = course.id
|
|
|
@ -2658,17 +2669,17 @@ class CoursesController < ApplicationController
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,4] = get_group_member_names home.student_works.where(:group_id => stu.group_id).pluck(:user_id)
|
|
|
|
sheet[count_row,4] = get_group_member_names home.student_works.where(:group_id => stu.group_id).pluck(:user_id)
|
|
|
|
sheet[count_row,5] = strip_html stu.description
|
|
|
|
sheet[count_row,5] = strip_html stu.description
|
|
|
|
sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2)
|
|
|
|
sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(1)
|
|
|
|
sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
|
|
|
|
sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(1)
|
|
|
|
if home.anonymous_comment ==0
|
|
|
|
if home.anonymous_comment ==0
|
|
|
|
sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
|
|
|
|
sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(1)
|
|
|
|
sheet[count_row,9] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.absence_penalty
|
|
|
|
sheet[count_row,9] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.absence_penalty
|
|
|
|
sheet[count_row,10] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,10] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
|
|
|
sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1)
|
|
|
|
sheet[count_row,12] = format_time(stu.commit_time)
|
|
|
|
sheet[count_row,12] = format_time(stu.commit_time)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
sheet[count_row,8] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,8] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty
|
|
|
|
sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
|
|
|
sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1)
|
|
|
|
sheet[count_row,10] = format_time(stu.commit_time)
|
|
|
|
sheet[count_row,10] = format_time(stu.commit_time)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
@ -2700,7 +2711,7 @@ class CoursesController < ApplicationController
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,3] = stu.user.user_extensions.student_id
|
|
|
|
sheet[count_row,4] = stu.objective_score == -1 ? "0.0" : format("%.1f",stu.objective_score)
|
|
|
|
sheet[count_row,4] = stu.objective_score == -1 ? "0.0" : format("%.1f",stu.objective_score)
|
|
|
|
sheet[count_row,5] = stu.subjective_score == -1 ? "0.0" : format("%.1f",stu.subjective_score)
|
|
|
|
sheet[count_row,5] = stu.subjective_score == -1 ? "0.0" : format("%.1f",stu.subjective_score)
|
|
|
|
sheet[count_row,6] = stu.score.nil? ? '--' : stu.score.round(2)
|
|
|
|
sheet[count_row,6] = stu.score.nil? ? '--' : stu.score.round(1)
|
|
|
|
sheet[count_row,7] = stu.commit_status == 0 ? l(:excel_no_answer) : format_time(stu.start_at)
|
|
|
|
sheet[count_row,7] = stu.commit_status == 0 ? l(:excel_no_answer) : format_time(stu.start_at)
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -2741,12 +2752,12 @@ class CoursesController < ApplicationController
|
|
|
|
sheet[count_row,column+=1] = get_group_member_names task.graduation_works.where(:group_id => stu.group_id).pluck(:user_id)
|
|
|
|
sheet[count_row,column+=1] = get_group_member_names task.graduation_works.where(:group_id => stu.group_id).pluck(:user_id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
sheet[count_row,column+=1] = strip_html stu.description
|
|
|
|
sheet[count_row,column+=1] = strip_html stu.description
|
|
|
|
sheet[count_row,column+=1] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2)
|
|
|
|
sheet[count_row,column+=1] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(1)
|
|
|
|
if task.cross_comment
|
|
|
|
if task.cross_comment
|
|
|
|
sheet[count_row,column+=1] = stu.cross_score.nil? ? l(:label_without_score) : stu.cross_score.round(2)
|
|
|
|
sheet[count_row,column+=1] = stu.cross_score.nil? ? l(:label_without_score) : stu.cross_score.round(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
sheet[count_row,column+=1] = stu.late_penalty
|
|
|
|
sheet[count_row,column+=1] = stu.late_penalty
|
|
|
|
sheet[count_row,column+=1] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
|
|
|
sheet[count_row,column+=1] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1)
|
|
|
|
sheet[count_row,column+=1] = format_time(stu.commit_time)
|
|
|
|
sheet[count_row,column+=1] = format_time(stu.commit_time)
|
|
|
|
count_row += 1
|
|
|
|
count_row += 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|