--- loncom/interface/lonuserutils.pm 2010/01/14 18:15:31 1.112 +++ loncom/interface/lonuserutils.pm 2010/01/19 18:02:20 1.113 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.112 2010/01/14 18:15:31 bisitz Exp $ +# $Id: lonuserutils.pm,v 1.113 2010/01/19 18:02:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4833,11 +4833,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)) {