Index: openacs-4/packages/simulation/www/siminst/wizard.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/wizard.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/simulation/www/siminst/wizard.tcl 6 Jan 2004 16:26:37 -0000 1.2 +++ openacs-4/packages/simulation/www/siminst/wizard.tcl 6 Jan 2004 18:36:28 -0000 1.3 @@ -11,45 +11,56 @@ wizard create siminst -steps { 1 -label "Roles" -url "map-characters" 2 -label "Tasks" -url "map-tasks" - 3 -label "Casting" -url "simulation-casting-2" - 4 -label "Groups" -url "simulation-casting-3" + 3 -label "Settings" -url "simulation-edit" + 4 -label "Enrollment" -url "simulation-enrollment" + 5 -label "Participants" -url "simulation-participants" + 6 -label "Casting" -url "simulation-casting-3" } -params { workflow_id } +array set title { + 1 "Assign Roles to Characters" + 2 "Populate Tasks" + 3 "Simulation Settings" + 4 "Define Enrollment" + 5 "Select Participants" + 6 "Define Casting Rules" +} + wizard set_param workflow_id $workflow_id set state [simulation::template::get_inst_state -workflow_id $workflow_id] +set lowest_available 1 switch $state { none { - set lowest_available 1 set progress 0 } roles_complete { - set lowest_available 1 set progress 1 } tasks_complete { - set lowest_available 1 set progress 2 } - casting_begun { - set lowest_available 3 - set progress 2 + settings_complete { + set progress 3 } + enrollment_complete { + set progress 4 + } + participants_complete { + set progress 5 + } + default { + error "Unknown state: $state" + } } set highest_available [expr $progress + 1] wizard get_current_step -start $highest_available -array set title { - 1 "Assign Roles to Characters" - 2 "Populate Tasks" - 3 "Define Casting" - 4 "Assign Groups to Roles" -} set sub_title $title(${wizard:current_id}) workflow::get -workflow_id $workflow_id -array workflow