工程认证相关任务

dev_shixuns
daiao 6 years ago
parent cb4ecb8a0f
commit 1d53060af9

@ -630,7 +630,7 @@ class EcCoursesController < ApplicationController
# 遍历学生成绩统计数据
student_scores.each do |sc|
sub_ecss = EcCourseStudentScore.where(:ec_course_id => @ec_course.id, :ec_year_student_id => sc.ec_year_student_id).first
sub_score = base_score == 0 ? 0 : ((sc.try(:score).to_f/base_score) * percentage).round(3)
sub_score = base_score == 0 || sc.try(:score).nil? ? 0 : ((sc.try(:score).to_f/base_score) * percentage).round(3)
if sub_ecss
ess_target = sub_ecss.ec_student_score_targets.where(:ec_course_target_id => target.id,

@ -49,7 +49,7 @@
<!--</span>-->
</span>
<span class="column-2 fr edu-txt-center">
<% if @major_manager && !@major_school.template_major %>
<% if @major_manager && !@major_school.template_major || User.current.admin? %>
<a href="javascript:void(0);" onclick="delete_confirm_box_3('<%= ec_major_school_ec_year_path(year, :ec_major_school_id => @major_school) %>','您确定要删除吗?')" class="mr15 color-grey-c">删除</a>
<% end %>
<%#= link_to '删除', ec_major_school_ec_year_path(year, :ec_major_school_id => @major_school), method: :delete, :class => "mr15 color-grey-c", data: { confirm: '您确定要删除吗' } %>

Loading…
Cancel
Save