Index: openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl 14 Jan 2004 15:10:54 -0000 1.21 +++ openacs-4/packages/simulation/www/siminst/simulation-casting-3.tcl 20 Jan 2004 12:41:03 -0000 1.22 @@ -148,7 +148,10 @@ } } - set uncast_mapped_groups [db_list uncast_mapped_groups_count " + if { [string equal $sim_template(enroll_type) "closed"] || [empty_string_p $sim_template(enroll_type)] } { + # In closed enrollment we require the admin to map all groups to roles + + set uncast_mapped_groups [db_list uncast_mapped_groups_count " select g.group_name from sim_party_sim_map spsm, groups g @@ -162,9 +165,10 @@ and srpm.party_id = spsm.party_id ) "] - if { [llength $uncast_mapped_groups] > 0 } { - template::form::set_error actors parties_$role_id "The following groups are not mapped to any roles: [join $uncast_mapped_groups ", "]." - break + if { [llength $uncast_mapped_groups] > 0 } { + template::form::set_error actors parties_$role_id "The following groups are not mapped to any roles: [join $uncast_mapped_groups ", "]." + break + } } simulation::template::enroll_and_invite_users -workflow_id $workflow_id