Index: openacs-4/packages/rules/www/add-action.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/add-action.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/rules/www/add-action.adp 8 Dec 2004 21:21:25 -0000 1.3
+++ openacs-4/packages/rules/www/add-action.adp 9 Dec 2004 20:11:25 -0000 1.4
@@ -7,5 +7,6 @@
if (destination) location.href = destination;
}
+
@context@
\ No newline at end of file
Index: openacs-4/packages/rules/www/add-rule.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/add-rule.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/rules/www/add-rule.tcl 8 Dec 2004 22:19:49 -0000 1.3
+++ openacs-4/packages/rules/www/add-rule.tcl 9 Dec 2004 20:11:25 -0000 1.4
@@ -6,6 +6,7 @@
Add new rule related to an Assessment
} {
rule_id:optional
+ return_url:optional
} -properties {
context
}
@@ -15,7 +16,7 @@
set context [list "Add rule"]
set assessments [rules::rule::get_assessments]
-ad_form -name add_rule -form {
+ad_form -name add_rule -export { return_url } -form {
rule_id:key
{ rule_name:text(text)
{label "Rule Name"}
@@ -37,5 +38,6 @@
} -edit_data {
db_dml update_rule { update rules set rule_name=:rule_name, active_p=:active_p, asm_id=:asm_id where rule_id=:rule_id }
} -after_submit {
- ad_returnredirect "index"
+
+ ad_returnredirect $return_url
}
Index: openacs-4/packages/rules/www/add-trigger-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/add-trigger-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rules/www/add-trigger-oracle.xql 3 Dec 2004 17:56:02 -0000 1.1
+++ openacs-4/packages/rules/www/add-trigger-oracle.xql 9 Dec 2004 20:11:25 -0000 1.2
@@ -4,10 +4,12 @@
oracle8.1.6
- select question_id as qs_id, question_text as description
- from survey_questions
- where section_id = (select section_id from survey_sections where
- survey_id=(select asm_id from rules where rule_id=:rule_id))
+ select sq.question_id as qs_id, sq.question_text as description
+ from survey_questions sq where sq.section_id in (select section_id from survey_sections where
+ survey_id = (select asm_id as survey_id from rules where rule_id=:rule_id)) and sq.question_id not
+ in (select qs_id from rules_triggers where rule_id=:rule_id) and (select
+ count(choice_id) from survey_question_choices where question_id = sq.question_id) > 0
+
Index: openacs-4/packages/rules/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/index.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/rules/www/index.adp 8 Dec 2004 21:21:25 -0000 1.4
+++ openacs-4/packages/rules/www/index.adp 9 Dec 2004 20:11:25 -0000 1.5
@@ -3,8 +3,10 @@
- Add New Rule Waiting Lists
+ Add New Rule Waiting
+ Lists Add new Questionnaire
|
Index: openacs-4/packages/rules/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/index.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/rules/www/index.tcl 8 Dec 2004 22:20:13 -0000 1.3
+++ openacs-4/packages/rules/www/index.tcl 9 Dec 2004 20:11:25 -0000 1.4
@@ -24,13 +24,13 @@
label "Rule Name"
display_template
{
- @all_rules.rule_name@
+ @all_rules.rule_name@
}
}
asm_name {
- label "Related Questionnarie"
+ label "Related Questionnaire"
link_url_eval {../survey/admin/one?survey_id=$asm_id}
}
active_p {
@@ -47,7 +47,7 @@
rule_id {
label "Notifications"
display_template {
- Notify user
+ Notify user
}
}
Index: openacs-4/packages/rules/www/one-rule-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/one-rule-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/rules/www/one-rule-oracle.xql 3 Dec 2004 17:57:03 -0000 1.1
+++ openacs-4/packages/rules/www/one-rule-oracle.xql 9 Dec 2004 20:11:25 -0000 1.2
@@ -23,10 +23,13 @@
- select question_id as qs_id, question_text as description
- from survey_questions
- where section_id = (select section_id from survey_sections where
- survey_id=(select asm_id from rules where rule_id=:rule_id))
+ select sq.question_id as qs_id, sq.question_text as description
+ from survey_questions sq
+ where sq.section_id = (select section_id from survey_sections where
+ survey_id=(select asm_id from rules where rule_id=:rule_id)) and sq.question_id not
+ in (select qs_id from rules_triggers where rule_id=:rule_id) and (select
+ count(choice_id) from survey_question_choices where question_id =
+ sq.question_id) > 0
Index: openacs-4/packages/rules/www/one-rule.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/one-rule.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/rules/www/one-rule.adp 8 Dec 2004 22:30:56 -0000 1.3
+++ openacs-4/packages/rules/www/one-rule.adp 9 Dec 2004 20:11:25 -0000 1.4
@@ -33,7 +33,7 @@
-@rule_name@
+@rule_name@
Related Questionnarie: @assessment_related@
State:@state@
Index: openacs-4/packages/rules/www/one-rule.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/rules/www/Attic/one-rule.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/rules/www/one-rule.tcl 8 Dec 2004 22:32:01 -0000 1.5
+++ openacs-4/packages/rules/www/one-rule.tcl 9 Dec 2004 20:11:25 -0000 1.6
@@ -48,10 +48,11 @@