Class: CanvasQtiToLearnosityConverter::FillBlanksWordBankQuestion

Inherits:
TemplateQuestion show all
Defined in:
lib/canvas_qti_to_learnosity_converter/questions/fill_the_blanks.rb

Overview

Handles fill_in_multiple_blanks_question where all blanks are word bank (answer_type=“wordbank” in New Quizzes). Canvas exports a shared pool of choices repeated identically across every response_lid. Produces a Learnosity clozeassociation question with a flat possible_responses list and per-blank correct answers expressed as single-element arrays.

Instance Method Summary collapse

Methods inherited from TemplateQuestion

#add_learnosity_assets, #extract_template, #extract_template_values, #get_template

Methods inherited from QuizQuestion

#convert, #dynamic_content_data, #extract_feedback, #extract_mattext, #extract_points_possible, #extract_stimulus, for, #initialize, #make_identifier, #process_assets!

Constructor Details

This class inherits a constructor from CanvasQtiToLearnosityConverter::QuizQuestion

Instance Method Details

#to_learnosityObject



95
96
97
98
99
100
101
102
103
# File 'lib/canvas_qti_to_learnosity_converter/questions/fill_the_blanks.rb', line 95

def to_learnosity
  {
    type: "clozeassociation",
    stimulus: "",
    template: extract_template(),
    validation: extract_validation(),
    possible_responses: extract_responses(),
  }
end