version 1.43, 2004/05/25 22:00:21
|
version 1.46, 2004/07/09 21:05:14
|
Line 92 sub des_decrypt {
|
Line 92 sub des_decrypt {
|
################################################################ |
################################################################ |
# Language Change Subroutines # |
# Language Change Subroutines # |
################################################################ |
################################################################ |
|
|
|
sub wysiwygchanger { |
|
my $r = shift; |
|
my %userenv = &Apache::lonnet::get |
|
('environment',['wysiwygeditor']); |
|
my $offselect=''; |
|
my $onselect='checked="1"'; |
|
if ($userenv{'wysiwygeditor'}) { |
|
$onselect=''; |
|
$offselect='checked="1"'; |
|
} |
|
my $switchoff=&mt('Disable WYSIWYG editor'); |
|
my $switchon=&mt('Enable WYSIWYG editor'); |
|
$r->print(<<ENDLSCREEN); |
|
<form name="server" action="/adm/preferences" method="post"> |
|
<input type="hidden" name="action" value="set_wysiwyg" /> |
|
<br /> |
|
<input type="radio" name="wysiwyg" value="off" $onselect /> $switchoff<br /> |
|
<input type="radio" name="wysiwyg" value="on" $offselect /> $switchon |
|
ENDLSCREEN |
|
$r->print('<br /><input type="submit" value="'.&mt('Change').'" />'); |
|
} |
|
|
|
|
|
sub verify_and_change_wysiwyg { |
|
my $r = shift; |
|
my $newsetting=$ENV{'form.wysiwyg'}; |
|
&Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting}); |
|
&Apache::lonnet::appenv('environment.wysiwygeditor' => $newsetting); |
|
$r->print('<p>'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'</p>'); |
|
} |
|
|
|
################################################################ |
|
# Language Change Subroutines # |
|
################################################################ |
sub languagechanger { |
sub languagechanger { |
my $r = shift; |
my $r = shift; |
my $user = $ENV{'user.name'}; |
my $user = $ENV{'user.name'}; |
Line 787 sub handler {
|
Line 822 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
# |
# |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['action']); |
['action','wysiwyg','returnurl']); |
# |
# |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
Line 853 sub handler {
|
Line 888 sub handler {
|
push (@Options,{ action => 'none', |
push (@Options,{ action => 'none', |
linktext => |
linktext => |
q{Edit the 'About Me' Personal Information Screen}, |
q{Edit the 'About Me' Personal Information Screen}, |
|
help => 'Prefs_About_Me', |
href => $aboutmeaction}); |
href => $aboutmeaction}); |
push (@Options,({ action => 'changecolors', |
push (@Options,({ action => 'changecolors', |
linktext => 'Change Color Scheme', |
linktext => 'Change Color Scheme', |
Line 873 sub handler {
|
Line 909 sub handler {
|
push (@Options,({ action => 'changelanguages', |
push (@Options,({ action => 'changelanguages', |
linktext => 'Change Language Preferences', |
linktext => 'Change Language Preferences', |
href => '/adm/preferences', |
href => '/adm/preferences', |
|
help => 'Prefs_Language', |
breadcrumb=> |
breadcrumb=> |
{ href => '/adm/preferences?action=changelanguages', |
{ href => '/adm/preferences?action=changelanguages', |
text => 'Change Language'}, |
text => 'Change Language'}, |
Line 885 sub handler {
|
Line 922 sub handler {
|
printmenu => 'yes', |
printmenu => 'yes', |
subroutine=>\&verify_and_change_languages, } |
subroutine=>\&verify_and_change_languages, } |
)); |
)); |
|
push (@Options,({ action => 'changewysiwyg', |
|
linktext => 'Change WYSIWYG Editor Preferences', |
|
href => '/adm/preferences', |
|
breadcrumb => |
|
{ href => '/adm/preferences?action=changewysiwyg', |
|
text => 'Change WYSIWYG Preferences'}, |
|
subroutine => \&wysiwygchanger, |
|
}, |
|
{ action => 'set_wysiwyg', |
|
breadcrumb => |
|
{ href => '/adm/preferences?action=changewysiwyg', |
|
text => 'Change WYSIWYG Preferences'}, |
|
printmenu => 'yes', |
|
subroutine => \&verify_and_change_wysiwyg, } |
|
)); |
push (@Options,({ action => 'changediscussions', |
push (@Options,({ action => 'changediscussions', |
linktext => 'Change Discussion Display Preferences', |
linktext => 'Change Discussion Display Preferences', |
href => '/adm/preferences', |
href => '/adm/preferences', |
|
help => 'Change_Discussion_Display', |
breadcrumb => |
breadcrumb => |
{ href => '/adm/preferences?action=changediscussions', |
{ href => '/adm/preferences?action=changediscussions', |
text => 'Change Discussion Preferences'}, |
text => 'Change Discussion Preferences'}, |
Line 931 ENDHEADER
|
Line 984 ENDHEADER
|
if (defined($call)) { |
if (defined($call)) { |
$call->($r); |
$call->($r); |
} |
} |
if ($printmenu eq 'yes') { |
if (($printmenu eq 'yes') && (!$ENV{'form.returnurl'})) { |
my $optionlist = '<table cellpadding="5">'; |
my $optionlist = '<table cellpadding="5">'; |
if ($ENV{'user.name'} =~ |
if ($ENV{'user.name'} =~ |
/^(albertel|kortemey|korte|hallmat3|turtle)$/ |
/^(albertel|kortemey|korte|hallmat3|turtle)$/ |
Line 971 ENDHEADER
|
Line 1024 ENDHEADER
|
} |
} |
$optionlist .= '</table>'; |
$optionlist .= '</table>'; |
$r->print($optionlist); |
$r->print($optionlist); |
|
} elsif ($ENV{'form.returnurl'}) { |
|
$r->print('<br /><a href="'.$ENV{'form.returnurl'}.'"><font size="+1">'. |
|
&mt('Return').'</font></a>'); |
} |
} |
$r->print(<<ENDFOOTER); |
$r->print(<<ENDFOOTER); |
</body> |
</body> |