--- loncom/interface/lonviewclasslist.pm 2012/12/31 14:29:08 1.14 +++ loncom/interface/lonviewclasslist.pm 2013/07/15 17:00:19 1.15 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to display the classlist # -# $Id: lonviewclasslist.pm,v 1.14 2012/12/31 14:29:08 raeburn Exp $ +# $Id: lonviewclasslist.pm,v 1.15 2013/07/15 17:00:19 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -246,7 +246,7 @@ sub html_classlist { if ($env{'form.action'} eq 'setenv') { $Str .= &process_student_prefs(); } - $Str .= '

'.&mt('Student-viewable course roster').'

'; + $Str .= '

'.&mt('Student-viewable course roster').'

'; $cid = $env{'request.course.id'}; $cdom = $env{'course.'.$cid.'.domain'}; @@ -254,16 +254,16 @@ sub html_classlist { if ($viewsettings->{'limit_to_section'}) { if ($env{'request.course.sec'} eq '') { - $title = '

'.&mt('Students with no section').'

'; + $title = '

'.&mt('Students with no section').'

'; $listtype = 'without a section'; } else { - $title ='

'.&mt('Students in section "[_1]"', - $env{'request.course.sec'}).'

'; + $title ='

'.&mt('Students in section "[_1]"', + $env{'request.course.sec'}).'

'; $listtype = 'in the section'; $secdisplay = " ($env{'request.course.sec'}) "; } } else { - $title .= '

'.&mt('Students in any section').'

'; + $title .= '

'.&mt('Students in any section').'

'; $listtype = 'in the course'; } @@ -410,19 +410,22 @@ sub print_roster_form { $showoff = ' checked="checked" '; $showon = ' '; } - my $output = '

'.&mt('Your roster setting').'

'; + my $output = + '
' + .'
'.&mt('Your roster setting').''; if ($showinroster) { $output .= &mt('You are currently listed in the student-viewable roster.'); } else { - $output .= &mt('You are currently not listed in the student-viewable roster.'); + $output .= &mt('You are currently [_1]not[_2] listed in the student-viewable roster.','',''); } $output .= '
'.&mt('Include yourself in the roster?').'  '. - '
'. + ''. '  

'. ''. - '

'; + ''. + '

'; return $output; } @@ -454,16 +457,25 @@ sub process_student_prefs { &Apache::lonnet::appenv(\%changeHash); my $result = &Apache::lonnet::put('publicroster',{$student => $showinroster,},$cdom,$cnum); if ($result eq 'ok') { - $output .= &mt('Display of your name in the student-viewable roster set to [_1].',$visibility); + $output .= + &Apache::lonhtmlcommon::confirm_success( + &mt('Display of your name in the student-viewable roster set to [_1].',''.$visibility.'')); } else { - $output .= ''.&mt('Error occurred saving display setting.').''; + $output .= + &Apache::lonhtmlcommon::confirm_success( + &mt('Error occurred saving display setting.'),1); } } else { - $output .= ''.&mt('Error occurred saving display setting.').''; + $output .= + &Apache::lonhtmlcommon::confirm_success( + &mt('Error occurred saving display setting.'),1); } } else { - $output .= &mt('Display of your name in the student-viewable roster unchanged (set to [_1]).',$visibility); + $output .= + &Apache::lonhtmlcommon::confirm_success( + &mt('Display of your name in the student-viewable roster unchanged (set to [_1]).',''.$visibility.'')); } + $output = &Apache::loncommon::confirmwrapper($output); return $output; }