--- loncom/interface/loncreateuser.pm 2006/06/26 22:31:56 1.122 +++ loncom/interface/loncreateuser.pm 2006/06/29 17:41:06 1.127 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Create a user # -# $Id: loncreateuser.pm,v 1.122 2006/06/26 22:31:56 albertel Exp $ +# $Id: loncreateuser.pm,v 1.127 2006/06/29 17:41:06 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -415,15 +415,17 @@ ENDSCRIPT sections = document.cu.elements[i+1].value; } var newsecs = document.cu.elements[i+1].value; + var numsplit; if (newsecs != null && newsecs != "") { - var numsplit = newsecs.split(/,/g); + numsplit = newsecs.split(/,/g); numsec = numsec + numsplit.length; } + if ((role == 'st') && (numsec > 1)) { alert("In each course, each user may only have one student role at a time. You had selected "+numsec+" sections.\\nPlease modify your selections so they include no more than one section.") return; } - else { + else if (numsplit != null) { for (var j=0; jprint(''.$privtext.''. ($courselevel{$priv}?'':' '). @@ -1770,10 +1767,6 @@ sub course_level_table { foreach ('st','ta','ep','in','cc') { if (&Apache::lonnet::allowed('c'.$_,$thiscourse)) { my $plrole=&Apache::lonnet::plaintext($_); - # Was this left in by mistake? - # if ($type eq 'Group') { - # $plrole = &Apache::loncommon::convert_role($plrole,$type); - # } $table .= <