工程认证

dev_haigong
cxt 6 years ago
parent 820c662542
commit 05ee4e2ea0

@ -724,8 +724,12 @@ class EcCoursesController < ApplicationController
va = total_rate.select{|tra| tra[:position] == po}.first
reach_real_target += va[:score] * va[:rate] if va.present?
end
Rails.logger.info("######round11111111#{(target_total_rates == 0 ? 0 : (reach_real_target * weight)/(target_total_rates.round(3)*100))}")
reach_real_target = target_total_rates == 0 ? 0 : (reach_real_target * weight)/(target_total_rates*100)
Rails.logger.info("######round2222222#{reach_real_target}")
if ec_course_support.present?
logger.info("----------ec_course_support: #{ec_course_support.id}")
egrc = ec_course_support.ec_graduation_requirement_calculation

@ -71,11 +71,11 @@ module ApplicationHelper
end
def ac_pass?(standard_value, real_value)
standard_value && real_value && real_value > standard_value ? "达成" : "未达成"
standard_value && real_value && real_value >= standard_value ? "达成" : "未达成"
end
def ec_pass?(standard_value, real_value)
standard_value && real_value && real_value > standard_value ? 1 : 0
standard_value && real_value && real_value >= standard_value ? 1 : 0
end
# 工程认证删除关联课堂

@ -0,0 +1,8 @@
class MigrateUserGrade < ActiveRecord::Migration
def up
change_column :users, :grade, :integer, :default => 0
end
def down
end
end
Loading…
Cancel
Save