version 1.125.4.8, 2009/10/09 04:13:55
|
version 1.125.8.2, 2009/09/23 15:32:00
|
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 1291 sub jscript_send {
|
Line 1290 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 1375 sub server_form {
|
Line 1372 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 1528 ENDERROR
|
Line 1524 ENDERROR
|
} |
} |
} else { |
} else { |
# error error: run in circles, scream and shout |
# error error: run in circles, scream and shout |
|
$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); |
if ($caller eq 'reset_by_email') { |
if ($caller eq 'reset_by_email') { |
if (!$result) { |
$r->print($message.'<br />'); |
return 1; |
|
} else { |
|
return $result; |
|
} |
|
} else { |
} 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); |
|
$r->print(&Apache::loncommon::confirmwrapper($message)); |
$r->print(&Apache::loncommon::confirmwrapper($message)); |
} |
} |
|
return 1; |
} |
} |
return; |
return; |
} |
} |
Line 1864 sub handler {
|
Line 1857 sub handler {
|
printmenu => 'yes', |
printmenu => 'yes', |
subroutine => \&verify_and_change_colors, |
subroutine => \&verify_and_change_colors, |
})); |
})); |
push (@Options,({ action => 'changelanguages', |
if ($env{'user.adv'}) { |
linktext => 'Change Language Preferences', |
push (@Options,({ action => 'changelanguages', |
href => '/adm/preferences', |
linktext => 'Change Language Preferences', |
help => 'Prefs_Language', |
href => '/adm/preferences', |
breadcrumb=> |
help => 'Prefs_Language', |
{ href => '/adm/preferences?action=changelanguages', |
breadcrumb=> |
text => 'Change Language'}, |
{ href => '/adm/preferences?action=changelanguages', |
subroutine => \&languagechanger, |
text => 'Change Language'}, |
}, |
subroutine => \&languagechanger, |
{ action => 'verify_and_change_languages', |
}, |
breadcrumb=> |
{ action => 'verify_and_change_languages', |
{href => '/adm/preferences?action=changelanguages', |
breadcrumb=> |
text => 'Change Language'}, |
{href => '/adm/preferences?action=changelanguages', |
printmenu => 'yes', |
text => 'Change Language'}, |
subroutine=>\&verify_and_change_languages, } |
printmenu => 'yes', |
|
subroutine=>\&verify_and_change_languages, } |
)); |
)); |
|
} |
push (@Options,({ action => 'changewysiwyg', |
push (@Options,({ action => 'changewysiwyg', |
linktext => 'Change WYSIWYG Editor Preferences', |
linktext => 'Change WYSIWYG Editor Preferences', |
href => '/adm/preferences', |
href => '/adm/preferences', |
Line 1972 sub handler {
|
Line 1967 sub handler {
|
text => 'Change Main Menu'}, |
text => 'Change Main Menu'}, |
printmenu => 'yes', |
printmenu => 'yes', |
})); |
})); |
|
if ($env{'user.adv'}) { |
push (@Options,({ action => 'changeclicker', |
push (@Options,({ action => 'changeclicker', |
linktext => 'Register Response Devices ("Clickers")', |
linktext => 'Register Response Devices ("Clickers")', |
href => '/adm/preferences', |
href => '/adm/preferences', |
subroutine => \&clickerchanger, |
subroutine => \&clickerchanger, |
breadcrumb => |
breadcrumb => |
{ href => '/adm/preferences?action=changeclicker', |
{ href => '/adm/preferences?action=changeclicker', |
text => 'Register Clicker'}, |
text => 'Register Clicker'}, |
}, |
}, |
{ action => 'verify_and_change_clicker', |
{ action => 'verify_and_change_clicker', |
subroutine => \&verify_and_change_clicker, |
subroutine => \&verify_and_change_clicker, |
breadcrumb => |
breadcrumb => |
{ href => '/adm/preferences?action=changeclicker', |
{ href => '/adm/preferences?action=changeclicker', |
text => 'Register Clicker'}, |
text => 'Register Clicker'}, |
printmenu => 'yes', |
printmenu => 'yes', |
})); |
})); |
|
} |
my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']); |
my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']); |
if (keys(%author_roles) > 0) { |
if (keys(%author_roles) > 0) { |
push (@Options,({ action => 'changedomcoord', |
push (@Options,({ action => 'changedomcoord', |
Line 2041 sub handler {
|
Line 2037 sub handler {
|
})); |
})); |
} |
} |
|
|
if (&can_toggle_debug()) { |
if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) { |
push (@Options,({ action => 'debugtoggle', |
push (@Options,({ action => 'debugtoggle', |
printmenu => 'yes', |
printmenu => 'yes', |
subroutine => \&toggle_debug, |
subroutine => \&toggle_debug, |
Line 2073 sub handler {
|
Line 2069 sub handler {
|
|| ($printmenu eq 'not_on_error' && !$error) ) |
|| ($printmenu eq 'not_on_error' && !$error) ) |
&& (!$env{'form.returnurl'})) { |
&& (!$env{'form.returnurl'})) { |
my $optionlist = '<table cellpadding="5">'; |
my $optionlist = '<table cellpadding="5">'; |
if (&can_toggle_debug()) { |
if ($env{'user.name'} =~ |
|
/^(albertel|kortemey|fox|foxr|korte|hallmat3|turtle|raeburn)$/ |
|
) { |
push (@Options,({ action => 'debugtoggle', |
push (@Options,({ action => 'debugtoggle', |
linktext => 'Toggle Debug Messages', |
linktext => 'Toggle Debug Messages', |
text => 'Current Debug status is: '. |
text => 'Current Debug status is -'. |
($env{'user.debug'} ? 'on' : 'off'), |
$env{'user.debug'}.'-.', |
href => '/adm/preferences', |
href => '/adm/preferences', |
printmenu => 'yes', |
printmenu => 'yes', |
subroutine => \&toggle_debug, |
subroutine => \&toggle_debug, |
Line 2119 sub handler {
|
Line 2117 sub handler {
|
} |
} |
|
|
sub toggle_debug { |
sub toggle_debug { |
if (&can_toggle_debug()) { |
if ($env{'user.debug'}) { |
if ($env{'user.debug'}) { |
&Apache::lonnet::delenv('user.debug'); |
&Apache::lonnet::delenv('user.debug'); |
} else { |
} else { |
&Apache::lonnet::appenv({'user.debug' => 1}); |
&Apache::lonnet::appenv({'user.debug' => 1}); |
|
} |
|
} |
|
} |
|
|
|
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__ |