From c0e58d19faa88ba4ef08a7100639bb22fecb3bc3 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 24 Jun 2016 16:25:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=9A=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E4=B8=AD=E7=9A=84=E7=BC=BA=E8=AF=84=E3=80=81?= =?UTF-8?q?=E8=BF=9F=E4=BA=A4=E6=89=A3=E5=88=86=E5=BA=94=E4=B8=8E=E4=BD=9C?= =?UTF-8?q?=E5=93=81=E5=88=97=E8=A1=A8=E7=9A=84=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 18 +++++++++--------- app/controllers/student_work_controller.rb | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 2e66f29a3..43b488e96 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1305,12 +1305,12 @@ class CoursesController < ApplicationController sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) 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,9] = stu.absence_penalty - sheet[count_row,10] = stu.late_penalty + sheet[count_row,9] = home.teacher_priority == 1 ? 0 : stu.absence_penalty + sheet[count_row,10] = home.teacher_priority == 1 ? 0 : stu.late_penalty sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) sheet[count_row,12] = format_time(stu.created_at) else - sheet[count_row,8] = stu.late_penalty + sheet[count_row,8] = home.teacher_priority == 1 ? 0 : stu.late_penalty sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) sheet[count_row,10] = format_time(stu.created_at) end @@ -1338,12 +1338,12 @@ class CoursesController < ApplicationController sheet[count_row,8] = stu.system_score.nil? ? l(:label_without_score) : stu.system_score.round(2) if home.anonymous_comment ==0 sheet[count_row,9] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2) - sheet[count_row,10] = stu.absence_penalty - sheet[count_row,11] = stu.late_penalty + sheet[count_row,10] = home.teacher_priority == 1 ? 0 : stu.absence_penalty + sheet[count_row,11] = home.teacher_priority == 1 ? 0 : stu.late_penalty sheet[count_row,12] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) sheet[count_row,13] = format_time(stu.created_at) else - sheet[count_row,9] = stu.late_penalty + sheet[count_row,9] = home.teacher_priority == 1 ? 0 : stu.late_penalty sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) sheet[count_row,11] = format_time(stu.created_at) end @@ -1369,12 +1369,12 @@ class CoursesController < ApplicationController sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) 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,8] = stu.absence_penalty - sheet[count_row,9] = stu.late_penalty + sheet[count_row,8] = home.teacher_priority == 1 ? 0 : stu.absence_penalty + sheet[count_row,9] = home.teacher_priority == 1 ? 0 : stu.late_penalty sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) sheet[count_row,11] = format_time(stu.created_at) else - sheet[count_row,7] = stu.late_penalty + sheet[count_row,7] = home.teacher_priority == 1 ? 0 : stu.late_penalty sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) sheet[count_row,9] = format_time(stu.created_at) end diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index b92dbb935..3a72ba55e 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -1230,12 +1230,12 @@ class StudentWorkController < ApplicationController sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2) if @homework.anonymous_comment ==0 sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) - sheet1[count_row,10] = homework.absence_penalty - sheet1[count_row,11] = homework.late_penalty + sheet1[count_row,10] = @homework.teacher_priority == 1 ? 0 : homework.absence_penalty + sheet1[count_row,11] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty sheet1[count_row,12] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) sheet1[count_row,13] = format_time(homework.created_at) else - sheet1[count_row,9] = homework.late_penalty + sheet1[count_row,9] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) sheet1[count_row,11] = format_time(homework.created_at) end @@ -1263,12 +1263,12 @@ class StudentWorkController < ApplicationController sheet1[count_row,9] = homework.system_score.nil? ? l(:label_without_score) : homework.system_score.round(2) if @homework.anonymous_comment ==0 sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) - sheet1[count_row,11] = homework.absence_penalty - sheet1[count_row,12] = homework.late_penalty + sheet1[count_row,11] = @homework.teacher_priority == 1 ? 0 : homework.absence_penalty + sheet1[count_row,12] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty sheet1[count_row,13] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) sheet1[count_row,14] = format_time(homework.created_at) else - sheet1[count_row,10] = homework.late_penalty + sheet1[count_row,10] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) sheet1[count_row,12] = format_time(homework.created_at) end @@ -1292,12 +1292,12 @@ class StudentWorkController < ApplicationController sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2) if @homework.anonymous_comment ==0 sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2) - sheet1[count_row,7] = homework.absence_penalty - sheet1[count_row,8] = homework.late_penalty + sheet1[count_row,7] = @homework.teacher_priority == 1 ? 0 : homework.absence_penalty + sheet1[count_row,8] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) sheet1[count_row,10] = format_time(homework.created_at) else - sheet1[count_row,6] = homework.late_penalty + sheet1[count_row,6] = @homework.teacher_priority == 1 ? 0 : homework.late_penalty sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score) sheet1[count_row,8] = format_time(homework.created_at) end