Index: openacs-4/packages/assessment/tcl/as-qti-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-qti-procs.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/assessment/tcl/as-qti-procs.tcl 14 Oct 2004 11:44:51 -0000 1.1 +++ openacs-4/packages/assessment/tcl/as-qti-procs.tcl 14 Oct 2004 12:50:10 -0000 1.2 @@ -26,10 +26,7 @@ if { [llength $assessmentNodes] > 0 } { # There are assessments foreach assessment $assessmentNodes { - set as_assessments__title "Assessment" - if {[$assessment hasAttribute {title}]} { - set as_assessments__title [$assessment getAttribute {title}] - } + set as_assessments__title [$assessment getAttribute {title} {Assessment}] set as_assessments__name [$assessment getAttribute {ident}] set nodesList [$assessment childNodes] set as_assessments__definition "" @@ -56,10 +53,7 @@ set sectionNodes [$assessment selectNodes {section}] foreach section $sectionNodes { set as_assessment_section_map__sort_order 0 - set as_sections__title "Section" - if {[$section hasAttribute {title}]} { - set as_sections__title [$section getAttribute {title}] - } + set as_sections__title [$section getAttribute {title} {Section}] set as_sections__name [$section getAttribute {ident}] set nodesList [$section childNodes] set as_sections__definition "" @@ -97,11 +91,7 @@ foreach item $itemNodes { # Order of the item_choices set sort_order 0 - #isn't used - set as_items__title "Item" - if {[$item hasAttribute {title}]} { - set as_items__title [$item getAttribute {title}] - } + set as_items__title [$item getAttribute {title} {Item}] set as_items__name [$item getAttribute {ident}] array set as_item_choices__correct_answer_p {} array set as_item_choices__score {} @@ -130,10 +120,7 @@ foreach resprocessing $resprocessingNodes { set respconditionNodes [$resprocessing selectNodes {respcondition}] foreach respcondition $respconditionNodes { - set title "Correct" - if {[$respcondition hasAttribute {title}]} { - set title [$respcondition getAttribute {title} {}] - } + set title [$respcondition getAttribute {title} {Correct}] if {$title == {Correct}} { set correctNodes [$respcondition selectNodes {conditionvar/and/varequal/text()}] foreach correct $correctNodes { @@ -220,10 +207,7 @@ # The first node of the list. It may not be a good idea if it doesn't exist set response_lid [lindex $response_lidNodes 0] set as_item_type__name [$response_lid getAttribute {ident}] - set as_items__rcardinality "Single" - if {[$response_lid hasAttribute {rcardinality}]} { - set as_items__rcardinality [$response_lid getAttribute {rcardinality} {}] - } + set as_items__rcardinality [$response_lid getAttribute {rcardinality} {Single}] # multiple choice either text (remember it can be internationalized or changed), images, sounds, videos # this is the default