Class: AtomicAssessmentsImport::Questions::FillInTheBlank

Inherits:
Question
  • Object
show all
Defined in:
lib/atomic_assessments_import/questions/fill_in_the_blank.rb

Instance Attribute Summary

Attributes inherited from Question

#reference

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_dataObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/atomic_assessments_import/questions/fill_in_the_blank.rb', line 12

def question_data
  answers = (@row["correct answer"] || "").split(";").map(&:strip)
  super.merge(
    stimulus: "", # Note: ExamSoft doesn't use a template like Learnosity, so we put the full question text in the template and leave the stimulus blank
    template: build_stimulus(answers), 
    validation: {
      scoring_type: scoring_type,
      valid_response: {
        score: points,
        value: answers
      },
    }
  )
end

#question_typeObject



8
9
10
# File 'lib/atomic_assessments_import/questions/fill_in_the_blank.rb', line 8

def question_type
  "clozetext"
end