--- loncom/interface/lonuserutils.pm 2009/12/20 01:49:42 1.109 +++ 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.109 2009/12/20 01:49:42 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.113 2010/01/19 18:02:20 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1448,8 +1448,12 @@ sub print_userlist { } if (!(($context eq 'domain') && (($env{'form.roletype'} eq 'course') || ($env{'form.roletype'} eq 'community')))) { - $r->print(' '.&list_submit_button(&mt('Update Display')). - "\n

\n"); + $r->print( + "\n

\n" + .'

' + .&list_submit_button(&mt('Update Display')) + ."

\n" + ); } my ($indexhash,$keylist) = &make_keylist_array(); my (%userlist,%userinfo,$clearcoursepick); @@ -1688,7 +1692,7 @@ sub role_filter { $role_select .= ''; $output = ''; + .' '; } return $output; } @@ -1728,7 +1732,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) { @@ -1743,7 +1747,9 @@ sub section_group_filter { $markup .= ''."\n"; } $markup .= ''."\n"; - $output .= (' 'x3).''; + $output .= (' 'x3).'' + .'' + .' '; } } return $output; @@ -2397,7 +2403,7 @@ END if ($env{'form.userwin'}) { $checkwin = ' checked="checked"'; } - $output .= ''.$lt{'owin'}.''; + $output .= ''.$lt{'owin'}.''; } $output .= "\n".''."\n". &Apache::loncommon::start_data_table(). @@ -2937,7 +2943,7 @@ sub print_username_link { $output = $in->{'username'}; } else { $output = '{'username'}','$in->{'domain'}'".')" />'. + "'$in->{'username'}','$in->{'domain'}'".')">'. $in->{'username'}.''; } return $output; @@ -4827,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)) {