Index: openacs-4/contrib/packages/simulation/lib/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/tasks.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/simulation/lib/tasks.tcl 19 Dec 2003 14:22:53 -0000 1.3 +++ openacs-4/contrib/packages/simulation/lib/tasks.tcl 19 Dec 2003 14:35:16 -0000 1.4 @@ -67,6 +67,7 @@ and sc.sim_case_id = wc.object_id and w.workflow_id = wc.workflow_id [template::list::filter_where_clauses -and -name "tasks"] + order by wa.sort_order " { set task_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/task-detail" { enabled_action_id }] } Index: openacs-4/contrib/packages/simulation/www/simplay/control-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/control-bar.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/simulation/www/simplay/control-bar.tcl 19 Dec 2003 14:00:39 -0000 1.5 +++ openacs-4/contrib/packages/simulation/www/simplay/control-bar.tcl 19 Dec 2003 14:35:16 -0000 1.6 @@ -42,6 +42,7 @@ and wcrmp.case_id = wcea.case_id and wcrmp.role_id = wa.assigned_role and wa.action_id = wcea.action_id + and wcea.enabled_state = 'enabled' [ad_decode $case_id "" "" "and wcea.case_id = :case_id"] "] 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.4 -r1.5 --- openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 19 Dec 2003 14:22:53 -0000 1.4 +++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 19 Dec 2003 14:35:16 -0000 1.5 @@ -67,6 +67,21 @@ append documents "$object_title
" } - set recipient_name [simulation::role::get_element -role_id $action(recipient) -element pretty_name] - set sender_name [simulation::role::get_element -role_id $action(assigned_role_id) -element pretty_name] + if { ![empty_string_p $action(recipient)] } { + set recipient_name [simulation::role::get_element -role_id $action(recipient) -element pretty_name] + } + if { ![empty_string_p $action(assigned_role_id)] } { + set sender_name [simulation::role::get_element -role_id $action(assigned_role_id) -element pretty_name] + } +} -on_submit { + + + workflow::case::action::execute \ + -case_id $case_id \ + -action_id $action_id \ + -comment [template::util::richtext::get_property $body "content"] \ + -comment_mime_type [template::util::richtext::get_property $body "mime_type"] + + ad_returnredirect [export_vars -base tasks { case_id }] + ad_script_abort } Index: openacs-4/packages/simulation/lib/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/tasks.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/simulation/lib/tasks.tcl 19 Dec 2003 14:22:53 -0000 1.3 +++ openacs-4/packages/simulation/lib/tasks.tcl 19 Dec 2003 14:35:16 -0000 1.4 @@ -67,6 +67,7 @@ and sc.sim_case_id = wc.object_id and w.workflow_id = wc.workflow_id [template::list::filter_where_clauses -and -name "tasks"] + order by wa.sort_order " { set task_url [export_vars -base "[apm_package_url_from_id $package_id]simplay/task-detail" { enabled_action_id }] } Index: openacs-4/packages/simulation/www/simplay/control-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/control-bar.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/www/simplay/control-bar.tcl 19 Dec 2003 14:00:39 -0000 1.5 +++ openacs-4/packages/simulation/www/simplay/control-bar.tcl 19 Dec 2003 14:35:16 -0000 1.6 @@ -42,6 +42,7 @@ and wcrmp.case_id = wcea.case_id and wcrmp.role_id = wa.assigned_role and wa.action_id = wcea.action_id + and wcea.enabled_state = 'enabled' [ad_decode $case_id "" "" "and wcea.case_id = :case_id"] "] 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.4 -r1.5 --- openacs-4/packages/simulation/www/simplay/task-detail.tcl 19 Dec 2003 14:22:53 -0000 1.4 +++ openacs-4/packages/simulation/www/simplay/task-detail.tcl 19 Dec 2003 14:35:16 -0000 1.5 @@ -67,6 +67,21 @@ append documents "$object_title
" } - set recipient_name [simulation::role::get_element -role_id $action(recipient) -element pretty_name] - set sender_name [simulation::role::get_element -role_id $action(assigned_role_id) -element pretty_name] + if { ![empty_string_p $action(recipient)] } { + set recipient_name [simulation::role::get_element -role_id $action(recipient) -element pretty_name] + } + if { ![empty_string_p $action(assigned_role_id)] } { + set sender_name [simulation::role::get_element -role_id $action(assigned_role_id) -element pretty_name] + } +} -on_submit { + + + workflow::case::action::execute \ + -case_id $case_id \ + -action_id $action_id \ + -comment [template::util::richtext::get_property $body "content"] \ + -comment_mime_type [template::util::richtext::get_property $body "mime_type"] + + ad_returnredirect [export_vars -base tasks { case_id }] + ad_script_abort }