support for respondus FIMB questions, refs #5386
Change-Id: I81ae1c352f18826d7bcbcfe751f97e194a81a518 Reviewed-on: https://gerrit.instructure.com/5490 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
This commit is contained in:
parent
601cd8dfa1
commit
6a3cd56100
|
@ -266,7 +266,7 @@ class AssessmentItemConverter
|
||||||
opts[:custom_type] = 'canvas_matching'
|
opts[:custom_type] = 'canvas_matching'
|
||||||
elsif type == 'matching'
|
elsif type == 'matching'
|
||||||
opts[:custom_type] = 'respondus_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'
|
opts[:interaction_type] = 'fill_in_multiple_blanks_question'
|
||||||
elsif type == 'multiple_dropdowns_question'
|
elsif type == 'multiple_dropdowns_question'
|
||||||
opts[:interaction_type] = 'multiple_dropdowns_question'
|
opts[:interaction_type] = 'multiple_dropdowns_question'
|
||||||
|
|
|
@ -14,6 +14,8 @@ class FillInTheBlank < AssessmentItemConverter
|
||||||
def parse_question_data
|
def parse_question_data
|
||||||
if @type == 'angel'
|
if @type == 'angel'
|
||||||
process_angel
|
process_angel
|
||||||
|
elsif @type == 'fillinmultiple'
|
||||||
|
process_respondus
|
||||||
elsif @doc.at_css('itemBody extendedTextInteraction')
|
elsif @doc.at_css('itemBody extendedTextInteraction')
|
||||||
process_d2l
|
process_d2l
|
||||||
else
|
else
|
||||||
|
@ -112,5 +114,20 @@ 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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue