--- loncom/interface/lonuserutils.pm 2009/11/23 03:45:16 1.107 +++ loncom/interface/lonuserutils.pm 2010/01/05 22:08:48 1.109.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.107 2009/11/23 03:45:16 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.109.2.2 2010/01/05 22:08:48 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -386,7 +386,7 @@ sub javascript_validations { if (($context eq 'course') || ($context eq 'domain')) { if ($context eq 'course') { if ($env{'request.course.sec'} eq '') { - $setsection_call = 'setSections(document.'.$param{'formname'}."'$crstype'".');'; + $setsection_call = 'setSections(document.'.$param{'formname'}.",'$crstype'".');'; $setsections_js = &setsections_javascript($param{'formname'},$groupslist, $mode,'',$crstype); @@ -1185,8 +1185,10 @@ sub default_role_selector { 'exs' => "Existing sections", 'new' => "New section", ); - $options = ''."\n"; + unless (($context eq 'course') && (&Apache::loncommon::needs_gci_custom())) { + $options .= ' '."\n"; + } if ($context eq 'course') { $options .= &default_course_roles($context,$checkpriv,$crstype,%customroles); } elsif ($context eq 'author') { @@ -2462,9 +2464,13 @@ END time.'_'.rand(1000000000).'.csv'; unless ($CSVfile = Apache::File->new('>/home/httpd'.$CSVfilename)) { $r->log_error("Couldn't open $CSVfilename for output $!"); - $r->print(&mt('Problems occurred in writing the CSV file. ' - .'This error has been logged. ' - .'Please alert your LON-CAPA administrator.')); + $r->print( + '

' + .&mt('Problems occurred in writing the CSV file.') + .' '.&mt('This error has been logged.') + .' '.&mt('Please alert your LON-CAPA administrator.') + .'

' + ); $CSVfile = undef; } # @@ -3651,7 +3657,7 @@ sub print_first_users_upload_form { $str .= ''; $str .= ''; - $str .= '

'.&mt('Upload a file containing information about users').'

'."\n"; + $str .= '

'.&mt('Upload a file containing information about users').'

'."\n"; # Excel and CSV Help $str .= '
' @@ -3662,15 +3668,8 @@ sub print_first_users_upload_form { &mt("How do I create a CSV file from a spreadsheet")) .'

'."\n"; $str .= &Apache::lonhtmlcommon::start_pick_box() - .&Apache::lonhtmlcommon::row_title(&mt('File')); - if (&Apache::lonlocal::current_language() ne 'en') { - if ($context eq 'course') { - $str .= '

'."\n" - .&mt('Please upload an UTF8 encoded file to ensure a correct character encoding in your classlist.')."\n" - .'

'."\n"; - } - } - $str .= &Apache::loncommon::upfile_select_html() + .&Apache::lonhtmlcommon::row_title(&mt('File')) + .&Apache::loncommon::upfile_select_html() .&Apache::lonhtmlcommon::row_closure() .&Apache::lonhtmlcommon::row_title( '