version 1.116, 2008/03/12 02:45:07
|
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 1325 ENDERROR
|
Line 1361 ENDERROR
|
# |
# |
if ($caller eq 'reset_by_email') { |
if ($caller eq 'reset_by_email') { |
my %data = &Apache::lonnet::tmpget($mailtoken); |
my %data = &Apache::lonnet::tmpget($mailtoken); |
|
if (keys(%data) == 0) { |
|
&passwordchanger($r, |
|
'<span class="LC_error">'. |
|
&mt('Could not verify current authentication.').' '. |
|
&mt('Please try again.').'</span>',$caller,$mailtoken); |
|
return 1; |
|
} |
if ($currentpass ne $data{'temppasswd'}) { |
if ($currentpass ne $data{'temppasswd'}) { |
&passwordchanger($r, |
&passwordchanger($r, |
'<span class="LC_error">'. |
'<span class="LC_error">'. |
Line 1818 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 1829 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'}.'/' |