| |
1 |
1 |
as::assessment::data -assessment_id $assessment_id |
| |
2 |
2 |
ad_form -name admin_section -form { |
| |
3 |
3 |
{section_id:text(hidden) {value $section_id}} |
| |
4 |
4 |
} |
| |
5 |
5 |
|
| |
6 |
|
db_multirow -extend { checks_related presentation_type html item_type choice_orientation } items section_items {} { |
| |
|
6 |
set item_add_url [export_vars -base item-add {section_id assessment_id {after 0}}] |
| |
|
7 |
set catalog_search_url [export_vars -base catalog-search {section_id assessment_id {after 0}}] |
| |
|
8 |
|
| |
|
9 |
db_multirow -extend { checks_related presentation_type html item_type choice_orientation item_edit_general_url item_copy_url catalog_search_url item_swap_url add_edit_check_url check_admin_url } items section_items {} { |
| |
|
10 |
|
| |
|
11 |
# Build URLs |
| |
|
12 |
set item_edit_general_url [export_vars -base item-edit-general {as_item_id section_id assessment_id}] |
| |
|
13 |
set item_copy_url [export_vars -base item-copy {section_id assessment_id as_item_id {after $sort_order}}] |
| |
|
14 |
set item_add_url [export_vars -base item-add {section_id assessment_id {after $sort_order}}] |
| |
|
15 |
set catalog_search_url [export_vars -base catalog-search {section_id assessment_id {after $sort_order}}] |
| |
|
16 |
set item_swap_down_url [export_vars -base item-swap {section_id assessment_id sort_order {direction down}}] |
| |
|
17 |
set item_swap_up_url [export_vars -base item-swap {section_id assessment_id sort_order {direction up}}] |
| |
|
18 |
set item_delete_url [export_vars -base item-swap {as_item_id section_id assessment_id}] |
| |
|
19 |
set add_edit_check_url [export_vars -base ../asm-admin/add-edit-check {as_item_id section_id assessment_id {after $sort_order}}] |
| |
|
20 |
set check_admin_url [export_vars -base ../asm-admin/checks-admin {section_id assessment_id {item_id $as_item_id}}] |
| |
|
21 |
|
| |
|
22 |
|
| |
7 |
23 |
set presentation_type [as::item_form::add_item_to_form -name admin_section -section_id $section_id -item_id $as_item_id -random_p f] |
| |
8 |
24 |
if {$presentation_type == "fitb"} { |
| |
9 |
25 |
regsub -all -line -nocase -- {<textbox as_item_choice_id=} $title "<input name=response_to_item.${as_item_id}_" html |
| |
10 |
26 |
} |
| |
11 |
27 |
array set item [as::item::item_data -as_item_id $as_item_id] |
| |
12 |
28 |
|
| |
13 |
29 |
if {$presentation_type == "rb" || $presentation_type == "cb"} { |
| |
14 |
30 |
array set type [as::item_display_$presentation_type\::data -type_id $item(display_type_id)] |
| |
15 |
31 |
set choice_orientation $type(choice_orientation) |
| |
16 |
32 |
array unset type |
| |
17 |
33 |
} else { |
| |
18 |
34 |
set choice_orientation "" |
| |
19 |
35 |
} |
| |
20 |
36 |
|
| |
21 |
37 |
set item_type $item(item_type) |
| |
22 |
38 |
array unset item |
| |
23 |
39 |
|
| |
24 |
40 |
if {[empty_string_p $points]} { |
| |
25 |
41 |
set points 0 |
| |
26 |
42 |
} |