--- loncom/interface/lonuserutils.pm 2010/01/20 21:37:37 1.97.2.12 +++ loncom/interface/lonuserutils.pm 2010/01/20 21:42:30 1.97.2.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.97.2.12 2010/01/20 21:37:37 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.97.2.13 2010/01/20 21:42:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1731,7 +1731,7 @@ sub section_group_filter { } if (@options > 0) { my $currsel; - $markup = ''."\n"; foreach my $option ('all','none',@options) { $currsel = ''; if ($env{'form.'.$name{$item}} eq $option) { @@ -2942,7 +2942,7 @@ sub print_username_link { $output = $in->{'username'}; } else { $output = '{'username'}','$in->{'domain'}'".')" />'. + "'$in->{'username'}','$in->{'domain'}'".')">'. $in->{'username'}.''; } return $output; @@ -4828,11 +4828,13 @@ sub setsections_javascript { plch => 'Please choose a different section name.', mnot => 'may not be used as a section name, as it is the name of a course group.', secn => 'Section names and group names must be distinct. Please choose a different section name.', + nonw => 'Section names may only contain letters or numbers.', ); $setsection_js .= <<"ENDSECCODE"; function setSections(formname,crstype) { var re1 = /^currsec_/; + var re2 =/\\W/; var groups = new Array($groupslist); for (var i=0;i 0) { + alert("$alerts{'nonw'}\\n$alerts{'plch'}"); + return; + } + numsec = numsec + validsecs.length; } if ((role == 'st') && (numsec > 1)) {