diff --git a/vendor/plugins/qti_exporter/lib/qti_exporter/assessment_item_converter.rb b/vendor/plugins/qti_exporter/lib/qti_exporter/assessment_item_converter.rb index 6914e3e9650..95bf421d5d1 100644 --- a/vendor/plugins/qti_exporter/lib/qti_exporter/assessment_item_converter.rb +++ b/vendor/plugins/qti_exporter/lib/qti_exporter/assessment_item_converter.rb @@ -266,7 +266,7 @@ class AssessmentItemConverter opts[:custom_type] = 'canvas_matching' elsif type == 'matching' opts[:custom_type] = 'respondus_matching' - elsif type =~ /fill_in_multiple_blanks_question|fill in the blanks/i + elsif type =~ /fillInMultiple|fill_in_multiple_blanks_question|fill in the blanks/i opts[:interaction_type] = 'fill_in_multiple_blanks_question' elsif type == 'multiple_dropdowns_question' opts[:interaction_type] = 'multiple_dropdowns_question' diff --git a/vendor/plugins/qti_exporter/lib/qti_exporter/fill_in_the_blank.rb b/vendor/plugins/qti_exporter/lib/qti_exporter/fill_in_the_blank.rb index 0574a4cab52..7f9c12b01e1 100644 --- a/vendor/plugins/qti_exporter/lib/qti_exporter/fill_in_the_blank.rb +++ b/vendor/plugins/qti_exporter/lib/qti_exporter/fill_in_the_blank.rb @@ -14,6 +14,8 @@ class FillInTheBlank < AssessmentItemConverter def parse_question_data if @type == 'angel' process_angel + elsif @type == 'fillinmultiple' + process_respondus elsif @doc.at_css('itemBody extendedTextInteraction') process_d2l else @@ -111,6 +113,21 @@ class FillInTheBlank < AssessmentItemConverter end end - + + def process_respondus + @doc.css('responseCondition stringMatch baseValue[baseType=string]').each do |val_node| + if blank_id = val_node['identifier'] + blank_id = blank_id.sub(%r{^RESPONSE_-([^-]*)-}, '\1') + @question[:answers] << { + :weight => AssessmentItemConverter::DEFAULT_CORRECT_WEIGHT, + :id => unique_local_id, + :migration_id => blank_id, + :text => sanitize_html_string(val_node.text, true), + :blank_id => blank_id, + } + end + end + end + end end