Diff for /loncom/interface/lonpreferences.pm between versions 1.117 and 1.118

version 1.117, 2008/03/24 04:56:22 version 1.118, 2008/05/12 23:47:43
Line 609  sub verify_and_change_clicker { Line 609  sub verify_and_change_clicker {
     $r->print(&mt('Registering clickers: [_1]',$newclickers));      $r->print(&mt('Registering clickers: [_1]',$newclickers));
 }  }
   
   #################################################################
   ##                      Lock Subroutines                        #
   #################################################################
   
   sub lockwarning {
       my $r = shift;
       my $title=&mt('Action locked');
       my $texttop=&mt('LON-CAPA is currently performing the following actions:');
       my $textbottom=&mt('Changing roles or logging out may result in data corruption.');
       my ($num,%which)=&Apache::lonnet::get_locks();
       my $which='';
       foreach my $id (keys %which) {
          $which.='<li>'.$which{$id}.'</li>';
       }
       my $change=&mt('Override');
       $r->print(<<ENDSCREEN);
   <form name="prefs" action="/adm/preferences" method="post">
   <input type="hidden" name="action" value="verify_and_change_locks" />
   <h1>$title</h1>
   $texttop
   <ul>
   $which
   </ul>
   $textbottom
   <input type="submit" value="$change" />
   </form>
   ENDSCREEN
   }
   
   sub verify_and_change_lockwarning {
       my $r = shift;
       &Apache::lonnet::remove_all_locks();
       $r->print(&mt('Cleared locks.'));
   }
   
   
 ################################################################  ################################################################
 #         Message Forward                                      #  #         Message Forward                                      #
 ################################################################  ################################################################
Line 1825  sub handler { Line 1861  sub handler {
                       href     => '/adm/preferences',                        href     => '/adm/preferences',
                       subroutine => \&clickerchanger,                        subroutine => \&clickerchanger,
                       breadcrumb =>                        breadcrumb =>
                           { href => '/adm/preferences?action=changeicons',                            { href => '/adm/preferences?action=changeclicker',
                             text => 'Register Clicker'},                              text => 'Register Clicker'},
                       },                        },
                     { action   => 'verify_and_change_clicker',                      { action   => 'verify_and_change_clicker',
Line 1836  sub handler { Line 1872  sub handler {
                       printmenu => 'yes',                        printmenu => 'yes',
                       }));                        }));
   
       push (@Options,({ action   => 'lockwarning',
                         subroutine => \&lockwarning,
                         breadcrumb =>
                             { href => '/adm/preferences?action=lockwarning',
                               text => 'Lock Warnings'},
                         },
                       { action   => 'verify_and_change_locks',
                         subroutine => \&verify_and_change_lockwarning,
                         breadcrumb =>
                             { href => '/adm/preferences?action=lockwarning',
                               text => 'Lockwarnings'},
                         printmenu => 'yes',
                         }));
   
   
     if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})      if (&Apache::lonnet::allowed('whn',$env{'request.course.id'})
  || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'   || &Apache::lonnet::allowed('whn',$env{'request.course.id'}.'/'

Removed from v.1.117  
changed lines
  Added in v.1.118


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