You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/ec_course_evaluation.rb

19 lines
781 B

6 years ago
# 工程认证课程达成度计算--课程评估标准
# status: 1 单次考核总成绩支撑课程目标, 2 单次考核的某分项成绩支撑课程目标
# score_type: 1导入的是明细成绩 2导入的是平均成绩
class EcCourseEvaluation < ApplicationRecord
belongs_to :ec_course
# 考核分项
has_many :ec_course_evaluation_subitems, dependent: :destroy
has_many :ec_student_achievements
enum status: { partly: 1, totality: 2 }, _suffix: :support # :partly_support?, :totality_support?
enum score_type: { detail: 1, average: 2 }, _suffix: :score_type # :detail_score_type?, :average_score_type?
accepts_nested_attributes_for :ec_course_evaluation_subitems, allow_destroy: true
def imported?
import_status?
end
end