分班名称长度修改成60个字符

dev_hjm
daiao 6 years ago
parent cf941f60d8
commit cbff39697f

@ -8,7 +8,7 @@ class CourseGroup < ApplicationRecord
has_many :homework_group_reviews, :dependent => :destroy has_many :homework_group_reviews, :dependent => :destroy
scope :by_group_ids, lambda { |ids| where(id: ids)} scope :by_group_ids, lambda { |ids| where(id: ids)}
validates :name, length: { maximum: 20 } validates :name, length: { maximum: 60 }
after_create :generate_invite_code after_create :generate_invite_code

@ -17,7 +17,7 @@ if question.question_type <= 2 #当为选择题或判断题时,只显示选
end end
json.question_choices do json.question_choices do
json.array! exercise_choices.each_with_index.to_a do |a,index| json.array! exercise_choices.each_with_index.to_a do |a,index|
#TODO: 旧版本来答案都是存在exercise_choice_id里面的但是新版做成了一对多的关系exercise_choice_id只存了一个答案导致了问题 #TODO: 旧版本来一个题只有一个标准答案的新版又做成了一个题有多个标准答案exercise_choice_id存放的是标准答案的位置..
standard_answer_b = standard_answers_array.join("").include?(a.choice_position.to_s) standard_answer_b = standard_answers_array.join("").include?(a.choice_position.to_s)
user_answer_b = user_answer.include?(a.id) user_answer_b = user_answer.include?(a.id)
json.c_position (index+1) if ex_choice_random_boolean #当选项随机时,选项位置以此为准,否则不出现 json.c_position (index+1) if ex_choice_random_boolean #当选项随机时,选项位置以此为准,否则不出现

Loading…
Cancel
Save