--- loncom/interface/lonpreferences.pm 2009/03/21 04:41:50 1.125.2.3
+++ loncom/interface/lonpreferences.pm 2009/02/19 11:27:52 1.142
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.125.2.3 2009/03/21 04:41:50 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.142 2009/02/19 11:27:52 zhu Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -98,6 +98,12 @@ sub des_decrypt {
sub wysiwygchanger {
my $r = shift;
+ 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::lonhtmlcommon::breadcrumbs('Change WYSIWYG Preferences'));
+
my %userenv = &Apache::lonnet::get
('environment',['wysiwygeditor']);
my $onselect='checked="checked"';
@@ -120,7 +126,7 @@ $warning
ENDLSCREEN
- $r->print('
');
+ $r->print('
');
}
@@ -129,7 +135,9 @@ sub verify_and_change_wysiwyg {
my $newsetting=$env{'form.wysiwyg'};
&Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting});
&Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting});
- $r->print('
'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'
');
+# $r->print(''.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'
');
+ print_main_menu($r,''.&mt('Setting WYSIWYG editor to:').' '
+ .&mt($newsetting).'
');
}
################################################################
@@ -137,6 +145,12 @@ sub verify_and_change_wysiwyg {
################################################################
sub languagechanger {
my $r = shift;
+
+ Apache::lonhtmlcommon::add_breadcrumb(
+ { href => '/adm/preferences?action=changelanguages',
+ text => 'Change Language'});
+ $r->print(Apache::loncommon::start_page('Change Language'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
@@ -158,7 +172,7 @@ sub languagechanger {
$pref: $selectionbox
ENDLSCREEN
- $r->print('
');
+ $r->print('
');
}
@@ -180,9 +194,10 @@ sub verify_and_change_languages {
$message=&mt('Reset preferred language.');
}
&Apache::loncommon::flush_langs_cache($user,$domain);
- $r->print(<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::lonhtmlcommon::breadcrumbs('Change How Math Equations Are Displayed'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get('environment',['texengine']);
@@ -207,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):',
@@ -219,8 +239,9 @@ sub texenginechanger {
@@ -230,7 +251,7 @@ $lt{'exmpl'}
$lt{'jsmath'}
$jsMath_start
-');
+ $r->print('');
}
}
@@ -291,9 +312,10 @@ sub verify_and_change_texengine {
}
- $r->print(<print(< '/adm/preferences?action=changerolespref',
+ text => 'Change '.$role.' Page Pref'});
+ $r->print(Apache::loncommon::start_page('Change '.$role.' Page Pref'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change '.$role.' Page Pref'));
my $hotlist_flag=$userenv{'recentroles'};
my $hotlist_n=$userenv{'recentrolesn'};
my $checked;
@@ -376,7 +403,7 @@ sub rolesprefchanger {
'.$roles_check_list.'
-
+
');
}
@@ -470,9 +497,10 @@ sub verify_and_change_rolespref {
}
$message .= "
\n";
- $r->print(<print(< 'New screenname (shown if you post anonymously):',
- text_nickname => 'New nickname (shown if you post non-anonymously):',
- text_submit => 'Change',
- );
- $r->print(<
-
-
$lt{'text_screenname'}
-
-
$lt{'text_nickname'}
-
-
-
-
-ENDSCREEN
+ 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::lonhtmlcommon::breadcrumbs('Change Screen Name'));
+ $r->print(''
+ .&mt('Change the name that is displayed in your posts.')
+ .'
'
+ );
+ $r->print(''
+ );
}
sub verify_and_change_screenname {
@@ -537,9 +573,10 @@ sub verify_and_change_screenname {
$message.=&mt('Reset nickname.');
}
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
- $r->print(<print(< '/adm/preferences?action=changeicons',
+ text => 'Change Main Menu'});
+ $r->print(Apache::loncommon::start_page('Change Main Menu'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Main Menu'));
+
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
@@ -565,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(<
@@ -585,7 +628,8 @@ sub verify_and_change_icons {
&Apache::lonnet::put('environment',{'icons' => $newicons});
&Apache::lonnet::appenv({'environment.icons' => $newicons});
- $r->print(&mt('Set menu mode to [_1].',$newicons));
+# $r->print(&mt('Set menu mode to [_1].',$newicons));
+ print_main_menu($r, &mt('Set menu mode to [_1].',$newicons));
}
################################################################
@@ -594,6 +638,11 @@ sub verify_and_change_icons {
sub clickerchanger {
my $r = shift;
+ Apache::lonhtmlcommon::add_breadcrumb(
+ { href => '/adm/preferences?action=changeclicker',
+ text => 'Register Clicker'});
+ $r->print(Apache::loncommon::start_page('Register Clicker'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Register Clicker'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
@@ -627,7 +676,8 @@ sub verify_and_change_clicker {
$newclickers=~s/\,$//;
&Apache::lonnet::put('environment',{'clickers' => $newclickers});
&Apache::lonnet::appenv({'environment.clickers' => $newclickers});
- $r->print(&mt('Registering clickers: [_1]',$newclickers));
+# $r->print(&mt('Registering clickers: [_1]',$newclickers));
+ print_main_menu($r, &mt('Registering clickers: [_1]',$newclickers));
}
################################################################
@@ -636,6 +686,11 @@ sub verify_and_change_clicker {
sub domcoordchanger {
my $r = shift;
+ Apache::lonhtmlcommon::add_breadcrumb(
+ { href => '/adm/preferences?action=changedomcoord',
+ text => 'Restrict Domain Coordinator Access'});
+ $r->print(Apache::loncommon::start_page('Restrict Domain Coordinator Access'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Restrict Domain Coordinator Access'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
@@ -646,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(<
@@ -665,7 +720,8 @@ sub verify_and_change_domcoord {
if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; }
&Apache::lonnet::put('environment',\%domcoord);
&Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}});
- $r->print(&mt('Registering Domain Coordinator access restrictions.'));
+# $r->print(&mt('Registering Domain Coordinator access restrictions.'));
+ print_main_menu($r, &mt('Registering Domain Coordinator access restrictions.'));
}
#################################################################
@@ -721,14 +777,20 @@ 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::lonhtmlcommon::breadcrumbs('Change Message Forwarding/Notification'));
my $forwardingHelp = &Apache::loncommon::help_open_topic("Prefs_Forwarding");
my $notificationHelp = &Apache::loncommon::help_open_topic("Prefs_Notification");
my $criticalMessageHelp = &Apache::loncommon::help_open_topic("Course_Critical_Message");
@@ -736,7 +798,7 @@ sub msgforwardchanger {
my %allnot = &get_notifications(\%userenv);
my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email();
my $jscript = qq|
-