--- loncom/interface/lonpreferences.pm 2008/12/01 22:19:33 1.126
+++ loncom/interface/lonpreferences.pm 2009/04/05 17:18:29 1.150
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.126 2008/12/01 22:19:33 droeschl Exp $
+# $Id: lonpreferences.pm,v 1.150 2009/04/05 17:18:29 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -101,7 +101,7 @@ sub wysiwygchanger {
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changewysiwyg',
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'));
my %userenv = &Apache::lonnet::get
@@ -126,7 +126,7 @@ $warning
ENDLSCREEN
- $r->print(' ');
+ $r->print(' ');
}
@@ -148,8 +148,8 @@ sub languagechanger {
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changelanguages',
- text => 'Change Colors'});
- $r->print(Apache::loncommon::start_page('Change Language'));
+ text => 'Change Language'});
+ $r->print(Apache::loncommon::start_page('Content Display Settings'));
$r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
@@ -172,7 +172,7 @@ sub languagechanger {
$pref: $selectionbox
ENDLSCREEN
- $r->print(' ');
+ $r->print(' ');
}
@@ -190,9 +190,10 @@ sub verify_and_change_languages {
$message=&mt('Set new preferred languages to ').'"'.$newlanguage.'".';
} else {
&Apache::lonnet::del('environment',['languages']);
- &Apache::lonnet::delenv('environment\.languages');
+ &Apache::lonnet::delenv('environment.languages');
$message=&mt('Reset preferred language.');
}
+ &Apache::loncommon::flush_langs_cache($user,$domain);
print_main_menu($r, $message);
# $r->print(< '/adm/preferences?action=changetexenginepref',
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'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
@@ -226,7 +227,7 @@ sub texenginechanger {
my %lt=&Apache::lonlocal::texthash(
'headline' => 'Change Math Preferences',
'preftxt' => 'Preferred method to display Math',
- 'change' => 'Change',
+ 'change' => 'Save',
'exmpl' => 'Examples',
'jsmath' => 'jsMath:',
'tth' => 'tth (TeX to HTML):',
@@ -238,8 +239,9 @@ sub texenginechanger {
@@ -249,7 +251,7 @@ $lt{'exmpl'}
$lt{'jsmath'}
$jsMath_start
-');
+ $r->print('');
}
}
@@ -305,7 +307,7 @@ sub verify_and_change_texengine {
$message=&mt('Set new preferred math display to ').'"'.$newtexengine.'".';
} else {
&Apache::lonnet::del('environment',['texengine']);
- &Apache::lonnet::delenv('environment\.texengine');
+ &Apache::lonnet::delenv('environment.texengine');
$message=&mt('Reset preferred math display.');
}
@@ -330,7 +332,7 @@ sub rolesprefchanger {
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changerolespref',
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'));
my $hotlist_flag=$userenv{'recentroles'};
my $hotlist_n=$userenv{'recentrolesn'};
@@ -401,7 +403,7 @@ sub rolesprefchanger {
'.$roles_check_list.'
-
+
');
}
@@ -450,7 +452,7 @@ sub verify_and_change_rolespref {
$message=&mt('Recent '.$role.'s Hotlist is Enabled');
} else {
&Apache::lonnet::del('environment',['recentroles']);
- &Apache::lonnet::delenv('environment\.recentroles');
+ &Apache::lonnet::delenv('environment.recentroles');
$message=&mt('Recent '.$role.'s Hotlist is Disabled');
}
if ($hotlist_n) {
@@ -514,27 +516,30 @@ sub screennamechanger {
('environment',['screenname','nickname']);
my $screenname=$userenv{'screenname'};
my $nickname=$userenv{'nickname'};
- my %lt = &Apache::lonlocal::texthash(
- text_screenname => 'New screenname (shown if you post anonymously):',
- text_nickname => 'New nickname (shown if you post non-anonymously):',
- text_submit => 'Change',
- );
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changescreenname',
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(<
-
- $lt{'text_screenname'}
-
- $lt{'text_nickname'}
-
-
-
-
-ENDSCREEN
+ $r->print('
'
+ .&mt('Change the name that is displayed in your posts.')
+ .'
'
+ );
+ $r->print(''
+ );
}
sub verify_and_change_screenname {
@@ -551,7 +556,7 @@ sub verify_and_change_screenname {
$message=&mt('Set new screenname to ').'"'.$newscreen.'.".';
} else {
&Apache::lonnet::del('environment',['screenname']);
- &Apache::lonnet::delenv('environment\.screenname');
+ &Apache::lonnet::delenv('environment.screenname');
$message=&mt('Reset screenname.');
}
# Nickname
@@ -564,7 +569,7 @@ sub verify_and_change_screenname {
$message.=&mt('Set new nickname to ').'"'.$newscreen.'".';
} else {
&Apache::lonnet::del('environment',['nickname']);
- &Apache::lonnet::delenv('environment\.nickname');
+ &Apache::lonnet::delenv('environment.nickname');
$message.=&mt('Reset nickname.');
}
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
@@ -582,7 +587,7 @@ sub iconchanger {
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changeicons',
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'));
my $user = $env{'user.name'};
@@ -603,7 +608,7 @@ sub iconchanger {
my $useicons=&mt('Use icons and text');
my $usebuttons=&mt('Use buttons and text');
my $useicononly=&mt('Use icons only');
- my $change=&mt('Change');
+ my $change=&mt('Save');
$r->print(<
@@ -636,7 +641,7 @@ sub clickerchanger {
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changeclicker',
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'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
@@ -696,7 +701,7 @@ sub domcoordchanger {
}
my $text=&mt('By default, the Domain Coordinator can enter your construction space.');
my $construction=&mt('Block access to construction space');
- my $change=&mt('Change');
+ my $change=&mt('Save');
$r->print(<
@@ -772,18 +777,19 @@ sub msgforwardchanger {
foad => 'Forwarding Address(es)',
noti => 'Notification E-mail Address(es)',
foad_exmpl => 'e.g. userA:domain1,userB:domain2,...',
- mnot => 'Email Address(es) which should be notified about new LON-CAPA messages', # old: 'Message Notification Email Address(es)',
+ mnot => 'E-mail Address(es) which should be notified about new LON-CAPA messages',
+ # old: 'Message Notification Email Address(es)',
mnot_exmpl => 'e.g. joe@doe.com',
- chg => 'Change',
+ chg => 'Save',
email => 'The e-mail address entered in row ',
notv => 'is not a valid e-mail address',
toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one",
- prme => 'Back to preferences menu',
+ prme => 'Back',
);
Apache::lonhtmlcommon::add_breadcrumb(
{ href => '/adm/preferences?action=changemsgforward',
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'));
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding");
my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification");
@@ -792,7 +798,7 @@ sub msgforwardchanger {
my %allnot = &get_notifications(\%userenv);
my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email();
my $jscript = qq|
-