Diff for /loncom/interface/lonpreferences.pm between versions 1.179 and 1.180

version 1.179, 2009/12/02 18:33:27 version 1.180, 2009/12/15 13:15:32
Line 455  sub verify_and_change_rolespref { Line 455  sub verify_and_change_rolespref {
     if ($hotlist_flag) {      if ($hotlist_flag) {
         &Apache::lonnet::put('environment',{'recentroles' => $hotlist_flag});          &Apache::lonnet::put('environment',{'recentroles' => $hotlist_flag});
         &Apache::lonnet::appenv({'environment.recentroles' => $hotlist_flag});          &Apache::lonnet::appenv({'environment.recentroles' => $hotlist_flag});
         $message=&mt('Recent '.$role.'s Hotlist is Enabled');          $message=&Apache::lonhtmlcommon::confirm_success(&mt('Recent '.$role.'s Hotlist is Enabled.')." ".&mt('Display [_1] Most Recent '.$role.'s.',$hotlist_n));
     } else {      } else {
         &Apache::lonnet::del('environment',['recentroles']);          &Apache::lonnet::del('environment',['recentroles']);
         &Apache::lonnet::delenv('environment.recentroles');          &Apache::lonnet::delenv('environment.recentroles');
         $message=&mt('Recent '.$role.'s Hotlist is Disabled');          $message=&Apache::lonhtmlcommon::confirm_success(&mt('Recent '.$role.'s Hotlist is Disabled'));
     }      }
     if ($hotlist_n) {      if ($hotlist_n) {
         &Apache::lonnet::put('environment',{'recentrolesn' => $hotlist_n});          &Apache::lonnet::put('environment',{'recentrolesn' => $hotlist_n});
         &Apache::lonnet::appenv({'environment.recentrolesn' => $hotlist_n});          &Apache::lonnet::appenv({'environment.recentrolesn' => $hotlist_n});
         if ($hotlist_flag) {  
             $message.="<br />".  
  &mt('Display [_1] Most Recent '.$role.'s',$hotlist_n)."\n";  
         }  
     }      }
   
 # Get list of froze roles and list of recent roles  # Get list of froze roles and list of recent roles
Line 1011  sub verify_and_change_msgforward { Line 1007  sub verify_and_change_msgforward {
     if ($newscreen) {      if ($newscreen) {
         &Apache::lonnet::put('environment',{'msgforward' => $newscreen});          &Apache::lonnet::put('environment',{'msgforward' => $newscreen});
         &Apache::lonnet::appenv({'environment.msgforward' => $newscreen});          &Apache::lonnet::appenv({'environment.msgforward' => $newscreen});
         $message .= &mt('Set message forwarding to ').'<tt>"'.$newscreen.'"</tt>.'          $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Set message forwarding to ').'<tt>"'.$newscreen.'"</tt>.<br />');
                     .'<br />';  
     } else {      } else {
         &Apache::lonnet::del('environment',['msgforward']);          &Apache::lonnet::del('environment',['msgforward']);
         &Apache::lonnet::delenv('environment.msgforward');          &Apache::lonnet::delenv('environment.msgforward');
         $message.= &mt("Set message forwarding to 'off'.").'<br />';          $message.= &Apache::lonhtmlcommon::confirm_success(&mt("Set message forwarding to 'off'.").'<br />');
     }      }
     my $critnotification;      my $critnotification;
     my $notification;      my $notification;
Line 1052  sub verify_and_change_msgforward { Line 1047  sub verify_and_change_msgforward {
     if ($notification) {      if ($notification) {
         &Apache::lonnet::put('environment',{'notification' => $notification});          &Apache::lonnet::put('environment',{'notification' => $notification});
         &Apache::lonnet::appenv({'environment.notification' => $notification});          &Apache::lonnet::appenv({'environment.notification' => $notification});
         $message.=&mt('Set non-critical message notification address(es) to ').'<tt>"'.$notification.'"</tt>.<br />';          $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set non-critical message notification address(es) to ').'<tt>"'.$notification.'"</tt>.<br />');
     } else {      } else {
         &Apache::lonnet::del('environment',['notification']);          &Apache::lonnet::del('environment',['notification']);
         &Apache::lonnet::delenv('environment.notification');          &Apache::lonnet::delenv('environment.notification');
         $message.=&mt("Set non-critical message notification to 'off'.").'<br />';          $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set non-critical message notification to 'off'.").'<br />');
     }      }
     if ($critnotification) {      if ($critnotification) {
         &Apache::lonnet::put('environment',{'critnotification' => $critnotification});          &Apache::lonnet::put('environment',{'critnotification' => $critnotification});
         &Apache::lonnet::appenv({'environment.critnotification' => $critnotification});          &Apache::lonnet::appenv({'environment.critnotification' => $critnotification});
         $message.=&mt('Set critical message notification address(es) to ').'<tt>"'.$critnotification.'"</tt>.<br />';          $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set critical message notification address(es) to ').'<tt>"'.$critnotification.'"</tt>.<br />');
     } else {      } else {
         &Apache::lonnet::del('environment',['critnotification']);          &Apache::lonnet::del('environment',['critnotification']);
         &Apache::lonnet::delenv('environment.critnotification');          &Apache::lonnet::delenv('environment.critnotification');
         $message.=&mt("Set critical message notification to 'off'.").'<br />';          $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set critical message notification to 'off'.").'<br />');
     }      }
     if ($critnotification || $notification) {      if ($critnotification || $notification) {
         if ($notify_with_html) {          if ($notify_with_html) {
             &Apache::lonnet::put('environment',{'notifywithhtml' => $notify_with_html});              &Apache::lonnet::put('environment',{'notifywithhtml' => $notify_with_html});
             &Apache::lonnet::appenv({'environment.notifywithhtml' => $notify_with_html});              &Apache::lonnet::appenv({'environment.notifywithhtml' => $notify_with_html});
             $message.=&mt('Set address(es) to receive excerpts with html retained ').'<tt>"'.$notify_with_html.'"</tt>.';              $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set address(es) to receive excerpts with html retained ').'<tt>"'.$notify_with_html.'"</tt>.');
         } else {          } else {
             &Apache::lonnet::del('environment',['notifywithhtml']);              &Apache::lonnet::del('environment',['notifywithhtml']);
             &Apache::lonnet::delenv('environment.notifywithhtml');              &Apache::lonnet::delenv('environment.notifywithhtml');
             if ($totaladdresses == 1) {              if ($totaladdresses == 1) {
                 $message.=&mt("Set notification address to receive excerpts with html stripped.");                  $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set notification address to receive excerpts with html stripped."));
             } else {              } else {
                 $message.=&mt("Set all notification addresses to receive excerpts with html stripped.");                  $message.=&Apache::lonhtmlcommon::confirm_success(&mt("Set all notification addresses to receive excerpts with html stripped."));
             }              }
         }          }
     } else {      } else {
         &Apache::lonnet::del('environment',['notifywithhtml']);          &Apache::lonnet::del('environment',['notifywithhtml']);
         &Apache::lonnet::delenv('environment.notifywithhtml');          &Apache::lonnet::delenv('environment.notifywithhtml');
     }      }
     if ($message) {  
         $message .= '<br /><hr />';  
     }  
     &Apache::loncommon::flush_email_cache($user,$domain);      &Apache::loncommon::flush_email_cache($user,$domain);
       $message=&Apache::loncommon::confirmwrapper($message);
     &msgforwardchanger($r,$message);      &msgforwardchanger($r,$message);
 }  }
   
Line 1578  ENDERROR Line 1571  ENDERROR
     my $message;      my $message;
     if ($result =~ /^ok$/) {      if ($result =~ /^ok$/) {
         $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.','<i>'.$user.'</i>'));          $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.','<i>'.$user.'</i>'));
           $message = &Apache::loncommon::confirmwrapper($message);
         if ($caller eq 'reset_by_email') {          if ($caller eq 'reset_by_email') {
             $r->print($message.'<br />');              $r->print($message.'<br />');
         } else {          } else {
Line 1820  sub verify_and_change_coursepage { Line 1814  sub verify_and_change_coursepage {
             my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};               my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; 
             my ($furl,$ferr)=              my ($furl,$ferr)=
                 &Apache::lonuserstate::readmap($cdom.'/'.$cnum);                  &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
             $message .= '<br /><font size="+1"><a href="'.$furl.'">'.$lt{'gtts'}.' <i>'.&mt('now').'</i></a></font>';              $message .= '<br /><a href="'.$furl.'">'.$lt{'gtts'}.' <i>'.&mt('now').'</i></a>';
         } else {          } else {
             $message .= '<br /><font size="+1"><a href="/adm/whatsnew?refpage='.              $message .= '<br /><a href="/adm/whatsnew?refpage='.
                         $refpage.'">'.$lt{'dasp'}.'</a></font>';                          $refpage.'">'.$lt{'dasp'}.'</a>';
         }          }
     }      }
     &print_main_menu($r, &Apache::lonhtmlcommon::confirm_success($message));      $message = &Apache::lonhtmlcommon::confirm_success($message);
       $message = &Apache::loncommon::confirmwrapper($message);
       &print_main_menu($r,$message);
 }  }
   
 sub print_main_menu {  sub print_main_menu {

Removed from v.1.179  
changed lines
  Added in v.1.180


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>