Index: openacs-4/packages/assessment/lib/assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/assessment.tcl,v diff -u -r1.26 -r1.27 --- openacs-4/packages/assessment/lib/assessment.tcl 16 Apr 2009 11:39:09 -0000 1.26 +++ openacs-4/packages/assessment/lib/assessment.tcl 29 Sep 2013 13:40:40 -0000 1.27 @@ -342,7 +342,7 @@ set required_count 0 foreach one_item $item_list { - util_unlist $one_item as_item_id name title description subtext required_p max_time_to_complete content_rev_id content_filename content_type as_item_type_id validate_block question_text + lassign $one_item as_item_id name title description subtext required_p max_time_to_complete content_rev_id content_filename content_type as_item_type_id validate_block question_text foreach {check_expr check_message} [split $validate_block \n] { regsub -all {%answer%} $check_expr \$response_to_item($as_item_id) check_expr Index: openacs-4/packages/assessment/lib/item-show-mc.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/item-show-mc.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/assessment/lib/item-show-mc.tcl 28 Feb 2008 15:15:22 -0000 1.9 +++ openacs-4/packages/assessment/lib/item-show-mc.tcl 29 Sep 2013 13:40:40 -0000 1.10 @@ -20,7 +20,7 @@ set choices [db_list_of_lists get_choices {}] set total [llength $choices] foreach one_choice $choices { - util_unlist $one_choice choice_id title correct_answer_p feedback_text selected_p percent_score sort_order fixed_position answer_value content_rev_id content_filename content_name + lassign $one_choice choice_id title correct_answer_p feedback_text selected_p percent_score sort_order fixed_position answer_value content_rev_id content_filename content_name set title [ad_quotehtml $title] set feedback_text [ad_quotehtml $feedback_text] incr count Index: openacs-4/packages/assessment/tcl/as-assessment-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-assessment-procs.tcl,v diff -u -r1.35 -r1.36 --- openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 2 Sep 2008 16:35:29 -0000 1.35 +++ openacs-4/packages/assessment/tcl/as-assessment-procs.tcl 29 Sep 2013 13:40:40 -0000 1.36 @@ -367,7 +367,7 @@ set count 0 foreach one_section $all_sections { incr count - util_unlist $one_section section_id title + lassign $one_section section_id title lappend section_list $section_id db_dml save_order {} } Index: openacs-4/packages/assessment/tcl/as-item-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-form-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/assessment/tcl/as-item-form-procs.tcl 2 Sep 2008 17:21:29 -0000 1.16 +++ openacs-4/packages/assessment/tcl/as-item-form-procs.tcl 29 Sep 2013 13:40:40 -0000 1.17 @@ -31,7 +31,7 @@ set item_data [as::item_type_$item(item_type)\::render -type_id $item(item_type_id) -session_id $session_id -section_id $section_id -as_item_id $item_id -default_value $default_value -show_feedback $show_feedback] } - util_unlist $item_data default_value data + lassign $item_data default_value data if {$item(item_type) eq "mc"} { set item(allow_other_p) [as::item_type_mc::allow_other_p -item_type_id $item(item_type_id)] Index: openacs-4/packages/assessment/tcl/as-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/assessment/tcl/as-item-procs.tcl 2 Sep 2008 17:21:29 -0000 1.20 +++ openacs-4/packages/assessment/tcl/as-item-procs.tcl 29 Sep 2013 13:40:40 -0000 1.21 @@ -202,7 +202,7 @@ set subtypes [db_list_of_lists item_subtypes {}] foreach subtype $subtypes { - util_unlist $subtype type_id type + lassign $subtype type_id type set new_type_id [eval as::[string range $type 3 end]::copy -type_id $type_id] as::item_rels::new -item_rev_id $new_item_id -target_rev_id $new_type_id -type "[string range $type 0 end-2]rel" } Index: openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 2 Sep 2008 17:21:29 -0000 1.24 +++ openacs-4/packages/assessment/tcl/as-item-type-mc-procs.tcl 29 Sep 2013 13:40:40 -0000 1.25 @@ -310,7 +310,7 @@ if {![empty_string_p $session_id]} { set count 0 foreach one_choice $display_choices { - util_unlist $one_choice title choice_id + lassign $one_choice title choice_id incr count db_dml save_order {} } @@ -617,7 +617,7 @@ set correct_options [list [list "[_ assessment.yes]" t]] set i 0 foreach c $existing_choices { - foreach {value id correct_p} $c {break} + lassign $c value id correct_p if {![string match "__new*" $id]} { if {$i > 0} { ad_form -extend -name $form_id -form \ Index: openacs-4/packages/assessment/tcl/as-item-type-swcat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-item-type-swcat-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/assessment/tcl/as-item-type-swcat-procs.tcl 12 Jun 2006 18:59:20 -0000 1.3 +++ openacs-4/packages/assessment/tcl/as-item-type-swcat-procs.tcl 29 Sep 2013 13:40:40 -0000 1.4 @@ -104,7 +104,7 @@ set tree_id [db_string get_tree_id "" -default ""] set categories [category_tree::get_tree -all $tree_id] foreach cat $categories { - foreach {category_id category_name deprecated_p level} $cat {break} + lassign $cat category_id category_name deprecated_p level lappend display_choices [list $category_name $category_id] } return [list $default $display_choices] Index: openacs-4/packages/assessment/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/index.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/assessment/www/index.tcl 1 Dec 2008 16:57:02 -0000 1.20 +++ openacs-4/packages/assessment/www/index.tcl 29 Sep 2013 13:40:40 -0000 1.21 @@ -67,6 +67,6 @@ set session [_ assessment.Sessions] } -set admin_p [ad_permission_p $package_id create] +set admin_p [permission::permission_p -object_id $package_id -privilege create] ad_return_template Index: openacs-4/packages/assessment/www/last-session.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/last-session.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/assessment/www/last-session.tcl 12 Jun 2006 12:22:42 -0000 1.4 +++ openacs-4/packages/assessment/www/last-session.tcl 29 Sep 2013 13:40:40 -0000 1.5 @@ -106,7 +106,7 @@ #if the user is admin he will display all sessions from all subjects -if {[ad_permission_p [acs_magic_object "security_context_root"] "admin"]} { +if {[permission::permission_p -object_id [acs_magic_object "security_context_root"] -privilege "admin"]} { set query "sessions_of_assessment_of_subject" } else { set query "sessions_of_assessment" Index: openacs-4/packages/assessment/www/sessions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/sessions.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/assessment/www/sessions.tcl 2 Feb 2008 17:40:05 -0000 1.20 +++ openacs-4/packages/assessment/www/sessions.tcl 29 Sep 2013 13:40:40 -0000 1.21 @@ -29,7 +29,7 @@ } set assessment_rev_id $assessment_data(assessment_rev_id) -set admin_p [ad_permission_p $assessment_id admin] +set admin_p [permission::permission_p -object_id $assessment_id -privilege admin] #if the user is admin he will display all sessions from all subjects if {$admin_p && [empty_string_p $subject_id]} { Index: openacs-4/packages/assessment/www/asm-admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/index.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/assessment/www/asm-admin/index.tcl 15 May 2007 20:14:17 -0000 1.12 +++ openacs-4/packages/assessment/www/asm-admin/index.tcl 29 Sep 2013 13:40:40 -0000 1.13 @@ -43,7 +43,7 @@ lappend actions [_ assessment.set_reg_asm] "../admin/set-reg-assessment" [_ assessment.set_reg_asm] } -if {[ad_permission_p [acs_magic_object "security_context_root"] "admin"]} { +if {[permission::permission_p -object_id [acs_magic_object "security_context_root"] -privilege "admin"]} { # lappend actions "[_ assessment.Admin_catalog]" "catalog/" "[_ assessment.Admin_catalog]" } Index: openacs-4/packages/assessment/www/asm-admin/item-add-mc-choices.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-add-mc-choices.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/assessment/www/asm-admin/item-add-mc-choices.tcl 12 Mar 2007 19:33:35 -0000 1.10 +++ openacs-4/packages/assessment/www/asm-admin/item-add-mc-choices.tcl 29 Sep 2013 13:40:40 -0000 1.11 @@ -52,7 +52,7 @@ if { $type == 1} { set max_file_size 10000000 - # [ad_parameter MaxAttachmentSize] + # [parameter::get -parameter MaxAttachmentSize] set pretty_max_size [util_commify_number $max_file_size] set folder_id [as::assessment::folder_id -package_id $package_id] @@ -128,7 +128,7 @@ ad_form -extend -name item_add_mc_choices -edit_request { } -edit_data { set max_file_size 10000000 - # [ad_parameter MaxAttachmentSize] + # [parameter::get -parameter MaxAttachmentSize] set pretty_max_size [util_commify_number $max_file_size] set folder_id [as::assessment::folder_id -package_id $package_id] Index: openacs-4/packages/assessment/www/asm-admin/item-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-add.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/assessment/www/asm-admin/item-add.tcl 9 Sep 2008 17:28:22 -0000 1.22 +++ openacs-4/packages/assessment/www/asm-admin/item-add.tcl 29 Sep 2013 13:40:40 -0000 1.23 @@ -261,7 +261,7 @@ set file_mimetype [lindex $content 2] set n_bytes [file size $tmp_filename] set max_file_size 10000000 - # [ad_parameter MaxAttachmentSize] + # [parameter::get -parameter MaxAttachmentSize] set pretty_max_size [util_commify_number $max_file_size] if { $n_bytes > $max_file_size && $max_file_size > 0 } { Index: openacs-4/packages/assessment/www/asm-admin/item-create-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-create-2.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/item-create-2.tcl 1 Feb 2005 22:00:10 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/item-create-2.tcl 29 Sep 2013 13:40:40 -0000 1.2 @@ -17,8 +17,8 @@ set context [list "Create a new Item"] set package_id [ad_conn package_id] -set user_id [ad_get_user_id] -ad_require_permission $package_id admin +set user_id [ad_conn user_id] +permission::require_permission -object_id $package_id -privilege admin set item_title [db_string item_title {SELECT as_itemsx.title FROM as_itemsx WHERE as_itemsx.as_item_id=:as_item_id1}] Index: openacs-4/packages/assessment/www/asm-admin/item-create.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-create.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/assessment/www/asm-admin/item-create.tcl 1 Feb 2005 22:00:10 -0000 1.1 +++ openacs-4/packages/assessment/www/asm-admin/item-create.tcl 29 Sep 2013 13:40:40 -0000 1.2 @@ -14,8 +14,8 @@ set context [list "Create a new Item"] set package_id [ad_conn package_id] -set user_id [ad_get_user_id] -ad_require_permission $package_id admin +set user_id [ad_conn user_id] +permission::require_permission -object_id $package_id -privilege admin Index: openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl 9 Sep 2008 17:28:22 -0000 1.20 +++ openacs-4/packages/assessment/www/asm-admin/item-edit-general.tcl 29 Sep 2013 13:40:40 -0000 1.21 @@ -289,7 +289,7 @@ set file_mimetype [lindex $content 2] set n_bytes [file size $tmp_filename] set max_file_size 10000000 - # [ad_parameter MaxAttachmentSize] + # [parameter::get -parameter MaxAttachmentSize] set pretty_max_size [util_commify_number $max_file_size] if { $n_bytes > $max_file_size && $max_file_size > 0 } { Index: openacs-4/packages/assessment/www/asm-admin/item-edit-mc-choices.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-edit-mc-choices.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/assessment/www/asm-admin/item-edit-mc-choices.tcl 29 Aug 2008 19:13:34 -0000 1.8 +++ openacs-4/packages/assessment/www/asm-admin/item-edit-mc-choices.tcl 29 Sep 2013 13:40:40 -0000 1.9 @@ -46,7 +46,7 @@ set count_correct 0 set choices [db_list_of_lists get_choices {}] foreach one_choice $choices { - util_unlist $one_choice choice_id title correct_answer_p feedback_text selected_p percent_score fixed_position answer_value content_rev_id content_filename content_name + lassign $one_choice choice_id title correct_answer_p feedback_text selected_p percent_score fixed_position answer_value content_rev_id content_filename content_name if {$correct_answer_p == "t"} { append ad_form_code "\{infotxt.$choice_id:text(inform) \{label \"[_ assessment.Choice] $title\"\} \{value \"\"\}\}\n" } else { @@ -84,7 +84,7 @@ ad_form -extend -name item_edit_mc_choices -edit_request { foreach one_choice $choices { - util_unlist $one_choice choice_id title correct_answer_p feedback_text selected_p percent_score fixed_position answer_value + lassign $one_choice choice_id title correct_answer_p feedback_text selected_p percent_score fixed_position answer_value set feedback($choice_id) $feedback_text set percent($choice_id) $percent_score set fixed_pos($choice_id) $fixed_position @@ -96,7 +96,7 @@ } -edit_data { db_transaction { set max_file_size 10000000 - # [ad_parameter MaxAttachmentSize] + # [parameter::get -parameter MaxAttachmentSize] set pretty_max_size [util_commify_number $max_file_size] set folder_id [as::assessment::folder_id -package_id $package_id] Index: openacs-4/packages/assessment/www/asm-admin/item-edit-mc.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/item-edit-mc.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/assessment/www/asm-admin/item-edit-mc.tcl 7 Oct 2007 22:36:54 -0000 1.11 +++ openacs-4/packages/assessment/www/asm-admin/item-edit-mc.tcl 29 Sep 2013 13:40:40 -0000 1.12 @@ -70,7 +70,7 @@ set validate_list [list] set count_correct [array exists correct] foreach one_choice $choices { - util_unlist $one_choice choice_title choice_id choice_correct_p + lassign $one_choice choice_title choice_id choice_correct_p incr count if {![info exists choice($choice_id)]} { set choice($choice_id) $choice_title Index: openacs-4/packages/assessment/www/asm-admin/results-export.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/results-export.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/assessment/www/asm-admin/results-export.tcl 29 Aug 2008 19:09:40 -0000 1.12 +++ openacs-4/packages/assessment/www/asm-admin/results-export.tcl 29 Sep 2013 13:40:40 -0000 1.13 @@ -80,7 +80,7 @@ set section_list [db_list_of_lists all_sections {}] foreach one_section $section_list { - util_unlist $one_section section_id section_item_id + lassign $one_section section_id section_item_id set mc_item_list [list] db_foreach all_section_items {} { lappend item_list $section_id $as_item_id Index: openacs-4/packages/assessment/www/asm-admin/section-preview.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/section-preview.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/assessment/www/asm-admin/section-preview.tcl 12 Jun 2006 02:49:51 -0000 1.5 +++ openacs-4/packages/assessment/www/asm-admin/section-preview.tcl 29 Sep 2013 13:40:40 -0000 1.6 @@ -41,7 +41,7 @@ multirow create items as_item_id name title description subtext required_p max_time_to_complete presentation_type html content as_item_type_id choice_orientation next_title foreach one_item $item_list { - util_unlist $one_item as_item_id name title description subtext required_p max_time_to_complete content_rev_id content_filename content_type as_item_type_id + lassign $one_item as_item_id name title description subtext required_p max_time_to_complete content_rev_id content_filename content_type as_item_type_id set presentation_type [as::item_form::add_item_to_form -name section_preview_form -session_id "" -section_id $section_id -item_id $as_item_id -default_value "" -required_p $required_p]