@ -2404,17 +2404,17 @@ class CoursesController < ApplicationController
homeworks . where ( :homework_type = > 4 ) . each do | homework |
sheet1 [ 4 , current_col += 1 ] = " #{ homework . name } "
end
for i in 0 ... homeworks . where ( :homework_type = > 1 ) . siz e
sheet1 [ 4 , current_col += 1 ] = " 普通作业第 " + ( i + 1 ) . to_s + " 次 "
homeworks . where ( :homework_type = > 1 ) . each do | homework |
sheet1 [ 4 , current_col += 1 ] = " #{ homework . name } "
end
for i in 0 ... homeworks . where ( :homework_type = > 3 ) . siz e
sheet1 [ 4 , current_col += 1 ] = " 分组作业第 " + ( i + 1 ) . to_s + " 次 "
homeworks . where ( :homework_type = > 3 ) . each do | homework |
sheet1 [ 4 , current_col += 1 ] = " #{ homework . name } "
end
for i in 0 ... exercises . size
sheet1 [ 4 , current_col += 1 ] = " 试卷第 " + ( i + 1 ) . to_s + " 次 "
exercises . each do | exercise |
sheet1 [ 4 , current_col += 1 ] = " #{ exercise . exercise_name } "
end
for i in 0 ... tasks . size
sheet1 [ 4 , current_col += 1 ] = " 毕设任务第 " + ( i + 1 ) . to_s + " 次 "
tasks . each do | task |
sheet1 [ 4 , current_col += 1 ] = " #{ task . name } "
end
sheet1 [ 4 , current_col += 1 ] = " 实训作业总得分 "
@ -2434,7 +2434,7 @@ class CoursesController < ApplicationController
sheet1 [ count_row , column += 1 ] = member . user . login
sheet1 [ count_row , column += 1 ] = member . user . mail
sheet1 [ count_row , column += 1 ] = member . user . user_extensions . student_id
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 . try( : name)
# current_col = 5
shixun_score = 0
homeworks . where ( :homework_type = > 4 ) . each do | homework |
@ -2550,7 +2550,7 @@ class CoursesController < ApplicationController
sheet2 [ count_row , 1 ] = act_member . user . show_real_name
sheet2 [ count_row , 2 ] = act_member . user . login
sheet2 [ count_row , 3 ] = act_member . user . user_extensions . student_id
sheet2 [ count_row , 4 ] = act_member . course_group_id == 0 ? " 暂无 " : act_member . course_group . name
sheet2 [ count_row , 4 ] = act_member . course_group_id == 0 ? " 暂无 " : act_member . course_group . try( : name)
sheet2 [ count_row , 5 ] = act_member . homework_num . to_i + act_member . graduation_num . to_i
sheet2 [ count_row , 6 ] = act_member . exercise_num
sheet2 [ count_row , 7 ] = act_member . poll_num
@ -2598,7 +2598,7 @@ class CoursesController < ApplicationController
end
homeworks . where ( :homework_type = > 1 ) . includes ( :score_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 , 1 ] = course . id
sheet [ 1 , 0 ] = " 课程名称 "
@ -2645,7 +2645,7 @@ class CoursesController < ApplicationController
end
homeworks . where ( :homework_type = > 3 ) . includes ( :score_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 , 1 ] = course . id
sheet [ 1 , 0 ] = " 课程名称 "
@ -2693,7 +2693,7 @@ class CoursesController < ApplicationController
end
exercises . includes ( :score_exercise_users ) . each_with_index do | exercise , i |
sheet = book . create_worksheet :name = > " 试卷第 #{ i + 1 } 次 "
sheet = book . create_worksheet :name = > " #{ exercise . exercise_name } "
sheet [ 0 , 0 ] = " 课程编号 "
sheet [ 0 , 1 ] = course . id
sheet [ 1 , 0 ] = " 课程名称 "
@ -2724,7 +2724,7 @@ class CoursesController < ApplicationController
end
tasks . each_with_index do | task , i |
sheet = book . create_worksheet :name = > " 毕设任务第 #{ i + 1 } 次 "
sheet = book . create_worksheet :name = > " #{ task . name } "
sheet [ 0 , 0 ] = " 课程编号 "
sheet [ 0 , 1 ] = course . id
sheet [ 1 , 0 ] = " 课程名称 "