Merge branch 'dev_item_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_item_bank

dev_jupyter
杨树林 5 years ago
commit 5bd8192aab

@ -8,7 +8,7 @@ class ItemBanks::SaveItemForm
validates :item_type, presence: true, inclusion: {in: %W(SINGLE MULTIPLE JUDGMENT COMPLETION SUBJECTIVE PRACTICAL PROGRAM)}
validates :difficulty, presence: true, inclusion: {in: 1..3}, numericality: { only_integer: true }
validates :name, presence: true, length: { maximum: 1000 }
validates :analysis, length: { maximum: 1000 }
validates :analysis, length: { maximum: 5000 }
def validate!
super
@ -27,7 +27,7 @@ class ItemBanks::SaveItemForm
attr_accessor :choice_text, :is_answer
validates :choice_text, presence: true, length: { maximum: 300 }
validates :choice_text, presence: true, length: { maximum: 500 }
validates :is_answer, presence: true, inclusion: {in: 0..1}, numericality: { only_integer: true }
end
end

@ -98,7 +98,7 @@ Rails.application.routes.draw do
resources :examination_intelligent_settings do
collection do
get :optinal_items
post :optinal_items
end
member do

Loading…
Cancel
Save