Index: openacs-4/packages/assessment/tcl/assessment-qti-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/Attic/assessment-qti-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/assessment/tcl/assessment-qti-procs.tcl 14 Oct 2004 11:35:50 -0000 1.24 +++ openacs-4/packages/assessment/tcl/assessment-qti-procs.tcl 14 Oct 2004 11:54:22 -0000 1.25 @@ -45,7 +45,7 @@ } } # Insert assessment in the CR (and as_assessments table) getting the revision_id (assessment_id) - set as_assessments__assessment_id [as_assessment_new -name $as_assessments__name -title $as_assessments__title -description $as_assessments__definition] + set as_assessments__assessment_id [as::assessment::new -name $as_assessments__name -title $as_assessments__title -description $as_assessments__definition] # Section set sectionNodes [$assessment selectNodes {section}] @@ -66,7 +66,7 @@ } } # Insert section in the CR (the and the as_sections table) getting the revision_id (section_id) - set as_sections__section_id [as_section_new -name $as_sections__name -title $as_sections__title -description $as_sections__definition] + set as_sections__section_id [as::section::new -name $as_sections__name -title $as_sections__title -description $as_sections__definition] # Relation between as_sections and as_assessments db_dml as_assessment_section_map_insert {} @@ -162,11 +162,11 @@ set as_item_display_id {} if {[$render_fib hasAttribute {rows}]} { # shortanswer (textarea) - set as_item_display_id [as_item_display_sa_new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_sa::new -name [ad_generate_random_string]] } else { - set as_item_display_id [as_item_display_tb_new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_tb::new -name [ad_generate_random_string]] } - set as_item_type_id [as_item_type_mc_new -name [ad_generate_random_string]] + set as_item_type_id [as::item_type_mc::new -name [ad_generate_random_string]] foreach node $presentationChildNodes { if {[$node nodeName] == {material}} { set mattextNodes [$node selectNodes {mattext/text()}] @@ -181,14 +181,14 @@ lappend as_item_choices__choice_text [string trim [$respident nodeValue]] } # Insert as_item_choice in the CR (and as_item_choices table) getting the revision_id (choice_id) - set as_item_choice_id [as_item_choice_new -mc_id $as_item_type_id -name $as_item_choices__ident -title $as_item_choices__choice_text -sort_order $sort_order] + set as_item_choice_id [as::item_choice::new -mc_id $as_item_type_id -name $as_item_choices__ident -title $as_item_choices__choice_text -sort_order $sort_order] # order of the item_choices incr sort_order append as_items__title " " } } # Insert as_item in the CR (and as_items table) getting the revision_id (as_item_id) - set as_item_id [as_item_new -name $as_items__name -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] + set as_item_id [as::item::new -name $as_items__name -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_type_id"] -relation_tag {as_item_type_rel} -relation_type {cr_item_rel} content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_display_id"] -relation_tag {as_item_display_rel} -relation_type {cr_item_rel} } else { @@ -202,13 +202,13 @@ set as_item_display_id {} if {$as_items__rcardinality == {Multiple}} { # multiple response either text (remember it can be internationalized or changed), images, sounds, videos - set as_item_display_id [as_item_display_cb_new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_cb::new -name [ad_generate_random_string]] } else { - set as_item_display_id [as_item_display_rb_new -name [ad_generate_random_string]] + set as_item_display_id [as::item_display_rb::new -name [ad_generate_random_string]] } - set as_item_type_id [as_item_type_mc_new -name $as_item_type__name] + set as_item_type_id [as::item_type_mc::new -name $as_item_type__name] # Insert as_item in the CR (and as_items table) getting the revision_id (as_item_id) - set as_item_id [as_item_new -name $as_items__name -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] + set as_item_id [as::item::new -name $as_items__name -title $as_items__title -feedback_right $as_items__feedback_right -feedback_wrong $as_items__feedback_wrong] content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_type_id"] -relation_tag {as_item_type_rel} -relation_type {cr_item_rel} content::item::relate -item_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_id"] -object_id [db_string cr_item_from_revision "select item_id from cr_revisions where revision_id=:as_item_display_id"] -relation_tag {as_item_display_rel} -relation_type {cr_item_rel} set response_labelNodes [$presentation selectNodes {.//response_label}] @@ -224,7 +224,7 @@ if {![info exists as_item_choices__score($as_item_choices__ident)]} { set as_item_choices__score($as_item_choices__ident) 0 } - as_item_choice_new -mc_id $as_item_type_id -name $as_item_choices__ident -title $as_item_choices__choice_text -sort_order $sort_order -correct_answer_p $as_item_choices__correct_answer_p($as_item_choices__ident) -percent_score $as_item_choices__score($as_item_choices__ident) + as::item_choice::new -mc_id $as_item_type_id -name $as_item_choices__ident -title $as_item_choices__choice_text -sort_order $sort_order -correct_answer_p $as_item_choices__correct_answer_p($as_item_choices__ident) -percent_score $as_item_choices__score($as_item_choices__ident) # order of the item_choices incr sort_order }