don't fail when converting qti item without identifier
some qti questions that are converted don't have an identifier like they're supposed to. This allows those questions to still be processed without causing an error refs #5546 Change-Id: I2bc931a65095fca2e73beaaf578f99037e5e09e3 Reviewed-on: https://gerrit.instructure.com/6400 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
e0eafa83eb
commit
ae498ae7e7
|
@ -58,7 +58,8 @@ class AssessmentItemConverter
|
|||
create_doc
|
||||
@question[:question_name] = @title || get_node_att(@doc, 'assessmentItem', 'title')
|
||||
# The colons are replaced with dashes in the conversion from QTI 1.2
|
||||
@question[:migration_id] = get_node_att(@doc, 'assessmentItem', 'identifier').gsub(/:/, '-')
|
||||
@question[:migration_id] = get_node_att(@doc, 'assessmentItem', 'identifier')
|
||||
@question[:migration_id] = @question[:migration_id].gsub(/:/, '-') if @question[:migration_id]
|
||||
if @opts[:alternate_ids]
|
||||
# In D2L-generated QTI the assessments reference the items by the label instead of the identifier
|
||||
alt_id = get_node_att(@doc, 'assessmentItem', 'label')
|
||||
|
|
Loading…
Reference in New Issue