Index: openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml,v
diff -u -r1.68.2.9 -r1.68.2.10
--- openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml 20 Jul 2005 15:49:39 -0000 1.68.2.9
+++ openacs-4/packages/assessment/catalog/assessment.en_US.ISO-8859-1.xml 26 Jul 2005 11:43:15 -0000 1.68.2.10
@@ -36,6 +36,7 @@
Add new section display
Add parameter
To add a question, add a section first.
+ Add section trigger
Add sections to assessment
Add to assessment "%assessment_data.title%"
Add to section "%section_title%"
@@ -80,7 +81,7 @@
The author of the assement will not see who gave the answer.
Consent statement that a user must agree to in order to proceed with the assessment.
Description of an assessment
- Timestamp after which noone is allowed to submit a response.
+ Timestamp after which noone is allowed to submit a response.
Page to display before the actual assessment
Page to display after the assessment has finished.
Under which conditions should the feedback associated with <br>
@@ -356,7 +357,7 @@
Allow Multiple Answers
Allo Multiple Answers?
Name
- Assessment name of the new copy
+ Assessment name of the new coppy
The name of the trigger.
Name is already used.
New Assessment
@@ -409,7 +410,7 @@
Password
Enter assessment password
Percent Score
- Percentage of the points of the question this choice gives. May be larger than 100 and lower than -100.
+ Percentage of the points of the question this choice gives. May be larger than 100 and lower than -100.
Performed
Permissions
points
@@ -470,7 +471,7 @@
Search and add sections to assessment "%assessment_data.title%"
Description of this section display type
Title of the section display type. It will be used to select the display type when creating new sections.
- How many questions will be displayed on a page in a section of this type. Leave empty for all questions on one page, use "1" for one question per page.
+ How many questions will be displayed on a page in a section of this type. Leave empty for all questions on one page, use "1" for one question per page.
SECTION
Branched section
Is this a branched section?
Index: openacs-4/packages/assessment/tcl/as-checks-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.tcl,v
diff -u -r1.24.2.2 -r1.24.2.3
--- openacs-4/packages/assessment/tcl/as-checks-procs.tcl 27 Jun 2005 14:50:16 -0000 1.24.2.2
+++ openacs-4/packages/assessment/tcl/as-checks-procs.tcl 26 Jul 2005 11:43:15 -0000 1.24.2.3
@@ -260,6 +260,7 @@
set failed_p "t"
set failed [catch $tcl_code errorMsg]
+ ns_log Notice "DEDS as::assessment::check::action_exec -- $tcl_code"
if { $failed > 0 } {
set failed_p "f"
@@ -451,6 +452,27 @@
}
+ad_proc -public as::assessment::check::eval_or_checks {
+ {-session_id}
+ {-section_id}
+} {
+
+} {
+
+ set section_checks [db_list_of_lists section_checks { }]
+
+ foreach check $section_checks {
+ set check_sql [lindex $check 1]
+ set perform [db_string check_sql $check_sql -default 0]
+ if {[lindex $check 2] == "t"} {
+ if {$perform == 1} {
+ as::assessment::check::action_exec -inter_item_check_id [lindex $check 0] -session_id $session_id
+ }
+ }
+ }
+}
+
+
ad_proc -public as::assessment::check::confirm_display {
{-check_id}
{-index}
@@ -611,4 +633,4 @@
foreach session_id $sessions {
as::assessment::check::eval_single_check -session_id $session_id -assessment_id $assessment_id -inter_item_check_id $inter_item_check_id
}
-}
\ No newline at end of file
+}
Index: openacs-4/packages/assessment/tcl/as-checks-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-checks-procs.xql,v
diff -u -r1.19.2.1 -r1.19.2.2
--- openacs-4/packages/assessment/tcl/as-checks-procs.xql 10 Jun 2005 18:53:30 -0000 1.19.2.1
+++ openacs-4/packages/assessment/tcl/as-checks-procs.xql 26 Jul 2005 11:43:15 -0000 1.19.2.2
@@ -272,6 +272,11 @@
select * from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='m' and c.assessment_id=:assessment_id order by am.order_by
+
+
+ select c.inter_item_check_id,c.check_sql,action_p from as_inter_item_checks c,as_action_map am where c.inter_item_check_id=am.inter_item_check_id and am.action_perform='or' and section_id_from=:section_id order by am.order_by
+
+
select * from as_inter_item_checks where inter_item_check_id=:check_id
Index: openacs-4/packages/assessment/www/assessment.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment.tcl,v
diff -u -r1.47.2.4 -r1.47.2.5
--- openacs-4/packages/assessment/www/assessment.tcl 4 Jul 2005 15:02:24 -0000 1.47.2.4
+++ openacs-4/packages/assessment/www/assessment.tcl 26 Jul 2005 11:43:15 -0000 1.47.2.5
@@ -375,6 +375,10 @@
}
}
+ad_form -extend -name show_item_form -on_request {
+ as::assessment::check::eval_or_checks -session_id $session_id -section_id $section_id
+}
+
if {$display(submit_answer_p) != "t"} {
# process multiple submit
set template "assessment-section-submit"
Index: openacs-4/packages/assessment/www/asm-admin/action-params.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/action-params.tcl,v
diff -u -r1.5.2.1 -r1.5.2.2
--- openacs-4/packages/assessment/www/asm-admin/action-params.tcl 10 Jun 2005 18:53:31 -0000 1.5.2.1
+++ openacs-4/packages/assessment/www/asm-admin/action-params.tcl 26 Jul 2005 11:43:15 -0000 1.5.2.2
@@ -69,7 +69,7 @@
db_foreach get_params {} {
set choices [list]
if { $type == "n" } {
- if { $action_perform == "aa" || $action_perform == "m"} {
+ if { $action_perform == "aa" || $action_perform == "m" || $action_perform == "or"} {
set choices [db_list_of_lists choices {}]
} else {
set choices [db_list_of_lists prev_choices {}]
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.5.2.1 -r1.5.2.2
--- openacs-4/packages/assessment/www/asm-admin/action-select.tcl 10 Jun 2005 18:53:31 -0000 1.5.2.1
+++ openacs-4/packages/assessment/www/asm-admin/action-select.tcl 26 Jul 2005 11:43:15 -0000 1.5.2.2
@@ -34,7 +34,7 @@
set context [list [list index [_ assessment.admin]] [list "one-a?assessment_id=$assessment_id" $title] [_ assessment.action_select]]
set title "[_ assessment.action_select]"
-set options [list [list "[_ assessment.immediately]" "i"] [list "[_ assessment.at_the_end]" "aa"] [list "[_ assessment.manually]" "m"]]
+set options [list [list "[_ assessment.immediately]" "i"] [list "[_ assessment.at_the_end]" "aa"] [list "[_ assessment.manually]" "m"] [list "On Request" "or"]]
set actions_list [db_list_of_lists get_actions {} ]
set return_url ""
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/add-edit-section-check-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/add-edit-section-check-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/add-edit-section-check.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/add-edit-section-check.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/assessment/www/asm-admin/add-edit-section-check.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/assessment/www/asm-admin/checks-admin.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/checks-admin.adp,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/assessment/www/asm-admin/checks-admin.adp 7 Apr 2005 21:45:23 -0000 1.2
+++ openacs-4/packages/assessment/www/asm-admin/checks-admin.adp 26 Jul 2005 11:43:15 -0000 1.2.2.1
@@ -2,6 +2,11 @@
@title@ #assessment.Administration#
@context;noquote@
+On request
+
+
+
+
#assessment.after_this_asm#
Index: openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl,v
diff -u -r1.8 -r1.8.2.1
--- openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl 11 Apr 2005 19:08:59 -0000 1.8
+++ openacs-4/packages/assessment/www/asm-admin/checks-admin.tcl 26 Jul 2005 11:43:15 -0000 1.8.2.1
@@ -47,6 +47,7 @@
append check_list ")"
}
+db_multirow or_checks get_or_checks {}
db_multirow aa_checks get_aa_checks {}
db_multirow i_checks get_i_checks {}
db_multirow branches get_branches {}
@@ -64,6 +65,50 @@
template::list::create \
+ -name or_checks \
+ -multirow or_checks \
+ -key inter_item_check_id \
+ -bulk_actions {
+ "\#assessment.Delete\#" "confirm-delete" "\#assessment.delete_checked\#"
+ }\
+ -bulk_action_method post \
+ -bulk_action_export_vars {
+ assessment_id
+ section_id
+ {type_check t}
+ item_id_check
+ by_item_p
+ }\
+ -row_pretty_plural "[_ assessment.Assessment] [_ assessment.triggers]" \
+ -elements {
+ name {
+ label "[_ assessment.Name]"
+ display_template {
+ @or_checks.name@
+ }
+ }
+ action_name {
+ label "[_ assessment.action_to_perform]"
+ }
+ counter {
+ display_template {
+
+
+
+
+
+
+
+
+ #assessment.notify_user#
+
+ }
+
+ }
+ }
+
+
+template::list::create \
-name aa_checks \
-multirow aa_checks \
-key inter_item_check_id \
Index: openacs-4/packages/assessment/www/asm-admin/checks-admin.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/checks-admin.xql,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/assessment/www/asm-admin/checks-admin.xql 2 Feb 2005 16:54:12 -0000 1.2
+++ openacs-4/packages/assessment/www/asm-admin/checks-admin.xql 26 Jul 2005 11:43:15 -0000 1.2.2.1
@@ -1,6 +1,12 @@
+
+
+ select c.check_sql,am.action_perform,c.inter_item_check_id,c.name,a.name as action_name, am.order_by,c.section_id_from from as_inter_item_checks c,as_actions a, as_action_map am where am.inter_item_check_id = c.inter_item_check_id and am.action_id=a.action_id and c.section_id_from =:section_id and am.action_perform = 'or' and c.action_p = 't'and c.assessment_id=:assessment_id $check_list order by order_by
+
+
+
select c.check_sql,am.action_perform,c.inter_item_check_id,c.name,a.name as action_name, am.order_by,c.section_id_from from as_inter_item_checks c,as_actions a, as_action_map am where am.inter_item_check_id = c.inter_item_check_id and am.action_id=a.action_id and c.section_id_from =:section_id and am.action_perform = 'aa' and c.action_p = 't'and c.assessment_id=:assessment_id $check_list order by order_by
Index: openacs-4/packages/assessment/www/asm-admin/one-a.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/one-a.adp,v
diff -u -r1.11.2.7 -r1.11.2.8
--- openacs-4/packages/assessment/www/asm-admin/one-a.adp 20 Jul 2005 17:08:12 -0000 1.11.2.7
+++ openacs-4/packages/assessment/www/asm-admin/one-a.adp 26 Jul 2005 11:43:15 -0000 1.11.2.8
@@ -125,7 +125,9 @@
#assessment.admin_triggers#
+#assessment.add_section_trigger#
+
(#assessment.max_time# @sections.max_time_to_complete@)
(@sections.points@ #assessment.points#)