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.
11 lines
419 B
11 lines
419 B
# 课堂中随机试卷的随机规则配置
|
|
class ExerciseRandomSetting < ApplicationRecord
|
|
validates_presence_of :difficulty, :quanlity, :item_type, :sub_discipline_id
|
|
validates :quanlity, numericality: {only_integer: true, greater_than: 0}
|
|
|
|
belongs_to :exercise
|
|
belongs_to :sub_discipline
|
|
|
|
enum item_type: { SINGLE: 0, MULTIPLE: 1, JUDGMENT: 2, COMPLETION: 3, SUBJECTIVE: 4, PRACTICAL: 5, PROGRAM: 6 }
|
|
end
|