Class: AtomicAssessmentsImport::Questions::ClozeDropdown
- Defined in:
- lib/atomic_assessments_import/questions/cloze_dropdown.rb
Constant Summary collapse
- CHOICE_OF_PATTERN =
/\AChoice of:\s*(.+)/i
Instance Attribute Summary
Attributes inherited from Question
Instance Method Summary collapse
Methods inherited from Question
#initialize, load, #metadata, #points, #scoring_type, #to_learnosity
Constructor Details
This class inherits a constructor from AtomicAssessmentsImport::Questions::Question
Instance Method Details
#question_data ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/atomic_assessments_import/questions/cloze_dropdown.rb', line 14 def question_data parsed = super.merge( stimulus: "", template: build_template(parsed.size), possible_responses: parsed.map { |p| p[:choices] }, validation: { scoring_type: scoring_type, valid_response: { score: points, value: parsed.map { |p| p[:correct] }, }, } ) end |
#question_type ⇒ Object
10 11 12 |
# File 'lib/atomic_assessments_import/questions/cloze_dropdown.rb', line 10 def question_type "clozedropdown" end |