version 1.172, 2009/10/01 22:41:55
|
version 1.174, 2009/10/08 22:37:33
|
Line 42 use Apache::loncommon();
|
Line 42 use Apache::loncommon();
|
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
|
use LONCAPA::lonauthcgi(); |
use LONCAPA(); |
use LONCAPA(); |
|
|
# |
# |
Line 1338 sub jscript_send {
|
Line 1339 sub jscript_send {
|
this.document.client.elements.uname.value; |
this.document.client.elements.uname.value; |
this.document.pserver.elements.udom.value = |
this.document.pserver.elements.udom.value = |
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value; |
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value; |
|
this.document.pserver.elements.email.value = |
|
this.document.client.elements.email.value; |
|; |
|; |
} |
} |
$ output .= qq| |
$ output .= qq| |
Line 1422 sub server_form {
|
Line 1425 sub server_form {
|
<input type="hidden" name="token" value="$mailtoken" /> |
<input type="hidden" name="token" value="$mailtoken" /> |
<input type="hidden" name="uname" value="" /> |
<input type="hidden" name="uname" value="" /> |
<input type="hidden" name="udom" value="" /> |
<input type="hidden" name="udom" value="" /> |
|
<input type="hidden" name="email" value="" /> |
|
|
|; |
|; |
} |
} |
Line 1574 ENDERROR
|
Line 1578 ENDERROR
|
} |
} |
} else { |
} else { |
# error error: run in circles, scream and shout |
# error error: run in circles, scream and shout |
$message = &Apache::lonhtmlcommon::confirm_success( |
if ($caller eq 'reset_by_email') { |
&mt("The password for user [_1] was not changed.",'<i>'.$user.'</i>').' '.&mt('Please make sure your old password was entered correctly.'),1); |
if (!$result) { |
unless ($caller eq 'reset_by_email') { |
return 1; |
|
} else { |
|
return $result; |
|
} |
|
} else { |
|
$message = &Apache::lonhtmlcommon::confirm_success( |
|
&mt("The password for user [_1] was not changed.",'<i>'.$user.'</i>').' '.&mt('Please make sure your old password was entered correctly.'),1); |
$message=&Apache::loncommon::confirmwrapper($message); |
$message=&Apache::loncommon::confirmwrapper($message); |
&print_main_menu($r, $message); |
&print_main_menu($r, $message); |
} |
} |
return 1; |
|
} |
} |
return; |
return; |
} |
} |
Line 1982 push(@{ $menu[4]->{items} }, {
|
Line 1991 push(@{ $menu[4]->{items} }, {
|
}); |
}); |
|
|
} |
} |
if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) { |
if (&can_toggle_debug()) { |
push(@{ $menu[4]->{items} }, { |
push(@{ $menu[4]->{items} }, { |
linktext => 'Toggle Debug Messages (Current:'.$env{'user.debug'}.')', |
linktext => 'Toggle Debug Messages (Currently '.($env{'user.debug'} ? 'on)' : 'off)'), |
url => '/adm/preferences?action=debugtoggle', |
url => '/adm/preferences?action=debugtoggle', |
permission => 'F', |
permission => 'F', |
#help => '', |
#help => '', |
Line 2083 sub handler {
|
Line 2092 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(); |
if (&can_toggle_debug()) { |
|
&toggle_debug(); |
|
} |
&print_main_menu($r); |
&print_main_menu($r); |
} |
} |
|
|
Line 2106 sub toggle_debug {
|
Line 2117 sub toggle_debug {
|
} |
} |
} |
} |
|
|
|
sub can_toggle_debug { |
|
my $can_toggle = 0; |
|
my $page = 'toggledebug'; |
|
if (&LONCAPA::lonauthcgi::can_view($page)) { |
|
$can_toggle = 1; |
|
} elsif (&LONCAPA::lonauthcgi::check_ipbased_access($page)) { |
|
$can_toggle = 1; |
|
} |
|
return $can_toggle; |
|
} |
|
|
1; |
1; |
__END__ |
__END__ |