-
Type: Task
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: None
-
Component/s: None
-
None
Gist stack trace: https://gist.github.com/washu/df25072fdcc53af6bf58
Model
class Lecture
- We store in our own collection instead of inheriting
include Mongoid::Document
include Mongoid::Timestamps - name of lecture/class
field :name, type: String, default: ''
- description of the class
field :description, type: String, default: ''
- who owns this class/lecture (customers can have thier own class/lecture)
field :customer, type: String, default: Aztec::AZTEC
- Pre test required for class
field :require_pre_test, type: Boolean, default: false
- enable pre test on/off
field :enable_pre_test, type: Boolean, default: true
- enable practice test
field :enable_practice_test, type: Boolean, default: false
- enable practice test
field :enable_essay_test, type: Boolean, default: false
embeds_one :pre_test_config, class_name: 'AutomaticTest', inverse_of: :testable
embeds_one :post_test_config, class_name: 'AutomaticTest', inverse_of: :testable
- use customer or automatic tests
embeds_one :pre_test_custom, class_name: 'ManualTest', inverse_of: :testable
embeds_one :post_test_custom, class_name: 'ManualTest', inverse_of: :testable
- Practice Test is always manula
embeds_one :practice_test, class_name: 'ManualTest', inverse_of: :testable
- Essay Test
embeds_one :essay_test, class_name: 'ManualTest', inverse_of: :testable
- test types
field :manual_pre_test, type: Boolean, default: false
field :manual_post_test, type: Boolean, default: false
- enable drilling
field :enable_drill, type: Boolean, default: true
- unit of content
has_and_belongs_to_many :units, index: true
- Licenses
has_and_belongs_to_many :license, index: true
end
class AutomaticTest
include Mongoid::Document
include Mongoid::Attributes::Dynamic - number of questions per problem sets available
field :number_of_questions, type: Integer, default: 1 - percentage score of the test
field :passing_score, type: Integer, default: 80 - enable timer
field :enable_timer, type: Boolean, default: false - total time allow for test in minutes
field :test_time, type: Integer, default: 60 - Points per question
field :points_per_question, type: Integer, default: 1
field :allow_essay, type: Boolean, default: false
- Do we need a calculator?
field :calculator, type: Boolean, default: false - What calculator do we need
field :calculator_type, type: String, default: 'GED'
end
class ManualTest < AutomaticTest - problems sets to use
field :problem_set_id, type: BSON::ObjectId - random support
field :randomize, type: Boolean
embedded_in :testable , polymorphic: true
end
- is duplicated by
-
MONGOID-3646 Fix for ticket # 3644
- Closed