Index: openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl 28 Jun 2005 22:03:38 -0000 1.5 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/process-purchase-course.tcl 28 Jun 2005 22:44:26 -0000 1.6 @@ -325,6 +325,9 @@ lappend validate {name { ! [empty_string_p $name] || [template::element::get_value participant related_user] != -1 } "Please enter a name for the group" + } {name + { [db_string group {select 1 from groups where group_name = :name} -default 0] } + "Group name already exists" } {num_members { ! [empty_string_p $num_members] || [template::element::get_value participant related_user] != -1 } "Please enter the number of attendees" @@ -479,7 +482,12 @@ -last_name "Attendee $i" \ -nologin] - relation_add -member_state approved membership_rel $group_id $new_user(user_id) + if { [info exists new_user(user_id)] } { + relation_add -member_state approved membership_rel $group_id $new_user(user_id) + } else { + ad_return_complaint 1 "There was a problem creating the account \"$name Attendee $i\"." + ad_script_abort + } } relation_add relationship $group_id $section_community_id