Index: openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/simulation-casting-3.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.tcl 12 Jan 2004 11:35:33 -0000 1.17 +++ openacs-4/contrib/packages/simulation/www/siminst/simulation-casting-3.tcl 13 Jan 2004 10:17:11 -0000 1.18 @@ -10,6 +10,8 @@ permission::require_write_permission -object_id $workflow_id +simulation::template::get -workflow_id $workflow_id -array sim_template + set page_title "Set user casting rules" set context [list [list "." "SimInst"] $page_title] @@ -22,8 +24,14 @@ {help_text "If participants have not selected groups or roles by the simulation start time, they are automatically assigned."} } +if { [string equal $sim_template(enroll_type) "closed"] } { + # Closed enrollment so offer only invited or auto_enroll groups + set eligible_groups [simulation::casting_groups -mapped_only -workflow_id $workflow_id] +} else { + # Open enrollment, meaning anybody can sign up, so offer all subsite groups + set eligible_groups [simulation::casting_groups -workflow_id $workflow_id] +} -set eligible_groups [simulation::casting_groups -mapped_only -workflow_id $workflow_id] set num_groups [llength $eligible_groups] foreach role_id [workflow::get_roles -workflow_id $workflow_id] {