Index: openacs-4/contrib/packages/simulation/lib/sim-template-tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/sim-template-tasks.tcl,v
diff -u -r1.32 -r1.33
--- openacs-4/contrib/packages/simulation/lib/sim-template-tasks.tcl 23 Jan 2004 11:16:15 -0000 1.32
+++ openacs-4/contrib/packages/simulation/lib/sim-template-tasks.tcl 23 Jan 2004 13:18:43 -0000 1.33
@@ -77,22 +77,9 @@
link_url_col assigned_role_edit_url
}
-lappend elements recipient_count {
- label "
Number of recipients"
- html { align center } \
-}
-
-lappend elements task_type {
+lappend elements trigger_type {
label "
Type"
- display_template {
-
- @tasks.child_workflow_pretty@
-
-
- Message
- Document
-
- }
+ display_eval {[string totitle $trigger_type]}
}
lappend elements delete {
@@ -162,7 +149,7 @@
#-------------------------------------------------------------
set extend [list]
-lappend extend edit_url view_url delete_url assigned_role_edit_url child_workflow_url up_url down_url
+lappend extend edit_url view_url delete_url assigned_role_edit_url up_url down_url
foreach state_id $states {
lappend extend state_$state_id
@@ -206,17 +193,10 @@
(select pretty_name
from workflow_fsm_states
where state_id = wfa.new_state) as new_state_pretty,
- wa.child_workflow_id,
- (select pretty_name
- from workflows
- where workflow_id = wa.child_workflow_id) as child_workflow_pretty
+ wa.trigger_type
from workflow_actions wa left outer join
workflow_fsm_actions wfa on (wfa.action_id = wa.action_id)
where wa.workflow_id = :workflow_id
- and not exists (select 1
- from workflow_initial_action ia
- where ia.workflow_id = wa.workflow_id
- and ia.action_id = wa.action_id)
order by wa.sort_order
" {
incr counter
@@ -228,14 +208,6 @@
set assigned_role_edit_url \
[export_vars -base "[apm_package_url_from_id $package_id]simbuild/role-edit" { { role_id $assigned_role } }]
- set child_workflow_url \
- [export_vars -base "[apm_package_url_from_id $package_id]simbuild/template-edit" { { workflow_id $child_workflow_id } }]
-
- if { ![empty_string_p $child_workflow_id] } {
- # No assignee when there's a child workflow
- set assigned_name {}
- }
-
foreach state_id $states {
if { [info exists enabled_in_state($action_id,$state_id)] } {
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/packages/simulation/www/simbuild/initial-action-set.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/simulation/www/simbuild/task-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simbuild/Attic/task-edit.tcl,v
diff -u -r1.26 -r1.27
--- openacs-4/contrib/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 11:16:15 -0000 1.26
+++ openacs-4/contrib/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 13:18:43 -0000 1.27
@@ -29,16 +29,14 @@
set workflow_id $task_array(workflow_id)
- if { ![empty_string_p $task_array(child_workflow_id)] } {
- set task_type "workflow"
+ # Message tasks have a recipient; upload document tasks ("normal") have no recipient
+ if { ![empty_string_p $task_array(recipient_roles)] } {
+ set task_type "message"
} else {
- # Message tasks have a recipient; upload document tasks ("normal") have no recipient
- if { ![empty_string_p $task_array(recipient_roles)] } {
- set task_type "message"
- } else {
- set task_type "normal"
- }
+ set task_type "normal"
}
+
+ set trigger_type $task_array(trigger_type)
}
workflow::get -workflow_id $workflow_id -array sim_template_array
@@ -59,6 +57,22 @@
set child_workflow_options [simulation::template::get_options]
+#---------------------------------------------------------------------
+# Logic to determine the current values of a few elements
+#---------------------------------------------------------------------
+
+if { ![empty_string_p [ns_queryget trigger_type]] } {
+ set trigger_type [ns_queryget trigger_type]
+} elseif { ![exists_and_not_null trigger_type] && [ad_form_new_p -key action_id] } {
+ set trigger_type "user"
+}
+if { ![empty_string_p [ns_queryget task_type]] } {
+ set task_type [ns_queryget task_type]
+} elseif { ![exists_and_not_null task_type] && [ad_form_new_p -key action_id] } {
+ set task_type "message"
+}
+
+
######################################################################
#
# task
@@ -91,50 +105,54 @@
{html {size 50}}
{help_text "What the task will appear like in the case log. Usually the past tense of the task name, e.g. 'Close' becomes 'Closed'."}
}
+ {trigger_type:text(radio)
+ {label "Trigger Type"}
+ {options {
+ { "User task" user }
+ { "Automatic" auto }
+ { "Time" time }
+ { "Message" message }
+ { "Initial action" init }
+ { "Workflow" workflow }
+ { "Parallel" parallel }
+ { "Dynamic parallel" dynamic }
+ }}
+ {html {onChange "javascript:acs_FormRefresh('task');"}}
+ }
+ }
+if { [string equal $trigger_type "user"] } {
+ ad_form -extend -name task -form {
{task_type:text(radio)
{label "Task is complete when"}
{options {
{ "Assignee sends message to recipient" message }
{ "Assignee adds document to portfolio" normal }
- { "Child workflow is complete" workflow }
}}
{html {onChange "javascript:acs_FormRefresh('task');"}}
}
{assigned_role:text(select),optional
{label "Assignee"}
{options $role_options_with_null}
}
+ }
+} else {
+ ad_form -extend -name task -form {
+ {task_type:text(hidden)}
+ {assigned_role:text(hidden),optional}
+ }
+}
+
+if { [string equal $trigger_type "user"] && [string equal $task_type "message"] } {
+ ad_form -extend -name task -form {
{recipient_roles:text(checkbox),optional,multiple
{label "Recipients"}
{options $role_options}
}
- {child_workflow_id:integer(select),optional
- {label "Child workflow"}
- {options $child_workflow_options}
- {html {onChange "javascript:acs_FormRefresh('task');"}}
- }
}
-
-if { [string equal [element get_value task task_type] "workflow"] || \
- ([empty_string_p [element get_value task task_type]] && [exists_and_equal task_type "workflow"]) } {
- set child_workflow_id [element get_value task child_workflow_id]
- if { [empty_string_p $child_workflow_id] } {
- if { [exists_and_not_null task_array(child_workflow_id)] } {
- set child_workflow_id $task_array(child_workflow_id)
- } else {
- set child_workflow_id [lindex [lindex $child_workflow_options 0] 1]
- }
+} else {
+ ad_form -extend -name task -form {
+ {recipient_roles:text(hidden),optional}
}
- foreach role_id [workflow::get_roles -workflow_id $child_workflow_id] {
- array unset role_array
- workflow::role::get -role_id $role_id -array role_array
- set role__${role_array(short_name)}__pretty_name $role_array(pretty_name)
- ad_form -extend -name task -form \
- [list [list parent_role__${role_array(short_name)}:text(select),optional \
- [list label "\$role__${role_array(short_name)}__pretty_name Role"] \
- {options $role_options} \
- ]]
- }
}
ad_form -extend -name task -form {
@@ -175,62 +193,23 @@
permission::require_write_permission -object_id $workflow_id
set description [template::util::richtext::create $task_array(description) $task_array(description_mime_type)]
+ # Removed: child_workflow_id
foreach elm {
pretty_name pretty_past_tense new_state_id
assigned_role recipient_roles
- attachment_num
- child_workflow_id
+ attachment_num trigger_type
} {
set $elm $task_array($elm)
}
- switch $task_type {
- message {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget checkbox
- element set_properties task child_workflow_id -widget hidden
- }
- normal {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget hidden
- }
- workflow {
- element set_properties task assigned_role -widget hidden
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget select
-
- foreach { child_short_name elm } $task_array(child_role_map) {
- set parent_role__${child_short_name} [lindex $elm 0]
- }
- }
- }
} -new_request {
permission::require_write_permission -object_id $workflow_id
set attachment_num 0
+ set trigger_type "user"
set task_type "message"
- element set_properties task child_workflow_id -widget hidden
} -on_refresh {
- switch $task_type {
- message {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget checkbox
- element set_properties task child_workflow_id -widget hidden
- }
- normal {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget hidden
- }
- workflow {
- element set_properties task assigned_role -widget hidden
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget select
- }
- }
-
set focus {}
} -on_submit {
@@ -267,11 +246,11 @@
set pretty_past_tense $pretty_name
}
+ # Removed: child_workflow_id child_role_map
foreach elm {
pretty_name pretty_past_tense assigned_role description description_mime_type
new_state_id
- recipient_roles attachment_num
- child_workflow_id child_role_map
+ recipient_roles attachment_num trigger_type
} {
set row($elm) [set $elm]
}
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-new.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-new.tcl 12 Jan 2004 13:24:57 -0000 1.5
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-new.tcl 23 Jan 2004 13:18:43 -0000 1.6
@@ -49,11 +49,9 @@
from workflow_roles
where workflow_id = w.workflow_id) as number_of_roles,
(select count(*)
- from workflow_actions wa
+ from workflow_actions wa
where wa.workflow_id = w.workflow_id
- and not exists (select 1
- from workflow_initial_action
- where action_id = wa.action_id)) as number_of_tasks
+ and wa.trigger_type = 'user') as number_of_tasks
from sim_simulations ss,
workflows w
where ss.simulation_id = w.workflow_id
Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-participants.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl 22 Jan 2004 14:08:39 -0000 1.9
+++ openacs-4/contrib/packages/simulation/www/siminst/simulation-participants.tcl 23 Jan 2004 13:18:43 -0000 1.10
@@ -4,6 +4,8 @@
workflow_id:integer
}
+# TODO (.5h): Dynamically change "Neither invited nor mandatory" to "Can self-enroll", or "Not participating" depending on the enrollment_type (open/closed)
+
permission::require_write_permission -object_id $workflow_id
simulation::template::get -workflow_id $workflow_id -array sim_template
Index: openacs-4/contrib/packages/simulation/www/simplay/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/index.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/contrib/packages/simulation/www/simplay/index.tcl 15 Jan 2004 13:19:18 -0000 1.7
+++ openacs-4/contrib/packages/simulation/www/simplay/index.tcl 23 Jan 2004 13:18:44 -0000 1.8
@@ -22,7 +22,9 @@
}]
if { [llength $case_list] == 1 } {
- set first_item [lindex $case_list 0]
- ad_returnredirect [export_vars -base case { {case_id {[lindex $first_item 0]}} {role_id {[lindex $first_item 1]}} }]
- ad_script_abort
+ set case_id [lindex [lindex $case_list 0] 0]
+ set role_id [lindex [lindex $case_list 0] 1]
+# TODO REMOVE
+# ad_returnredirect [export_vars -base case { case_id role_id }]
+# ad_script_abort
}
Index: openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/task-detail.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 23 Jan 2004 11:16:15 -0000 1.14
+++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 23 Jan 2004 13:18:44 -0000 1.15
@@ -96,25 +96,23 @@
set body_mime_type [template::util::richtext::get_property "format" $body]
db_transaction {
-
- workflow::case::action::execute \
- -case_id $case_id \
- -action_id $action_id \
- -comment $body_text \
- -comment_mime_type $body_mime_type
-
- foreach recipient_id $action(recipients) {
- simulation::message::new \
- -from_role_id $action(assigned_role_id) \
- -to_role_id $recipient_id \
- -case_id $case_id \
- -subject $subject \
- -body $body_text \
- -body_mime_type $body_mime_type \
- -attachments $attachments
+ workflow::case::action::execute \
+ -enabled_action_id $enabled_action_id \
+ -comment $body_text \
+ -comment_mime_type $body_mime_type
+
+ foreach recipient_id $action(recipients) {
+ simulation::message::new \
+ -from_role_id $action(assigned_role_id) \
+ -to_role_id $recipient_id \
+ -case_id $case_id \
+ -subject $subject \
+ -body $body_text \
+ -body_mime_type $body_mime_type \
+ -attachments $attachments
}
}
-
+
ad_returnredirect [export_vars -base tasks { case_id role_id }]
ad_script_abort
}
Index: openacs-4/packages/simulation/lib/sim-template-tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/sim-template-tasks.tcl,v
diff -u -r1.32 -r1.33
--- openacs-4/packages/simulation/lib/sim-template-tasks.tcl 23 Jan 2004 11:16:15 -0000 1.32
+++ openacs-4/packages/simulation/lib/sim-template-tasks.tcl 23 Jan 2004 13:18:43 -0000 1.33
@@ -77,22 +77,9 @@
link_url_col assigned_role_edit_url
}
-lappend elements recipient_count {
- label "
Number of recipients"
- html { align center } \
-}
-
-lappend elements task_type {
+lappend elements trigger_type {
label "
Type"
- display_template {
-
- @tasks.child_workflow_pretty@
-
-
- Message
- Document
-
- }
+ display_eval {[string totitle $trigger_type]}
}
lappend elements delete {
@@ -162,7 +149,7 @@
#-------------------------------------------------------------
set extend [list]
-lappend extend edit_url view_url delete_url assigned_role_edit_url child_workflow_url up_url down_url
+lappend extend edit_url view_url delete_url assigned_role_edit_url up_url down_url
foreach state_id $states {
lappend extend state_$state_id
@@ -206,17 +193,10 @@
(select pretty_name
from workflow_fsm_states
where state_id = wfa.new_state) as new_state_pretty,
- wa.child_workflow_id,
- (select pretty_name
- from workflows
- where workflow_id = wa.child_workflow_id) as child_workflow_pretty
+ wa.trigger_type
from workflow_actions wa left outer join
workflow_fsm_actions wfa on (wfa.action_id = wa.action_id)
where wa.workflow_id = :workflow_id
- and not exists (select 1
- from workflow_initial_action ia
- where ia.workflow_id = wa.workflow_id
- and ia.action_id = wa.action_id)
order by wa.sort_order
" {
incr counter
@@ -228,14 +208,6 @@
set assigned_role_edit_url \
[export_vars -base "[apm_package_url_from_id $package_id]simbuild/role-edit" { { role_id $assigned_role } }]
- set child_workflow_url \
- [export_vars -base "[apm_package_url_from_id $package_id]simbuild/template-edit" { { workflow_id $child_workflow_id } }]
-
- if { ![empty_string_p $child_workflow_id] } {
- # No assignee when there's a child workflow
- set assigned_name {}
- }
-
foreach state_id $states {
if { [info exists enabled_in_state($action_id,$state_id)] } {
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/simulation/www/simbuild/initial-action-set.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/simulation/www/simbuild/task-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/task-edit.tcl,v
diff -u -r1.26 -r1.27
--- openacs-4/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 11:16:15 -0000 1.26
+++ openacs-4/packages/simulation/www/simbuild/task-edit.tcl 23 Jan 2004 13:18:43 -0000 1.27
@@ -29,16 +29,14 @@
set workflow_id $task_array(workflow_id)
- if { ![empty_string_p $task_array(child_workflow_id)] } {
- set task_type "workflow"
+ # Message tasks have a recipient; upload document tasks ("normal") have no recipient
+ if { ![empty_string_p $task_array(recipient_roles)] } {
+ set task_type "message"
} else {
- # Message tasks have a recipient; upload document tasks ("normal") have no recipient
- if { ![empty_string_p $task_array(recipient_roles)] } {
- set task_type "message"
- } else {
- set task_type "normal"
- }
+ set task_type "normal"
}
+
+ set trigger_type $task_array(trigger_type)
}
workflow::get -workflow_id $workflow_id -array sim_template_array
@@ -59,6 +57,22 @@
set child_workflow_options [simulation::template::get_options]
+#---------------------------------------------------------------------
+# Logic to determine the current values of a few elements
+#---------------------------------------------------------------------
+
+if { ![empty_string_p [ns_queryget trigger_type]] } {
+ set trigger_type [ns_queryget trigger_type]
+} elseif { ![exists_and_not_null trigger_type] && [ad_form_new_p -key action_id] } {
+ set trigger_type "user"
+}
+if { ![empty_string_p [ns_queryget task_type]] } {
+ set task_type [ns_queryget task_type]
+} elseif { ![exists_and_not_null task_type] && [ad_form_new_p -key action_id] } {
+ set task_type "message"
+}
+
+
######################################################################
#
# task
@@ -91,50 +105,54 @@
{html {size 50}}
{help_text "What the task will appear like in the case log. Usually the past tense of the task name, e.g. 'Close' becomes 'Closed'."}
}
+ {trigger_type:text(radio)
+ {label "Trigger Type"}
+ {options {
+ { "User task" user }
+ { "Automatic" auto }
+ { "Time" time }
+ { "Message" message }
+ { "Initial action" init }
+ { "Workflow" workflow }
+ { "Parallel" parallel }
+ { "Dynamic parallel" dynamic }
+ }}
+ {html {onChange "javascript:acs_FormRefresh('task');"}}
+ }
+ }
+if { [string equal $trigger_type "user"] } {
+ ad_form -extend -name task -form {
{task_type:text(radio)
{label "Task is complete when"}
{options {
{ "Assignee sends message to recipient" message }
{ "Assignee adds document to portfolio" normal }
- { "Child workflow is complete" workflow }
}}
{html {onChange "javascript:acs_FormRefresh('task');"}}
}
{assigned_role:text(select),optional
{label "Assignee"}
{options $role_options_with_null}
}
+ }
+} else {
+ ad_form -extend -name task -form {
+ {task_type:text(hidden)}
+ {assigned_role:text(hidden),optional}
+ }
+}
+
+if { [string equal $trigger_type "user"] && [string equal $task_type "message"] } {
+ ad_form -extend -name task -form {
{recipient_roles:text(checkbox),optional,multiple
{label "Recipients"}
{options $role_options}
}
- {child_workflow_id:integer(select),optional
- {label "Child workflow"}
- {options $child_workflow_options}
- {html {onChange "javascript:acs_FormRefresh('task');"}}
- }
}
-
-if { [string equal [element get_value task task_type] "workflow"] || \
- ([empty_string_p [element get_value task task_type]] && [exists_and_equal task_type "workflow"]) } {
- set child_workflow_id [element get_value task child_workflow_id]
- if { [empty_string_p $child_workflow_id] } {
- if { [exists_and_not_null task_array(child_workflow_id)] } {
- set child_workflow_id $task_array(child_workflow_id)
- } else {
- set child_workflow_id [lindex [lindex $child_workflow_options 0] 1]
- }
+} else {
+ ad_form -extend -name task -form {
+ {recipient_roles:text(hidden),optional}
}
- foreach role_id [workflow::get_roles -workflow_id $child_workflow_id] {
- array unset role_array
- workflow::role::get -role_id $role_id -array role_array
- set role__${role_array(short_name)}__pretty_name $role_array(pretty_name)
- ad_form -extend -name task -form \
- [list [list parent_role__${role_array(short_name)}:text(select),optional \
- [list label "\$role__${role_array(short_name)}__pretty_name Role"] \
- {options $role_options} \
- ]]
- }
}
ad_form -extend -name task -form {
@@ -175,62 +193,23 @@
permission::require_write_permission -object_id $workflow_id
set description [template::util::richtext::create $task_array(description) $task_array(description_mime_type)]
+ # Removed: child_workflow_id
foreach elm {
pretty_name pretty_past_tense new_state_id
assigned_role recipient_roles
- attachment_num
- child_workflow_id
+ attachment_num trigger_type
} {
set $elm $task_array($elm)
}
- switch $task_type {
- message {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget checkbox
- element set_properties task child_workflow_id -widget hidden
- }
- normal {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget hidden
- }
- workflow {
- element set_properties task assigned_role -widget hidden
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget select
-
- foreach { child_short_name elm } $task_array(child_role_map) {
- set parent_role__${child_short_name} [lindex $elm 0]
- }
- }
- }
} -new_request {
permission::require_write_permission -object_id $workflow_id
set attachment_num 0
+ set trigger_type "user"
set task_type "message"
- element set_properties task child_workflow_id -widget hidden
} -on_refresh {
- switch $task_type {
- message {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget checkbox
- element set_properties task child_workflow_id -widget hidden
- }
- normal {
- element set_properties task assigned_role -widget select
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget hidden
- }
- workflow {
- element set_properties task assigned_role -widget hidden
- element set_properties task recipient_roles -widget hidden
- element set_properties task child_workflow_id -widget select
- }
- }
-
set focus {}
} -on_submit {
@@ -267,11 +246,11 @@
set pretty_past_tense $pretty_name
}
+ # Removed: child_workflow_id child_role_map
foreach elm {
pretty_name pretty_past_tense assigned_role description description_mime_type
new_state_id
- recipient_roles attachment_num
- child_workflow_id child_role_map
+ recipient_roles attachment_num trigger_type
} {
set row($elm) [set $elm]
}
Index: openacs-4/packages/simulation/www/siminst/simulation-new.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-new.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/simulation/www/siminst/simulation-new.tcl 12 Jan 2004 13:24:57 -0000 1.5
+++ openacs-4/packages/simulation/www/siminst/simulation-new.tcl 23 Jan 2004 13:18:43 -0000 1.6
@@ -49,11 +49,9 @@
from workflow_roles
where workflow_id = w.workflow_id) as number_of_roles,
(select count(*)
- from workflow_actions wa
+ from workflow_actions wa
where wa.workflow_id = w.workflow_id
- and not exists (select 1
- from workflow_initial_action
- where action_id = wa.action_id)) as number_of_tasks
+ and wa.trigger_type = 'user') as number_of_tasks
from sim_simulations ss,
workflows w
where ss.simulation_id = w.workflow_id
Index: openacs-4/packages/simulation/www/siminst/simulation-participants.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-participants.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/simulation/www/siminst/simulation-participants.tcl 22 Jan 2004 14:08:39 -0000 1.9
+++ openacs-4/packages/simulation/www/siminst/simulation-participants.tcl 23 Jan 2004 13:18:43 -0000 1.10
@@ -4,6 +4,8 @@
workflow_id:integer
}
+# TODO (.5h): Dynamically change "Neither invited nor mandatory" to "Can self-enroll", or "Not participating" depending on the enrollment_type (open/closed)
+
permission::require_write_permission -object_id $workflow_id
simulation::template::get -workflow_id $workflow_id -array sim_template
Index: openacs-4/packages/simulation/www/simplay/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/index.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/simulation/www/simplay/index.tcl 15 Jan 2004 13:19:18 -0000 1.7
+++ openacs-4/packages/simulation/www/simplay/index.tcl 23 Jan 2004 13:18:44 -0000 1.8
@@ -22,7 +22,9 @@
}]
if { [llength $case_list] == 1 } {
- set first_item [lindex $case_list 0]
- ad_returnredirect [export_vars -base case { {case_id {[lindex $first_item 0]}} {role_id {[lindex $first_item 1]}} }]
- ad_script_abort
+ set case_id [lindex [lindex $case_list 0] 0]
+ set role_id [lindex [lindex $case_list 0] 1]
+# TODO REMOVE
+# ad_returnredirect [export_vars -base case { case_id role_id }]
+# ad_script_abort
}
Index: openacs-4/packages/simulation/www/simplay/task-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/task-detail.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/simulation/www/simplay/task-detail.tcl 23 Jan 2004 11:16:15 -0000 1.14
+++ openacs-4/packages/simulation/www/simplay/task-detail.tcl 23 Jan 2004 13:18:44 -0000 1.15
@@ -96,25 +96,23 @@
set body_mime_type [template::util::richtext::get_property "format" $body]
db_transaction {
-
- workflow::case::action::execute \
- -case_id $case_id \
- -action_id $action_id \
- -comment $body_text \
- -comment_mime_type $body_mime_type
-
- foreach recipient_id $action(recipients) {
- simulation::message::new \
- -from_role_id $action(assigned_role_id) \
- -to_role_id $recipient_id \
- -case_id $case_id \
- -subject $subject \
- -body $body_text \
- -body_mime_type $body_mime_type \
- -attachments $attachments
+ workflow::case::action::execute \
+ -enabled_action_id $enabled_action_id \
+ -comment $body_text \
+ -comment_mime_type $body_mime_type
+
+ foreach recipient_id $action(recipients) {
+ simulation::message::new \
+ -from_role_id $action(assigned_role_id) \
+ -to_role_id $recipient_id \
+ -case_id $case_id \
+ -subject $subject \
+ -body $body_text \
+ -body_mime_type $body_mime_type \
+ -attachments $attachments
}
}
-
+
ad_returnredirect [export_vars -base tasks { case_id role_id }]
ad_script_abort
}