version 1.196.4.22, 2016/09/16 22:47:17
|
version 1.196.4.24, 2018/09/03 14:03:03
|
Line 722 sub domcoordchanger {
|
Line 722 sub domcoordchanger {
|
my $text=&mt('By default, the Domain Coordinator can enter your Authoring Space.'); |
my $text=&mt('By default, the Domain Coordinator can enter your Authoring Space.'); |
my $construction=&mt('Block access to Authoring Space'); |
my $construction=&mt('Block access to Authoring Space'); |
my $change=&mt('Save'); |
my $change=&mt('Save'); |
|
my $returnurl = &HTML::Entities::encode($env{'form.returnurl'},'"<>&\''); |
$r->print(<<ENDSCREEN); |
$r->print(<<ENDSCREEN); |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
|
<input type="hidden" name="returnurl" value="$returnurl" /> |
<input type="hidden" name="action" value="verify_and_change_domcoord" /> |
<input type="hidden" name="action" value="verify_and_change_domcoord" /> |
$text<br /> |
$text<br /> |
<label><input type="checkbox" name="construction"$constchecked />$construction</label><br /> |
<label><input type="checkbox" name="construction"$constchecked />$construction</label><br /> |
Line 748 sub verify_and_change_domcoord {
|
Line 750 sub verify_and_change_domcoord {
|
} |
} |
my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Block access to Authoring Space').'</i>','<tt>'.$status.'</tt>')); |
my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Block access to Authoring Space').'</i>','<tt>'.$status.'</tt>')); |
$message=&Apache::loncommon::confirmwrapper($message); |
$message=&Apache::loncommon::confirmwrapper($message); |
&print_main_menu($r,$message); |
if ($env{'form.returnurl'}) { |
|
&do_redirect($r,$env{'form.returnurl'},$message); |
|
} else { |
|
&print_main_menu($r,$message); |
|
} |
} |
} |
|
|
################################################################# |
################################################################# |
Line 1154 sub colorschanger {
|
Line 1160 sub colorschanger {
|
' . $colorchooser . ' |
' . $colorchooser . ' |
</script> |
</script> |
'); |
'); |
|
|
$r->print(<<ENDCOL); |
$r->print(<<ENDCOL); |
|
|
<form name="parmform" action=""> |
<form name="parmform" action=""> |
Line 1472 sub server_form {
|
Line 1477 sub server_form {
|
} |
} |
|
|
sub verify_and_change_password { |
sub verify_and_change_password { |
my ($r,$caller,$mailtoken) = @_; |
my ($r,$caller,$mailtoken,$ended) = @_; |
my ($user,$domain,$homeserver); |
my ($user,$domain,$homeserver); |
my ($blocked,$blocktext) = |
my ($blocked,$blocktext) = |
&Apache::loncommon::blocking_status('passwd'); |
&Apache::loncommon::blocking_status('passwd'); |
Line 1617 ENDERROR
|
Line 1622 ENDERROR
|
$r->print($message.'<br />'); |
$r->print($message.'<br />'); |
} else { |
} else { |
&print_main_menu($r, $message); |
&print_main_menu($r, $message); |
|
if (ref($ended)) { |
|
$$ended = 1; |
|
} |
} |
} |
} else { |
} else { |
# error error: run in circles, scream and shout |
# error error: run in circles, scream and shout |
Line 1631 ENDERROR
|
Line 1639 ENDERROR
|
&mt("The password for user [_1] was not changed.",'<i>'.$user.'</i>').' '.&mt('Please make sure your old password was entered correctly.'),1); |
&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); |
|
if (ref($ended)) { |
|
$$ended = 1; |
|
} |
} |
} |
} |
} |
return; |
return; |
Line 1885 sub author_space_settings {
|
Line 1896 sub author_space_settings {
|
my $text=&mt('By default, CodeMirror an editor with advanced functionality for editing code is activated for authors.'); |
my $text=&mt('By default, CodeMirror an editor with advanced functionality for editing code is activated for authors.'); |
my $cmoff=&mt('Deactivate CodeMirror. This can improve performance on slow computers and accessibility.'); |
my $cmoff=&mt('Deactivate CodeMirror. This can improve performance on slow computers and accessibility.'); |
my $change=&mt('Save'); |
my $change=&mt('Save'); |
|
my $returnurl = &HTML::Entities::encode($env{'form.returnurl'},'"<>&\''); |
$r->print(<<ENDSCREEN); |
$r->print(<<ENDSCREEN); |
<form name="prefs" action="/adm/preferences" method="post"> |
<form name="prefs" action="/adm/preferences" method="post"> |
|
<input type="hidden" name="returnurl" value="$returnurl" /> |
<input type="hidden" name="action" value="change_authoring_settings" /> |
<input type="hidden" name="action" value="change_authoring_settings" /> |
$text<br /> |
$text<br /> |
<label><input type="checkbox" name="cmoff"$constchecked />$cmoff</label><br /> |
<label><input type="checkbox" name="cmoff"$constchecked />$cmoff</label><br /> |
Line 1914 sub change_authoring_settings {
|
Line 1927 sub change_authoring_settings {
|
} |
} |
my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Deactivate CodeMirror in Authoring Space').'</i>','<tt>'.$status.'</tt>')); |
my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Deactivate CodeMirror in Authoring Space').'</i>','<tt>'.$status.'</tt>')); |
$message=&Apache::loncommon::confirmwrapper($message); |
$message=&Apache::loncommon::confirmwrapper($message); |
&print_main_menu($r,$message); |
if ($env{'form.returnurl'}) { |
|
&do_redirect($r,$env{'form.returnurl'},$message); |
|
} else { |
|
&print_main_menu($r,$message); |
|
} |
} |
} |
} |
} |
|
|
Line 2185 push(@{ $menu[4]->{items} }, {
|
Line 2202 push(@{ $menu[4]->{items} }, {
|
linktext => 'Authoring Space Configuration', |
linktext => 'Authoring Space Configuration', |
url => '/adm/preferences?action=authorsettings', |
url => '/adm/preferences?action=authorsettings', |
permission => 'F', |
permission => 'F', |
icon => 'course_ini.png', |
icon => 'codemirror.png', |
linktitle => 'Settings for your authoring space.', |
linktitle => 'Settings for your authoring space.', |
}); |
}); |
} |
} |
Line 2227 sub handler {
|
Line 2244 sub handler {
|
['action','wysiwyg','returnurl','refpage']); |
['action','wysiwyg','returnurl','refpage']); |
# |
# |
Apache::lonhtmlcommon::clear_breadcrumbs(); |
Apache::lonhtmlcommon::clear_breadcrumbs(); |
my ($brlink,$brtxt,$brhelp); |
my ($brlink,$brtxt,$brhelp,$ended); |
if (($env{'form.action'} eq 'changerolespref') && ($env{'form.returnurl'} eq '/adm/roles')) { |
if (($env{'form.action'} eq 'changerolespref') && ($env{'form.returnurl'} eq '/adm/roles')) { |
$brlink ='/adm/roles'; |
$brlink ='/adm/roles'; |
$brtxt = 'User Roles'; |
$brtxt = 'User Roles'; |
|
} elsif ((($env{'form.action'} eq 'changedomcoord') || |
|
($env{'form.action'} eq 'authorsettings')) && |
|
(($env{'form.returnurl'} =~ m{^/(priv/|res($|/))}) || |
|
($env{'form.returnurl'} eq '/adm/createuser'))) { |
|
$brlink = $env{'form.returnurl'}; |
|
if ($env{'form.returnurl'} eq '/adm/createuser') { |
|
$brtxt = 'User Management'; |
|
} elsif ($env{'form.returnurl'} =~ m{^/res($\/)}) { |
|
$brtxt = 'Browse published resources'; |
|
} else { |
|
$brtxt = 'Authoring Space'; |
|
} |
} else { |
} else { |
$brlink ='/adm/preferences'; |
$brlink ='/adm/preferences'; |
$brtxt = 'Set User Preferences'; |
$brtxt = 'Set User Preferences'; |
Line 2242 sub handler {
|
Line 2271 sub handler {
|
help => $brhelp,}); |
help => $brhelp,}); |
if(!exists $env{'form.action'}) { |
if(!exists $env{'form.action'}) { |
&print_main_menu($r); |
&print_main_menu($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changepass'){ |
}elsif($env{'form.action'} eq 'changepass'){ |
&passwordchanger($r); |
&passwordchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_pass'){ |
}elsif($env{'form.action'} eq 'verify_and_change_pass'){ |
&verify_and_change_password($r,'preferences'); |
&verify_and_change_password($r,'preferences','',\$ended); |
}elsif($env{'form.action'} eq 'changescreenname'){ |
}elsif($env{'form.action'} eq 'changescreenname'){ |
&screennamechanger($r); |
&screennamechanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_screenname'){ |
}elsif($env{'form.action'} eq 'verify_and_change_screenname'){ |
&verify_and_change_screenname($r); |
&verify_and_change_screenname($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changemsgforward'){ |
}elsif($env{'form.action'} eq 'changemsgforward'){ |
&msgforwardchanger($r); |
&msgforwardchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_msgforward'){ |
}elsif($env{'form.action'} eq 'verify_and_change_msgforward'){ |
Line 2258 sub handler {
|
Line 2289 sub handler {
|
&colorschanger($r); |
&colorschanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_colors'){ |
}elsif($env{'form.action'} eq 'verify_and_change_colors'){ |
&verify_and_change_colors($r); |
&verify_and_change_colors($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changelanguages'){ |
}elsif($env{'form.action'} eq 'changelanguages'){ |
&languagechanger($r); |
&languagechanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_languages'){ |
}elsif($env{'form.action'} eq 'verify_and_change_languages'){ |
&verify_and_change_languages($r); |
&verify_and_change_languages($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changewysiwyg'){ |
}elsif($env{'form.action'} eq 'changewysiwyg'){ |
&wysiwygchanger($r); |
&wysiwygchanger($r); |
}elsif($env{'form.action'} eq 'set_wysiwyg'){ |
}elsif($env{'form.action'} eq 'set_wysiwyg'){ |
&verify_and_change_wysiwyg($r); |
&verify_and_change_wysiwyg($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changediscussions'){ |
}elsif($env{'form.action'} eq 'changediscussions'){ |
&discussionchanger($r); |
&discussionchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_discussion'){ |
}elsif($env{'form.action'} eq 'verify_and_change_discussion'){ |
&verify_and_change_discussion($r); |
&verify_and_change_discussion($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changerolespref'){ |
}elsif($env{'form.action'} eq 'changerolespref'){ |
&rolesprefchanger($r); |
&rolesprefchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_rolespref'){ |
}elsif($env{'form.action'} eq 'verify_and_change_rolespref'){ |
&verify_and_change_rolespref($r); |
&verify_and_change_rolespref($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changetexenginepref'){ |
}elsif($env{'form.action'} eq 'changetexenginepref'){ |
&texenginechanger($r); |
&texenginechanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_texengine'){ |
}elsif($env{'form.action'} eq 'verify_and_change_texengine'){ |
&verify_and_change_texengine($r); |
&verify_and_change_texengine($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changeicons'){ |
}elsif($env{'form.action'} eq 'changeicons'){ |
&iconchanger($r); |
&iconchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_icons'){ |
}elsif($env{'form.action'} eq 'verify_and_change_icons'){ |
&verify_and_change_icons($r); |
&verify_and_change_icons($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changeclicker'){ |
}elsif($env{'form.action'} eq 'changeclicker'){ |
&clickerchanger($r); |
&clickerchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_clicker'){ |
}elsif($env{'form.action'} eq 'verify_and_change_clicker'){ |
&verify_and_change_clicker($r); |
&verify_and_change_clicker($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'changedomcoord'){ |
}elsif($env{'form.action'} eq 'changedomcoord'){ |
&domcoordchanger($r); |
&domcoordchanger($r); |
}elsif($env{'form.action'} eq 'verify_and_change_domcoord'){ |
}elsif($env{'form.action'} eq 'verify_and_change_domcoord'){ |
&verify_and_change_domcoord($r); |
&verify_and_change_domcoord($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'lockwarning'){ |
}elsif($env{'form.action'} eq 'lockwarning'){ |
&lockwarning($r); |
&lockwarning($r); |
}elsif($env{'form.action'} eq 'verify_and_change_locks'){ |
}elsif($env{'form.action'} eq 'verify_and_change_locks'){ |
Line 2298 sub handler {
|
Line 2338 sub handler {
|
&coursedisplaychanger($r); |
&coursedisplaychanger($r); |
}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); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'authorsettings'){ |
}elsif($env{'form.action'} eq 'authorsettings'){ |
&author_space_settings($r); |
&author_space_settings($r); |
}elsif($env{'form.action'} eq 'change_authoring_settings'){ |
}elsif($env{'form.action'} eq 'change_authoring_settings'){ |
&change_authoring_settings($r); |
&change_authoring_settings($r); |
|
$ended = 1; |
}elsif($env{'form.action'} eq 'debugtoggle'){ |
}elsif($env{'form.action'} eq 'debugtoggle'){ |
if (&can_toggle_debug()) { |
if (&can_toggle_debug()) { |
&toggle_debug(); |
&toggle_debug(); |
} |
} |
&print_main_menu($r); |
&print_main_menu($r); |
|
$ended = 1; |
} elsif ($env{'form.action'} eq 'changelockednames') { |
} elsif ($env{'form.action'} eq 'changelockednames') { |
&lockednameschanger($r); |
&lockednameschanger($r); |
} elsif ($env{'form.action'} eq 'verify_and_change_lockednames') { |
} elsif ($env{'form.action'} eq 'verify_and_change_lockednames') { |
&verify_and_change_lockednames($r); |
&verify_and_change_lockednames($r); |
|
$ended = 1; |
} |
} |
|
|
# Properly end the HTML page of all preference pages |
# Properly end the HTML page of all preference pages |
# started in each sub routine |
# started in each sub routine |
# Exception: print_main_menu has its own end_page call |
# Exception: print_main_menu has its own end_page call |
unless (!exists $env{'form.action'} || |
unless ($ended) { |
$env{'form.action'} eq 'debugtoggle') { |
|
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
Line 2390 sub updateable_userinfo {
|
Line 2433 sub updateable_userinfo {
|
return %updateable; |
return %updateable; |
} |
} |
|
|
|
sub do_redirect { |
|
my ($r,$url,$msg) = @_; |
|
$r->print( |
|
&Apache::loncommon::start_page('Switching Server ...',undef, |
|
{'redirect' => [0.5,$url]}). |
|
'<div style="padding:0;clear:both;margin:0;border:0"></div>'."\n". |
|
"$msg\n". |
|
&Apache::loncommon::end_page()); |
|
return; |
|
} |
|
|
1; |
1; |
__END__ |
__END__ |