version 1.138, 2009/02/17 21:18:05
|
version 1.156, 2009/05/04 19:35:31
|
Line 101 sub wysiwygchanger {
|
Line 101 sub wysiwygchanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changewysiwyg', |
{ href => '/adm/preferences?action=changewysiwyg', |
text => 'Change WYSIWYG Preferences'}); |
text => 'Change WYSIWYG Preferences'}); |
$r->print(Apache::loncommon::start_page('Change WYSIWYG Preferences')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change WYSIWYG Preferences')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change WYSIWYG Preferences')); |
|
|
my %userenv = &Apache::lonnet::get |
my %userenv = &Apache::lonnet::get |
Line 135 sub verify_and_change_wysiwyg {
|
Line 135 sub verify_and_change_wysiwyg {
|
my $newsetting=$env{'form.wysiwyg'}; |
my $newsetting=$env{'form.wysiwyg'}; |
&Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting}); |
&Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting}); |
&Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting}); |
&Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting}); |
# $r->print('<p>'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'</p>'); |
&print_main_menu($r,'<p>'.&Apache::lonhtmlcommon::confirm_success(&mt('Setting WYSIWYG editor to:').' ' |
print_main_menu($r,'<p>'.&mt('Setting WYSIWYG editor to:').' ' |
.&mt($newsetting)).'</p>'); |
.&mt($newsetting).'</p>'); |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 149 sub languagechanger {
|
Line 148 sub languagechanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changelanguages', |
{ href => '/adm/preferences?action=changelanguages', |
text => 'Change Language'}); |
text => 'Change Language'}); |
$r->print(Apache::loncommon::start_page('Change Language')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); |
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
Line 187 sub verify_and_change_languages {
|
Line 186 sub verify_and_change_languages {
|
if ($newlanguage) { |
if ($newlanguage) { |
&Apache::lonnet::put('environment',{'languages' => $newlanguage}); |
&Apache::lonnet::put('environment',{'languages' => $newlanguage}); |
&Apache::lonnet::appenv({'environment.languages' => $newlanguage}); |
&Apache::lonnet::appenv({'environment.languages' => $newlanguage}); |
$message=&mt('Set new preferred languages to ').'<tt>"'.$newlanguage.'"</tt>.'; |
$message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new preferred languages to ').'<tt>"'.$newlanguage.'"</tt>.'); |
} else { |
} else { |
&Apache::lonnet::del('environment',['languages']); |
&Apache::lonnet::del('environment',['languages']); |
&Apache::lonnet::delenv('environment\.languages'); |
&Apache::lonnet::delenv('environment.languages'); |
$message=&mt('Reset preferred language.'); |
$message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred language.')); |
} |
} |
&Apache::loncommon::flush_langs_cache($user,$domain); |
&Apache::loncommon::flush_langs_cache($user,$domain); |
print_main_menu($r, $message); |
&print_main_menu($r, $message); |
# $r->print(<<ENDVCSCREEN); |
|
#$message |
|
#ENDVCSCREEN |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 208 sub texenginechanger {
|
Line 204 sub texenginechanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changetexenginepref', |
{ href => '/adm/preferences?action=changetexenginepref', |
text => 'Change How Math Equations Are Displayed'}); |
text => 'Change How Math Equations Are Displayed'}); |
$r->print(Apache::loncommon::start_page('Change How Math Equations Are Displayed')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change How Math Equations Are Displayed')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change How Math Equations Are Displayed')); |
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
Line 251 $lt{'exmpl'}
|
Line 247 $lt{'exmpl'}
|
<h3>$lt{'jsmath'}</h3> |
<h3>$lt{'jsmath'}</h3> |
<p> |
<p> |
$jsMath_start |
$jsMath_start |
<script type="text/javascript"> |
<script type="text/javascript" language="JavaScript"> |
if (jsMath.nofonts == 1) { |
if (jsMath.nofonts == 1) { |
document.writeln |
document.writeln |
('<div style="padding: 10; border-style: solid; border-width:3;' |
('<div style="padding: 10; border-style: solid; border-width:3;' |
Line 281 if (jsMath.nofonts == 1) {
|
Line 277 if (jsMath.nofonts == 1) {
|
</p> |
</p> |
ENDLSCREEN |
ENDLSCREEN |
if ($env{'environment.texengine'} ne 'jsMath') { |
if ($env{'environment.texengine'} ne 'jsMath') { |
$r->print('<script type="text/javascript">jsMath.Process()</script>'); |
$r->print('<script type="text/javascript" language="JavaScript">jsMath.Process()</script>'); |
} |
} |
} |
} |
|
|
Line 304 sub verify_and_change_texengine {
|
Line 300 sub verify_and_change_texengine {
|
if ($newtexengine) { |
if ($newtexengine) { |
&Apache::lonnet::put('environment',{'texengine' => $newtexengine}); |
&Apache::lonnet::put('environment',{'texengine' => $newtexengine}); |
&Apache::lonnet::appenv({'environment.texengine' => $newtexengine}); |
&Apache::lonnet::appenv({'environment.texengine' => $newtexengine}); |
$message=&mt('Set new preferred math display to ').'<tt>"'.$newtexengine.'"</tt>.'; |
$message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new preferred math display to ').'<tt>"'.$newtexengine.'"</tt>.'); |
} else { |
} else { |
&Apache::lonnet::del('environment',['texengine']); |
&Apache::lonnet::del('environment',['texengine']); |
&Apache::lonnet::delenv('environment\.texengine'); |
&Apache::lonnet::delenv('environment.texengine'); |
$message=&mt('Reset preferred math display.'); |
$message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred math display.')); |
} |
} |
|
&print_main_menu($r, $message); |
|
|
# $r->print(<<ENDVCSCREEN); |
|
#$message |
|
#ENDVCSCREEN |
|
print_main_menu($r, $message); |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 332 sub rolesprefchanger {
|
Line 323 sub rolesprefchanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changerolespref', |
{ href => '/adm/preferences?action=changerolespref', |
text => 'Change '.$role.' Page Pref'}); |
text => 'Change '.$role.' Page Pref'}); |
$r->print(Apache::loncommon::start_page('Change '.$role.' Page Pref')); |
$r->print(Apache::loncommon::start_page('Content Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change '.$role.' Page Pref')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change '.$role.' Page Pref')); |
my $hotlist_flag=$userenv{'recentroles'}; |
my $hotlist_flag=$userenv{'recentroles'}; |
my $hotlist_n=$userenv{'recentrolesn'}; |
my $hotlist_n=$userenv{'recentrolesn'}; |
Line 452 sub verify_and_change_rolespref {
|
Line 443 sub verify_and_change_rolespref {
|
$message=&mt('Recent '.$role.'s Hotlist is Enabled'); |
$message=&mt('Recent '.$role.'s Hotlist is Enabled'); |
} else { |
} else { |
&Apache::lonnet::del('environment',['recentroles']); |
&Apache::lonnet::del('environment',['recentroles']); |
&Apache::lonnet::delenv('environment\.recentroles'); |
&Apache::lonnet::delenv('environment.recentroles'); |
$message=&mt('Recent '.$role.'s Hotlist is Disabled'); |
$message=&mt('Recent '.$role.'s Hotlist is Disabled'); |
} |
} |
if ($hotlist_n) { |
if ($hotlist_n) { |
Line 482 sub verify_and_change_rolespref {
|
Line 473 sub verify_and_change_rolespref {
|
# Unset any roles that were previously frozen but aren't in list |
# Unset any roles that were previously frozen but aren't in list |
foreach my $role_key (sort(keys(%recent_roles))) { |
foreach my $role_key (sort(keys(%recent_roles))) { |
if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) { |
if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) { |
$message .= "<br />".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n"; |
$message .= "<br />".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key}))."\n"; |
&Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0); |
&Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0); |
} |
} |
} |
} |
Line 490 sub verify_and_change_rolespref {
|
Line 481 sub verify_and_change_rolespref {
|
# Freeze selected roles |
# Freeze selected roles |
foreach my $role_key (@freeze_list) { |
foreach my $role_key (@freeze_list) { |
if (!$frozen_roles{$role_key}) { |
if (!$frozen_roles{$role_key}) { |
$message .= "<br />".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n"; |
$message .= "<br />". |
|
&Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',$role_text{$role_key}))."\n"; |
&Apache::lonhtmlcommon::store_recent('roles', |
&Apache::lonhtmlcommon::store_recent('roles', |
$role_key,' ',1); |
$role_key,' ',1); |
} |
} |
} |
} |
$message .= "<hr /><br />\n"; |
$message .= "<hr /><br />\n"; |
|
&print_main_menu($r, $message); |
# $r->print(<<ENDRPSCREEN); |
|
#$message |
|
#ENDRPSCREEN |
|
print_main_menu($r, $message); |
|
} |
} |
|
|
|
|
Line 519 sub screennamechanger {
|
Line 507 sub screennamechanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changescreenname', |
{ href => '/adm/preferences?action=changescreenname', |
text => 'Change Screen Name'}); |
text => 'Change Screen Name'}); |
$r->print(Apache::loncommon::start_page('Change Screen Name')); |
$r->print(Apache::loncommon::start_page('Personal Data')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Screen Name')); |
$r->print('<p>' |
$r->print('<p>' |
.&mt('Change the name that is displayed in your posts.') |
.&mt('Change the name that is displayed in your posts.') |
Line 553 sub verify_and_change_screenname {
|
Line 541 sub verify_and_change_screenname {
|
if ($newscreen) { |
if ($newscreen) { |
&Apache::lonnet::put('environment',{'screenname' => $newscreen}); |
&Apache::lonnet::put('environment',{'screenname' => $newscreen}); |
&Apache::lonnet::appenv({'environment.screenname' => $newscreen}); |
&Apache::lonnet::appenv({'environment.screenname' => $newscreen}); |
$message=&mt('Set new screenname to ').'<tt>"'.$newscreen.'."</tt>.'; |
$message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new screenname to ').'<tt>"'.$newscreen.'."</tt>.'); |
} else { |
} else { |
&Apache::lonnet::del('environment',['screenname']); |
&Apache::lonnet::del('environment',['screenname']); |
&Apache::lonnet::delenv('environment\.screenname'); |
&Apache::lonnet::delenv('environment.screenname'); |
$message=&mt('Reset screenname.'); |
$message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset screenname.')); |
} |
} |
# Nickname |
# Nickname |
$message.='<br />'; |
$message.='<br />'; |
Line 566 sub verify_and_change_screenname {
|
Line 554 sub verify_and_change_screenname {
|
if ($newscreen) { |
if ($newscreen) { |
&Apache::lonnet::put('environment',{'nickname' => $newscreen}); |
&Apache::lonnet::put('environment',{'nickname' => $newscreen}); |
&Apache::lonnet::appenv({'environment.nickname' => $newscreen}); |
&Apache::lonnet::appenv({'environment.nickname' => $newscreen}); |
$message.=&mt('Set new nickname to ').'<tt>"'.$newscreen.'"</tt>.'; |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set new nickname to ').'<tt>"'.$newscreen.'"</tt>.'); |
} else { |
} else { |
&Apache::lonnet::del('environment',['nickname']); |
&Apache::lonnet::del('environment',['nickname']); |
&Apache::lonnet::delenv('environment\.nickname'); |
&Apache::lonnet::delenv('environment.nickname'); |
$message.=&mt('Reset nickname.'); |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset nickname.')); |
} |
} |
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain); |
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain); |
# $r->print(<<ENDVCSCREEN); |
&print_main_menu($r, $message); |
#$message |
|
#ENDVCSCREEN |
|
print_main_menu($r, $message); |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 584 sub verify_and_change_screenname {
|
Line 569 sub verify_and_change_screenname {
|
################################################################ |
################################################################ |
sub iconchanger { |
sub iconchanger { |
my $r = shift; |
my $r = shift; |
Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changeicons', |
{ href => '/adm/preferences?action=changeicons', |
text => 'Change Main Menu'}); |
text => 'Change Main Menu'}); |
$r->print(Apache::loncommon::start_page('Change Main Menu')); |
$r->print(Apache::loncommon::start_page('Page Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Main Menu')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Main Menu')); |
|
|
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
Line 628 sub verify_and_change_icons {
|
Line 613 sub verify_and_change_icons {
|
|
|
&Apache::lonnet::put('environment',{'icons' => $newicons}); |
&Apache::lonnet::put('environment',{'icons' => $newicons}); |
&Apache::lonnet::appenv({'environment.icons' => $newicons}); |
&Apache::lonnet::appenv({'environment.icons' => $newicons}); |
# $r->print(&mt('Set menu mode to [_1].',$newicons)); |
&print_main_menu($r, &Apache::lonhtmlcommon::confirm_success(&mt('Set menu mode to [_1].',$newicons))); |
print_main_menu($r, &mt('Set menu mode to [_1].',$newicons)); |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 638 sub verify_and_change_icons {
|
Line 622 sub verify_and_change_icons {
|
|
|
sub clickerchanger { |
sub clickerchanger { |
my $r = shift; |
my $r = shift; |
Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changeclicker', |
{ href => '/adm/preferences?action=changeclicker', |
text => 'Register Clicker'}); |
text => 'Register Clicker'}); |
$r->print(Apache::loncommon::start_page('Register Clicker')); |
$r->print(Apache::loncommon::start_page('Other')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker')); |
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
Line 650 sub clickerchanger {
|
Line 634 sub clickerchanger {
|
my $clickers=$userenv{'clickers'}; |
my $clickers=$userenv{'clickers'}; |
$clickers=~s/\,/\n/gs; |
$clickers=~s/\,/\n/gs; |
my $text=&mt('Enter response device ("clicker") numbers'); |
my $text=&mt('Enter response device ("clicker") numbers'); |
my $change=&mt('Register'); |
my $change=&mt('Save'); |
my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID')); |
my $helplink=&Apache::loncommon::help_open_topic('Clicker_Registration',&mt('Locating your clicker ID')); |
$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="action" value="verify_and_change_clicker" /> |
<input type="hidden" name="action" value="verify_and_change_clicker" /> |
<label>$text $helplink<br /> |
<label>$helplink<br /><br />$text<br /> |
<textarea name="clickers" rows="5" cols="20">$clickers</textarea> |
<textarea name="clickers" rows="5" cols="20">$clickers</textarea> |
</label> |
</label> |
|
<br /> |
<input type="submit" value="$change" /> |
<input type="submit" value="$change" /> |
</form> |
</form> |
ENDSCREEN |
ENDSCREEN |
Line 676 sub verify_and_change_clicker {
|
Line 661 sub verify_and_change_clicker {
|
$newclickers=~s/\,$//; |
$newclickers=~s/\,$//; |
&Apache::lonnet::put('environment',{'clickers' => $newclickers}); |
&Apache::lonnet::put('environment',{'clickers' => $newclickers}); |
&Apache::lonnet::appenv({'environment.clickers' => $newclickers}); |
&Apache::lonnet::appenv({'environment.clickers' => $newclickers}); |
# $r->print(&mt('Registering clickers: [_1]',$newclickers)); |
&print_main_menu($r, &Apache::lonhtmlcommon::confirm_success(&mt('Registering clickers: [_1]',$newclickers))); |
print_main_menu($r, &mt('Registering clickers: [_1]',$newclickers)); |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 686 sub verify_and_change_clicker {
|
Line 670 sub verify_and_change_clicker {
|
|
|
sub domcoordchanger { |
sub domcoordchanger { |
my $r = shift; |
my $r = shift; |
Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changedomcoord', |
{ href => '/adm/preferences?action=changedomcoord', |
text => 'Restrict Domain Coordinator Access'}); |
text => 'Restrict Domain Coordinator Access'}); |
$r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access')); |
$r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access')); |
Line 720 sub verify_and_change_domcoord {
|
Line 704 sub verify_and_change_domcoord {
|
if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; } |
if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; } |
&Apache::lonnet::put('environment',\%domcoord); |
&Apache::lonnet::put('environment',\%domcoord); |
&Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}}); |
&Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}}); |
# $r->print(&mt('Registering Domain Coordinator access restrictions.')); |
&print_main_menu($r,&Apache::lonhtmlcommon::confirm_success(&mt('Registering Domain Coordinator access restrictions.'))); |
print_main_menu($r, &mt('Registering Domain Coordinator access restrictions.')); |
|
} |
} |
|
|
################################################################# |
################################################################# |
Line 789 sub msgforwardchanger {
|
Line 772 sub msgforwardchanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changemsgforward', |
{ href => '/adm/preferences?action=changemsgforward', |
text => 'Change Message Forwarding/Notification'}); |
text => 'Change Message Forwarding/Notification'}); |
$r->print(Apache::loncommon::start_page('Change Message Forwarding/Notification')); |
$r->print(Apache::loncommon::start_page('Message Management')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Message Forwarding/Notification')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Message Forwarding/Notification')); |
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); |
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding"); |
my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification"); |
my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification"); |
Line 798 sub msgforwardchanger {
|
Line 781 sub msgforwardchanger {
|
my %allnot = &get_notifications(\%userenv); |
my %allnot = &get_notifications(\%userenv); |
my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email(); |
my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email(); |
my $jscript = qq| |
my $jscript = qq| |
<script type="text/javascript"> |
<script type="text/javascript" language="JavaScript"> |
function validate() { |
function validate() { |
for (var i=0; i<document.prefs.numnotify.value; i++) { |
for (var i=0; i<document.prefs.numnotify.value; i++) { |
var checkaddress = 0; |
var checkaddress = 0; |
Line 1003 sub verify_and_change_msgforward {
|
Line 986 sub verify_and_change_msgforward {
|
.'<br />'; |
.'<br />'; |
} else { |
} else { |
&Apache::lonnet::del('environment',['msgforward']); |
&Apache::lonnet::del('environment',['msgforward']); |
&Apache::lonnet::delenv('environment\.msgforward'); |
&Apache::lonnet::delenv('environment.msgforward'); |
$message.= &mt("Set message forwarding to 'off'.").'<br />'; |
$message.= &mt("Set message forwarding to 'off'.").'<br />'; |
} |
} |
my $critnotification; |
my $critnotification; |
Line 1043 sub verify_and_change_msgforward {
|
Line 1026 sub verify_and_change_msgforward {
|
$message.=&mt('Set non-critical message notification address(es) to ').'<tt>"'.$notification.'"</tt>.<br />'; |
$message.=&mt('Set non-critical message notification address(es) to ').'<tt>"'.$notification.'"</tt>.<br />'; |
} else { |
} else { |
&Apache::lonnet::del('environment',['notification']); |
&Apache::lonnet::del('environment',['notification']); |
&Apache::lonnet::delenv('environment\.notification'); |
&Apache::lonnet::delenv('environment.notification'); |
$message.=&mt("Set non-critical message notification to 'off'.").'<br />'; |
$message.=&mt("Set non-critical message notification to 'off'.").'<br />'; |
} |
} |
if ($critnotification) { |
if ($critnotification) { |
Line 1052 sub verify_and_change_msgforward {
|
Line 1035 sub verify_and_change_msgforward {
|
$message.=&mt('Set critical message notification address(es) to ').'<tt>"'.$critnotification.'"</tt>.<br />'; |
$message.=&mt('Set critical message notification address(es) to ').'<tt>"'.$critnotification.'"</tt>.<br />'; |
} else { |
} else { |
&Apache::lonnet::del('environment',['critnotification']); |
&Apache::lonnet::del('environment',['critnotification']); |
&Apache::lonnet::delenv('environment\.critnotification'); |
&Apache::lonnet::delenv('environment.critnotification'); |
$message.=&mt("Set critical message notification to 'off'.").'<br />'; |
$message.=&mt("Set critical message notification to 'off'.").'<br />'; |
} |
} |
if ($critnotification || $notification) { |
if ($critnotification || $notification) { |
Line 1062 sub verify_and_change_msgforward {
|
Line 1045 sub verify_and_change_msgforward {
|
$message.=&mt('Set address(es) to receive excerpts with html retained ').'<tt>"'.$notify_with_html.'"</tt>.'; |
$message.=&mt('Set address(es) to receive excerpts with html retained ').'<tt>"'.$notify_with_html.'"</tt>.'; |
} else { |
} else { |
&Apache::lonnet::del('environment',['notifywithhtml']); |
&Apache::lonnet::del('environment',['notifywithhtml']); |
&Apache::lonnet::delenv('environment\.notifywithhtml'); |
&Apache::lonnet::delenv('environment.notifywithhtml'); |
if ($totaladdresses == 1) { |
if ($totaladdresses == 1) { |
$message.=&mt("Set notification address to receive excerpts with html stripped."); |
$message.=&mt("Set notification address to receive excerpts with html stripped."); |
} else { |
} else { |
Line 1071 sub verify_and_change_msgforward {
|
Line 1054 sub verify_and_change_msgforward {
|
} |
} |
} else { |
} else { |
&Apache::lonnet::del('environment',['notifywithhtml']); |
&Apache::lonnet::del('environment',['notifywithhtml']); |
&Apache::lonnet::delenv('environment\.notifywithhtml'); |
&Apache::lonnet::delenv('environment.notifywithhtml'); |
} |
} |
if ($message) { |
if ($message) { |
$message .= '<br /><hr />'; |
$message .= '<br /><hr />'; |
Line 1089 sub colorschanger {
|
Line 1072 sub colorschanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changecolors', |
{ href => '/adm/preferences?action=changecolors', |
text => 'Change Colors'}); |
text => 'Change Colors'}); |
$r->print(Apache::loncommon::start_page('Change Colors')); |
$r->print(Apache::loncommon::start_page('Page Display Settings')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Colors')); |
# figure out colors |
# figure out colors |
my $function=&Apache::loncommon::get_users_function(); |
my $function=&Apache::loncommon::get_users_function(); |
Line 1098 sub colorschanger {
|
Line 1081 sub colorschanger {
|
'tabbg' => 'Header Background', |
'tabbg' => 'Header Background', |
'sidebg'=> 'Header Border', |
'sidebg'=> 'Header Border', |
'font' => 'Font', |
'font' => 'Font', |
|
'fontmenu' => 'Font Menu', |
'link' => 'Un-Visited Link', |
'link' => 'Un-Visited Link', |
'vlink' => 'Visited Link', |
'vlink' => 'Visited Link', |
'alink' => 'Active Link'); |
'alink' => 'Active Link'); |
Line 1120 sub colorschanger {
|
Line 1104 sub colorschanger {
|
my $rstall = &mt('Reset All'); |
my $rstall = &mt('Reset All'); |
my $resetdefault = &mt('Reset All Colors to Default'); |
my $resetdefault = &mt('Reset All Colors to Default'); |
$r->print(<<ENDCOL); |
$r->print(<<ENDCOL); |
<script type="text/javascript"> |
<script type="text/javascript" language="JavaScript"> |
|
|
function pclose() { |
function pclose() { |
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
parmwin=window.open("/adm/rat/empty.html","LONCAPAparms", |
Line 1172 sub verify_and_change_colors {
|
Line 1156 sub verify_and_change_colors {
|
'tabbg' => 'Header Background', |
'tabbg' => 'Header Background', |
'sidebg'=> 'Header Border', |
'sidebg'=> 'Header Border', |
'font' => 'Font', |
'font' => 'Font', |
|
'fontmenu' => 'Font Menu', |
'link' => 'Un-Visited Link', |
'link' => 'Un-Visited Link', |
'vlink' => 'Visited Link', |
'vlink' => 'Visited Link', |
'alink' => 'Active Link'); |
'alink' => 'Active Link'); |
Line 1183 sub verify_and_change_colors {
|
Line 1168 sub verify_and_change_colors {
|
if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) { |
if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) { |
&Apache::lonnet::put('environment',{$entry => $color}); |
&Apache::lonnet::put('environment',{$entry => $color}); |
&Apache::lonnet::appenv({'environment.'.$entry => $color}); |
&Apache::lonnet::appenv({'environment.'.$entry => $color}); |
$message.=&mt('Set '.$colortypes{$item}.' to ').'<tt>"'.$color.'"</tt>.<br />'; |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set '.$colortypes{$item}.' to ').'<tt>"'.$color.'"</tt>').'<br />'; |
} else { |
} else { |
&Apache::lonnet::del('environment',[$entry]); |
&Apache::lonnet::del('environment',[$entry]); |
&Apache::lonnet::delenv('environment.'.$entry); |
&Apache::lonnet::delenv('environment.'.$entry); |
$message.=&mt('Reset '.$colortypes{$item}.'.').'<br />'; |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset '.$colortypes{$item}.'.')).'<br />'; |
} |
} |
} |
} |
my $now = time; |
my $now = time; |
&Apache::lonnet::put('environment',{'color.timestamp' => $now}); |
&Apache::lonnet::put('environment',{'color.timestamp' => $now}); |
&Apache::lonnet::appenv({'environment.color.timestamp' => $now}); |
&Apache::lonnet::appenv({'environment.color.timestamp' => $now}); |
|
|
print_main_menu($r, $message); |
&print_main_menu($r, $message); |
# $r->print(<<ENDVCCOL); |
|
#$message |
|
#<form name="client" action="/adm/preferences" method="post"> |
|
#<input type="hidden" name="action" value="changecolors" /> |
|
#</form> |
|
#ENDVCCOL |
|
} |
} |
|
|
###################################################### |
###################################################### |
Line 1212 sub passwordchanger {
|
Line 1191 sub passwordchanger {
|
# Passwords are encrypted using londes.js (DES encryption) |
# Passwords are encrypted using londes.js (DES encryption) |
$errormessage = ($errormessage || ''); |
$errormessage = ($errormessage || ''); |
my ($user,$domain,$currentpass,$defdom); |
my ($user,$domain,$currentpass,$defdom); |
Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changepass', |
{ href => '/adm/preferences?action=changepass', |
text => 'Change Password'}); |
text => 'Change Password'}); |
$r->print(Apache::loncommon::start_page('Change Password')); |
unless ($caller eq 'reset_by_email') { |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); |
$r->print(Apache::loncommon::start_page('Personal Data')); |
|
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password')); |
|
} |
if ((!defined($caller)) || ($caller eq 'preferences')) { |
if ((!defined($caller)) || ($caller eq 'preferences')) { |
$user = $env{'user.name'}; |
$user = $env{'user.name'}; |
$domain = $env{'user.domain'}; |
$domain = $env{'user.domain'}; |
Line 1227 sub passwordchanger {
|
Line 1208 sub passwordchanger {
|
$defdom = $r->dir_config('lonDefDomain'); |
$defdom = $r->dir_config('lonDefDomain'); |
my %data = &Apache::lonnet::tmpget($mailtoken); |
my %data = &Apache::lonnet::tmpget($mailtoken); |
if (keys(%data) == 0) { |
if (keys(%data) == 0) { |
$r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a <a href="/adm/resetpw">new request</a> for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.')); |
$r->print(&mt('Sorry, the URL you provided to complete the reset of your password was invalid. Either the token included in the URL has been deleted or the URL you provided was invalid. Please submit a [_1]new request[_2] for a password reset, and follow the link to the new URL included in the e-mail that will be sent to you, to allow you to enter a new password.' |
|
,'<a href="/adm/resetpw">','</a>') |
|
); |
return; |
return; |
} |
} |
if (defined($data{time})) { |
if (defined($data{time})) { |
Line 1296 ENDFORM
|
Line 1279 ENDFORM
|
sub jscript_send { |
sub jscript_send { |
my ($caller) = @_; |
my ($caller) = @_; |
my $output = qq| |
my $output = qq| |
<script language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
|
|
function send() { |
function send() { |
uextkey=this.document.client.elements.ukey_cpass.value; |
uextkey=this.document.client.elements.ukey_cpass.value; |
Line 1376 sub client_form {
|
Line 1359 sub client_form {
|
<tr><td class="LC_preferences_labeltext"><label for="newpass_2">$lt{'confirmpass'}</label></td> |
<tr><td class="LC_preferences_labeltext"><label for="newpass_2">$lt{'confirmpass'}</label></td> |
<td><input type="password" name="newpass_2" size="10" /> </td></tr> |
<td><input type="password" name="newpass_2" size="10" /> </td></tr> |
<tr><td colspan="2" align="center"> |
<tr><td colspan="2" align="center"> |
<input type="button" value="$lt{'changepass'}" onClick="send();"> |
<input type="button" value="$lt{'changepass'}" onClick="send();" /> |
</table> |
</table> |
<input type="hidden" name="ukey_cpass" value="$hexkey->{'ukey_cpass'}" /> |
<input type="hidden" name="ukey_cpass" value="$hexkey->{'ukey_cpass'}" /> |
<input type="hidden" name="lkey_cpass" value="$hexkey->{'lkey_cpass'}" /> |
<input type="hidden" name="lkey_cpass" value="$hexkey->{'lkey_cpass'}" /> |
Line 1552 ENDERROR
|
Line 1535 ENDERROR
|
# Inform the user the password has (not?) been changed |
# Inform the user the password has (not?) been changed |
my $message; |
my $message; |
if ($result =~ /^ok$/) { |
if ($result =~ /^ok$/) { |
$message = &mt('The password for [_1] was successfully changed',$user); |
$message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for [_1] was successfully changed.',$user)); |
print_main_menu($r, $message); |
if ($caller eq 'reset_by_email') { |
# $r->print("<h3>".&mt('The password for [_1] was successfully changed',$user)."</h3>"); |
$r->print($message.'<br />'); |
|
} else { |
|
&print_main_menu($r, $message); |
|
} |
} else { |
} else { |
# error error: run in circles, scream and shout |
# error error: run in circles, scream and shout |
$message = &mt("The password for [_1] was not changed",$user) |
$message = &Apache::lonhtmlcommon::confirm_success( |
.&mt('Please make sure your old password was entered correctly.'); |
&mt("The password for [_1] was not changed.",$user).' '.&mt('Please make sure your old password was entered correctly.'),1); |
print_main_menu($r, $message); |
unless ($caller eq 'reset_by_email') { |
# $r->print("<h3><span class='LC_error'>".&mt("The password for [_1] was not changed",$user)."</span></h3>". |
&print_main_menu($r, $message); |
# &mt('Please make sure your old password was entered correctly.')); |
} |
return 1; |
return 1; |
} |
} |
return; |
return; |
Line 1575 sub discussionchanger {
|
Line 1561 sub discussionchanger {
|
Apache::lonhtmlcommon::add_breadcrumb( |
Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changediscussions', |
{ href => '/adm/preferences?action=changediscussions', |
text => 'Change Discussion Preferences'}); |
text => 'Change Discussion Preferences'}); |
$r->print(Apache::loncommon::start_page('Change Discussion Preferences')); |
$r->print(Apache::loncommon::start_page('Message Management')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences')); |
my $user = $env{'user.name'}; |
my $user = $env{'user.name'}; |
my $domain = $env{'user.domain'}; |
my $domain = $env{'user.domain'}; |
Line 1667 END
|
Line 1653 END
|
END |
END |
$r->print(&Apache::loncommon::end_data_table_row(). |
$r->print(&Apache::loncommon::end_data_table_row(). |
&Apache::loncommon::end_data_table()); |
&Apache::loncommon::end_data_table()); |
$r->print(<<"END"); |
|
<br /> |
$r->print('<br /><br /><input type="submit" name="sub" value="'.&mt('Save').'" /><br /><br />'.&mt('Note').': '.$lt{'thde'}.'</form>'); |
<br /> |
|
<input type="submit" name="sub" value="Save" /> |
|
<br /> |
|
<br /> |
|
Note: $lt{'thde'} |
|
</form> |
|
END |
|
} |
} |
|
|
sub verify_and_change_discussion { |
sub verify_and_change_discussion { |
Line 1692 sub verify_and_change_discussion {
|
Line 1671 sub verify_and_change_discussion {
|
} else { |
} else { |
$message .= &mt('In discussions: all posts will be displayed.').'<br />'; |
$message .= &mt('In discussions: all posts will be displayed.').'<br />'; |
&Apache::lonnet::del('environment',['discdisplay']); |
&Apache::lonnet::del('environment',['discdisplay']); |
&Apache::lonnet::delenv('environment\.discdisplay'); |
&Apache::lonnet::delenv('environment.discdisplay'); |
} |
} |
} |
} |
if (defined($env{'form.discmark'}) ) { |
if (defined($env{'form.discmark'}) ) { |
my $newmark = $env{'form.newmark'}; |
my $newmark = $env{'form.newmark'}; |
if ($newmark eq 'ondisp') { |
if ($newmark eq 'ondisp') { |
$message.=&mt('In discussions: new posts will be cease to be identified as "NEW" after display.').'<br />'; |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: new posts will be cease to be identified as "NEW" after display.')).'<br />'; |
&Apache::lonnet::put('environment',{'discmarkread' => $newmark}); |
&Apache::lonnet::put('environment',{'discmarkread' => $newmark}); |
&Apache::lonnet::appenv({'environment.discmarkread' => $newmark}); |
&Apache::lonnet::appenv({'environment.discmarkread' => $newmark}); |
} else { |
} else { |
$message.=&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.').'<br />'; |
$message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.')).'<br />'; |
&Apache::lonnet::del('environment',['discmarkread']); |
&Apache::lonnet::del('environment',['discmarkread']); |
&Apache::lonnet::delenv('environment\.discmarkread'); |
&Apache::lonnet::delenv('environment.discmarkread'); |
} |
} |
} |
} |
# $r->print(<<ENDVCSCREEN); |
&print_main_menu($r, $message); |
#$message |
|
#ENDVCSCREEN |
|
print_main_menu($r, $message); |
|
} |
} |
|
|
################################################################ |
################################################################ |
Line 1718 sub verify_and_change_discussion {
|
Line 1694 sub verify_and_change_discussion {
|
################################################################ |
################################################################ |
sub coursedisplaychanger { |
sub coursedisplaychanger { |
my $r = shift; |
my $r = shift; |
Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{ href => '/adm/preferences?action=changecourseinit', |
{ href => '/adm/preferences?action=changecourseinit', |
text => 'Change Course Init. Pref.'}); |
text => 'Change Course Init. Pref.'}); |
$r->print(Apache::loncommon::start_page('Change Course Initialization Preference')); |
$r->print(Apache::loncommon::start_page('Change Course Initialization Preference')); |
Line 1738 sub coursedisplaychanger {
|
Line 1714 sub coursedisplaychanger {
|
} |
} |
my %pagenames = &Apache::lonlocal::texthash( |
my %pagenames = &Apache::lonlocal::texthash( |
firstres => 'First resource', |
firstres => 'First resource', |
whatsnew => "What's New page", |
whatsnew => "What's New Page", |
); |
); |
my $whatsnew_off=&mt('Display the [_1]first resource[_2] in the course.','<b>','</b>'); |
my $whatsnew_off=&mt('Display the [_1]first resource[_2] in the course.','<b>','</b>'); |
my $whatsnew_on=&mt("Display the [_1]What's New page[_2] - a summary of items in the course which require attention.",'<b>','</b>'); |
my $whatsnew_on=&mt("Display the [_1]What's New Page[_2] - a summary of items in the course which require attention.",'<b>','</b>'); |
|
|
$r->print('<br /><b>' |
$r->print('<br /><b>' |
.&mt('Set the default page to be displayed when you select a course role') |
.&mt('Set the default page to be displayed when you select a course role') |
.'</b> ' |
.'</b> ' |
.&mt('(Currently: [_1])',$pagenames{$currvalue}) |
.&mt('(Currently: [_1])',$pagenames{$currvalue}) |
.'<br />' |
.'<br />' |
.&mt("The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the [_1]What's New page[_2] in the course.",'<i>','</i>') |
.&mt("The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the [_1]What's New Page[_2] in the course.",'<i>','</i>') |
.'<br /><br />' |
.'<br /><br />' |
); |
); |
$r->print(<<ENDLSCREEN); |
$r->print(<<ENDLSCREEN); |
Line 1758 sub coursedisplaychanger {
|
Line 1734 sub coursedisplaychanger {
|
<label><input type="radio" name="newdisp" value="firstres" $firstselect /> $whatsnew_off</label><br /> |
<label><input type="radio" name="newdisp" value="firstres" $firstselect /> $whatsnew_off</label><br /> |
<label><input type="radio" name="newdisp" value="whatsnew" $whatsnewselect /> $whatsnew_on</label><input type="hidden" name="refpage" value="$env{'form.refpage'}" /> |
<label><input type="radio" name="newdisp" value="whatsnew" $whatsnewselect /> $whatsnew_on</label><input type="hidden" name="refpage" value="$env{'form.refpage'}" /> |
ENDLSCREEN |
ENDLSCREEN |
$r->print('<br /><br /><input type="submit" value="'.&mt('Change').'" /> |
$r->print('<br /><br /><input type="submit" value="'.&mt('Save').'" /> |
</form>'); |
</form>'); |
} |
} |
|
|
Line 1771 sub verify_and_change_coursepage {
|
Line 1747 sub verify_and_change_coursepage {
|
'ywbt' => 'you will be taken to the start of the course.', |
'ywbt' => 'you will be taken to the start of the course.', |
'apwb' => 'a page will be displayed that lists items in the course that may require action from you.', |
'apwb' => 'a page will be displayed that lists items in the course that may require action from you.', |
'gtts' => 'Go to the start of the course', |
'gtts' => 'Go to the start of the course', |
'dasp' => "Display the What's New page listing course action items", |
'dasp' => "Display the What's New Page", |
); |
); |
my $newdisp = $env{'form.newdisp'}; |
my $newdisp = $env{'form.newdisp'}; |
$message = '<b>'.$lt{'defs'}.'</b>: '.$lt{'when'}.', '; |
$message = '<b>'.$lt{'defs'}.'</b>: '.$lt{'when'}.', '; |
Line 1782 sub verify_and_change_coursepage {
|
Line 1758 sub verify_and_change_coursepage {
|
} else { |
} else { |
$message .= $lt{'apwb'}.'<br />'; |
$message .= $lt{'apwb'}.'<br />'; |
&Apache::lonnet::del('environment',['course_init_display']); |
&Apache::lonnet::del('environment',['course_init_display']); |
&Apache::lonnet::delenv('environment\.course_init_display'); |
&Apache::lonnet::delenv('environment.course_init_display'); |
} |
} |
my $refpage = $env{'form.refpage'}; |
my $refpage = $env{'form.refpage'}; |
if (($env{'request.course.fn'}) && ($env{'request.course.id'})) { |
if (($env{'request.course.fn'}) && ($env{'request.course.id'})) { |
Line 1797 sub verify_and_change_coursepage {
|
Line 1773 sub verify_and_change_coursepage {
|
$refpage.'">'.$lt{'dasp'}.'</a></font>'; |
$refpage.'">'.$lt{'dasp'}.'</a></font>'; |
} |
} |
} |
} |
# $r->print(<<ENDVCSCREEN); |
&print_main_menu($r, &Apache::lonhtmlcommon::confirm_success($message)); |
#$message |
|
#<br /><br /> |
|
#ENDVCSCREEN |
|
print_main_menu($r, $message); |
|
} |
} |
|
|
sub print_main_menu { |
sub print_main_menu { |
Line 1821 if (&Apache::lonnet::usertools_access($u
|
Line 1793 if (&Apache::lonnet::usertools_access($u
|
my @menu= |
my @menu= |
({ categorytitle=>'Personal Data', |
({ categorytitle=>'Personal Data', |
items =>[ |
items =>[ |
{ linktext => 'Personal Homepage', |
{ linktext => 'Personal Information Page', |
url => $aboutmeurl, |
url => $aboutmeurl, |
permission => $permissions{'aboutme'}, |
permission => $permissions{'aboutme'}, |
#help => 'Prefs_About_Me', |
#help => 'Prefs_About_Me', |
Line 1890 my @menu=
|
Line 1862 my @menu=
|
}, |
}, |
{ categorytitle=>'Message Management', |
{ categorytitle=>'Message Management', |
items =>[ |
items =>[ |
{ linktext => 'Messages & Notifications', |
{ linktext => 'Messages & Notifications', |
url => '/adm/preferences?action=changemsgforward', |
url => '/adm/preferences?action=changemsgforward', |
permission => 'F', |
permission => 'F', |
#help => 'Prefs_Messages', |
#help => 'Prefs_Messages', |
Line 1908 my @menu=
|
Line 1880 my @menu=
|
}, |
}, |
{ categorytitle=>'Other', |
{ categorytitle=>'Other', |
items =>[ |
items =>[ |
{ linktext => 'Register Response Devices ("Clickers")', |
{ linktext => 'Register Response Devices ("Clickers")', |
url => '/adm/preferences?action=changeclicker', |
url => '/adm/preferences?action=changeclicker', |
permission => 'F', |
permission => 'F', |
#help => '', |
#help => '', |
Line 1984 push(@{ $menu[4]->{items} }, {
|
Line 1956 push(@{ $menu[4]->{items} }, {
|
}); |
}); |
} |
} |
|
|
$r->print(&Apache::loncommon::start_page('Change Preferences')); |
$r->print(&Apache::loncommon::start_page('My Space')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences')); |
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Preferences')); |
$r->print($message); |
$r->print($message); |
$r->print(Apache::lonhtmlcommon::generate_menu(@menu)); |
$r->print(Apache::lonhtmlcommon::generate_menu(@menu)); |
Line 2012 sub handler {
|
Line 1984 sub handler {
|
Apache::lonhtmlcommon::clear_breadcrumbs(); |
Apache::lonhtmlcommon::clear_breadcrumbs(); |
Apache::lonhtmlcommon::add_breadcrumb |
Apache::lonhtmlcommon::add_breadcrumb |
({href => '/adm/preferences', |
({href => '/adm/preferences', |
text => 'Set User Preferences'}); |
text => 'Set User Preferences', |
|
help => |
|
'Prefs_About_Me,Prefs_Language,Prefs_Screen_Name_Nickname,Change_Colors,Change_Password,Prefs_Messages,Change_Discussion_Display'}); |
if(!exists $env{'form.action'}) { |
if(!exists $env{'form.action'}) { |
&print_main_menu($r); |
&print_main_menu($r); |
}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'){ |
Line 2072 sub handler {
|
Line 2046 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(); |
&toggle_debug(); |
print_main_menu($r); |
&print_main_menu($r); |
} |
} |
|
|
return OK; |
return OK; |
Line 2158 sub handler2 {
|
Line 2132 sub handler2 {
|
'/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme'; |
'/adm/'.$env{'user.domain'}.'/'.$env{'user.name'}.'/aboutme'; |
push (@Options,{ action => 'none', |
push (@Options,{ action => 'none', |
linktext => |
linktext => |
q{Edit the Personal Homepage}, |
q{Edit the Personal Information Page}, |
help => 'Prefs_About_Me', |
help => 'Prefs_About_Me', |
href => $aboutmeaction}); |
href => $aboutmeaction}); |
push (@Options,({ action => 'changecolors', |
push (@Options,({ action => 'changecolors', |
Line 2354 sub handler2 {
|
Line 2328 sub handler2 {
|
})); |
})); |
} |
} |
|
|
if ($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) { |
if (($env{'user.name'} =~ /^(albertel|fox|foxr|kortemey|korte|raeburn)$/) |
|
&& ($env{'user.domain'} =~/^(msu|gerd)$/)){ |
push (@Options,({ action => 'debugtoggle', |
push (@Options,({ action => 'debugtoggle', |
printmenu => 'yes', |
printmenu => 'yes', |
subroutine => \&toggle_debug, |
subroutine => \&toggle_debug, |
Line 2435 sub handler2 {
|
Line 2410 sub handler2 {
|
|
|
sub toggle_debug { |
sub 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}); |
} |
} |