Index: openacs-4/packages/assessment/sql/oracle/assessment-actions-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/oracle/assessment-actions-package-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/assessment/sql/oracle/assessment-actions-package-create.sql 15 Feb 2005 17:09:06 -0000 1.2
+++ openacs-4/packages/assessment/sql/oracle/assessment-actions-package-create.sql 18 Feb 2005 15:30:20 -0000 1.3
@@ -57,7 +57,7 @@
creation_user in acs_objects.creation_user%TYPE
) return as_actions.action_id%TYPE;
procedure delete (
- action_id in as_actions.action_id%TYPE
+ v_action_id in as_actions.action_id%TYPE
);
procedure default_actions (
context_id in acs_objects.context_id%TYPE,
@@ -99,13 +99,13 @@
procedure delete (
- action_id as_actions.action_id%TYPE
+ v_action_id as_actions.action_id%TYPE
) is
begin
- delete from as_action_params where action_id=action_id;
- delete from as_actions where action_id = action_id;
- acs_object.del(as_action.delete.action_id);
+ delete from as_action_params where action_id=v_action_id;
+ delete from as_actions where action_id = v_action_id;
+ acs_object.del(as_action.delete.v_action_id);
end delete;
Index: openacs-4/packages/assessment/www/asm-admin/action-select.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/action-select.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/assessment/www/asm-admin/action-select.tcl 2 Feb 2005 21:31:15 -0000 1.3
+++ openacs-4/packages/assessment/www/asm-admin/action-select.tcl 18 Feb 2005 15:33:27 -0000 1.4
@@ -75,7 +75,7 @@
}
} -new_data {
- set order [as::assessment::check::get_max_order -section_id $section_id -action_perform $action_perform]
+ set order_value [as::assessment::check::get_max_order -section_id $section_id -action_perform $action_perform]
db_dml select_action {}
} -edit_request {
@@ -92,14 +92,14 @@
#re-order the other group
as::assessment::check::re_order_actions -check_id $inter_item_check_id -section_id $section_id -action_perform $perform
- set order [as::assessment::check::get_max_order -section_id $section_id -action_perform $action_perform]
+ set order_value [as::assessment::check::get_max_order -section_id $section_id -action_perform $action_perform]
db_dml edit_action_order_by {}
}
} else {
db_dml delete_action_map {}
db_dml delete_param_map {}
- set order [as::assessment::check::get_max_order -section_id $section_id -action_perform $action_perform]
+ set order_value [as::assessment::check::get_max_order -section_id $section_id -action_perform $action_perform]
db_dml select_action {}
}
}
Index: openacs-4/packages/assessment/www/asm-admin/action-select.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/action-select.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/assessment/www/asm-admin/action-select.xql 14 Feb 2005 17:10:29 -0000 1.3
+++ openacs-4/packages/assessment/www/asm-admin/action-select.xql 18 Feb 2005 15:34:04 -0000 1.4
@@ -20,7 +20,7 @@
insert into as_action_map
(inter_item_check_id,action_id,order_by,user_message,action_perform)
- values (:inter_item_check_id,:action_id,:order,:user_message,:action_perform)
+ values (:inter_item_check_id,:action_id,:order_value,:user_message,:action_perform)
@@ -57,7 +57,7 @@
- update as_action_map set action_perform=:action_perform, action_id=:action_id, user_message=:user_message,order_by=:order where inter_item_check_id=:inter_item_check_id
+ update as_action_map set action_perform=:action_perform, action_id=:action_id, user_message=:user_message,order_by=:order_value where inter_item_check_id=:inter_item_check_id
Index: openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl 2 Feb 2005 21:31:15 -0000 1.3
+++ openacs-4/packages/assessment/www/asm-admin/add-edit-check.tcl 18 Feb 2005 15:37:20 -0000 1.4
@@ -89,22 +89,33 @@
{html {cols 40} {rows 20}}
{help_text "[_ assessment.description_trigger]"}
}
- {action_p:boolean(radio)
- {label "[_ assessment.parameter_type]"}
- {options [as::assessment::check::get_types]}
- {help_text "[_ assessment.type_of_trigger]"}
- }
{condition:text(radio)
{label "[_ assessment.condition]"}
{options $choices}
{after_html $question_text}
{help_text "[_ assessment.the_condition_to]"}
}
-
-} -new_data {
+
+}
+
+if {![exists_and_not_null inter_item_check_id]} {
+ ad_form -extend -name new_check -form {
+ {action_p:boolean(radio)
+ {label "[_ assessment.parameter_type]"}
+ {options [as::assessment::check::get_types]}
+ {help_text "[_ assessment.type_of_trigger]"}
+ }
+ }
+} else {
+ ad_form -extend -name new_check -form {
+ {action_p:text(hidden)}
+ }
+}
+
+ad_form -extend -name new_check -new_data {
set user_id [ad_conn user_id]
set check_sql [as::assessment::check::get_sql -condition $condition -item_id $item_id]
-# set check_sql "check_sql"
+ # set check_sql "check_sql"
db_transaction {
set date [db_string get_date {select sysdate from dual}]
db_exec_plsql new_check {}
@@ -117,7 +128,7 @@
set cond_list [split $condition_sql "="]
#set condition [string range [lindex $cond_list 1] 0 3]
set condition [lindex [split [lindex $cond_list 1] " "] 0]
-
+
} -edit_data {
set check_sql [as::assessment::check::get_sql -condition $condition -item_id $item_id]
db_dml update_check {}
Index: openacs-4/packages/assessment/www/asm-admin/checks-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/checks-delete.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/assessment/www/asm-admin/checks-delete.tcl 2 Feb 2005 23:09:05 -0000 1.2
+++ openacs-4/packages/assessment/www/asm-admin/checks-delete.tcl 18 Feb 2005 15:39:41 -0000 1.3
@@ -9,6 +9,7 @@
by_item_p
item_id:optional
}
+set inter_item_check_id [split $inter_item_check_id " "]
set count [llength $inter_item_check_id]
for { set i 0} { $i< $count } {incr i} {