Index: openacs-4/contrib/packages/simulation/tcl/template-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/tcl/Attic/template-procs.tcl,v diff -u -r1.31 -r1.32 --- openacs-4/contrib/packages/simulation/tcl/template-procs.tcl 6 Jan 2004 16:26:37 -0000 1.31 +++ openacs-4/contrib/packages/simulation/tcl/template-procs.tcl 6 Jan 2004 18:36:27 -0000 1.32 @@ -755,7 +755,9 @@
  • none
  • roles_complete
  • tasks_complete -
  • casting_begun +
  • settings_complete +
  • enrollment_complete +
  • participants_complete } { simulation::template::get -workflow_id $workflow_id -array sim_template @@ -775,7 +777,7 @@ and character_id is null }] if { $role_empty_count == 0 } { - set state "roles" + set state "roles_complete" # 2. Tasks set prop_empty_count [db_string prop_empty_count { @@ -787,13 +789,26 @@ }] if { $prop_empty_count == 0 } { - set state "tasks" + set state "tasks_complete" + + if { ![empty_string_p $sim_template(case_start)] && ![empty_string_p $sim_template(send_start_note_date)] } { + set state "settings_complete" + + if { ![empty_string_p $sim_template(enroll_type)] && + (![string equal $sim_template(enroll_type) "open"] || + (![empty_string_p $sim_template(enroll_start)] && ![empty_string_p $sim_template(enroll_end)])) } { + set state "enrollment_complete" + + set num_parties [db_string num_parties { select count(*) from sim_party_sim_map where simulation_id = :workflow_id }] + + if { $num_parties > 0 } { + set state "participants_complete" + } + } + } } } } - casting_sim { - set state "casting_begun" - } } return $state