Diff for /loncom/interface/lonpreferences.pm between versions 1.153 and 1.155

version 1.153, 2009/04/25 17:14:24 version 1.155, 2009/04/29 16:57:29
Line 473  sub verify_and_change_rolespref { Line 473  sub verify_and_change_rolespref {
 # Unset any roles that were previously frozen but aren't in list  # Unset any roles that were previously frozen but aren't in list
     foreach my $role_key (sort(keys(%recent_roles))) {      foreach my $role_key (sort(keys(%recent_roles))) {
         if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) {          if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) {
     $message .= "<br />".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n";      $message .= "<br />".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key}))."\n";
     &Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0);      &Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0);
         }          }
     }      }
Line 481  sub verify_and_change_rolespref { Line 481  sub verify_and_change_rolespref {
 # Freeze selected roles  # Freeze selected roles
     foreach my $role_key (@freeze_list) {      foreach my $role_key (@freeze_list) {
         if (!$frozen_roles{$role_key}) {          if (!$frozen_roles{$role_key}) {
              $message .= "<br />".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n";               $message .= "<br />".
                &Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',$role_text{$role_key}))."\n";
              &Apache::lonhtmlcommon::store_recent('roles',               &Apache::lonhtmlcommon::store_recent('roles',
                                           $role_key,' ',1);                                            $role_key,' ',1);
         }          }
Line 568  sub verify_and_change_screenname { Line 569  sub verify_and_change_screenname {
 ################################################################  ################################################################
 sub iconchanger {  sub iconchanger {
     my $r = shift;      my $r = shift;
     Apache::lonhtmlcommon::add_breadcrumb(      &Apache::lonhtmlcommon::add_breadcrumb(
     { href => '/adm/preferences?action=changeicons',      { href => '/adm/preferences?action=changeicons',
                 text => 'Change Main Menu'});                  text => 'Change Main Menu'});
     $r->print(Apache::loncommon::start_page('Page Display Settings'));      $r->print(Apache::loncommon::start_page('Page Display Settings'));
Line 669  sub verify_and_change_clicker { Line 670  sub verify_and_change_clicker {
   
 sub domcoordchanger {  sub domcoordchanger {
     my $r = shift;      my $r = shift;
     Apache::lonhtmlcommon::add_breadcrumb(      &Apache::lonhtmlcommon::add_breadcrumb(
     { href => '/adm/preferences?action=changedomcoord',      { href => '/adm/preferences?action=changedomcoord',
                 text => 'Restrict Domain Coordinator Access'});                  text => 'Restrict Domain Coordinator Access'});
     $r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access'));      $r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access'));
Line 1205  sub passwordchanger { Line 1206  sub passwordchanger {
             $defdom = $r->dir_config('lonDefDomain');              $defdom = $r->dir_config('lonDefDomain');
             my %data = &Apache::lonnet::tmpget($mailtoken);              my %data = &Apache::lonnet::tmpget($mailtoken);
             if (keys(%data) == 0) {              if (keys(%data) == 0) {
                 $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a <a href="/adm/resetpw">new request</a> for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'));                  $r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.'
                                ,'<a href="/adm/resetpw">','</a>')
                   );
                 return;                  return;
             }              }
             if (defined($data{time})) {              if (defined($data{time})) {
Line 1538  ENDERROR Line 1541  ENDERROR
         }          }
     } else {      } else {
  # error error: run in circles, scream and shout   # error error: run in circles, scream and shout
         $message = &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.');          $message = &Apache::lonhtmlcommon::confirm_success(
             &mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.'),1);
         unless ($caller eq 'reset_by_email') {          unless ($caller eq 'reset_by_email') {
             &print_main_menu($r, $message);              &print_main_menu($r, $message);
         }          }
Line 2040  sub handler { Line 2044  sub handler {
     }elsif($env{'form.action'} eq 'verify_and_change_coursepage'){      }elsif($env{'form.action'} eq 'verify_and_change_coursepage'){
         &verify_and_change_coursepage($r);          &verify_and_change_coursepage($r);
     }elsif($env{'form.action'} eq 'debugtoggle'){      }elsif($env{'form.action'} eq 'debugtoggle'){
         toggle_debug();          &toggle_debug();
     print_main_menu($r);   &print_main_menu($r);
     }      }
   
     return OK;      return OK;
Line 2322  sub handler2 { Line 2326  sub handler2 {
                        }));                         }));
     }      }
   
     if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) {      if (($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/)
        && ($env{'user.domain'} =~/^(msu|gerd)$/)){
         push (@Options,({ action => 'debugtoggle',          push (@Options,({ action => 'debugtoggle',
                           printmenu => 'yes',                            printmenu => 'yes',
                           subroutine => \&toggle_debug,                            subroutine => \&toggle_debug,

Removed from v.1.153  
changed lines
  Added in v.1.155


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