');
}
################################################################
@@ -141,6 +145,12 @@ ENDVCSCREEN
################################################################
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
@@ -177,17 +187,17 @@ sub verify_and_change_languages {
if ($newlanguage) {
&Apache::lonnet::put('environment',{'languages' => $newlanguage});
&Apache::lonnet::appenv({'environment.languages' => $newlanguage});
- $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Preferred language').'','"'.$newlanguage.'".'));
+ $message=&mt('Set new preferred languages to ').'"'.$newlanguage.'".';
} else {
&Apache::lonnet::del('environment',['languages']);
&Apache::lonnet::delenv('environment.languages');
- $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Preferred language').''));
+ $message=&mt('Reset preferred language.');
}
- $message=&Apache::loncommon::confirmwrapper($message);
&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']);
@@ -204,8 +219,7 @@ sub texenginechanger {
'tth' => 'tth (TeX to HTML)',
#'ttm' => 'TeX to MathML',
'jsMath' => 'jsMath',
- 'mimetex' => 'mimetex (Convert to Images)',
- 'raw' => 'Raw (Screen Reader)'
+ 'mimetex' => 'mimetex (Convert to Images)'
);
my $selectionbox=&Apache::loncommon::select_form($texengine,'texengine',
%mathchoices);
@@ -220,27 +234,12 @@ sub texenginechanger {
'mimetex' => 'mimetex (Convert to Images):',
);
- my $jsMathWarning='
'
- .'
'
- .&mt("It looks like you don't have the TeX math fonts installed.")
- .'
'
- .'
'
- .&mt('The jsMath example on this page may not look right without them. '
- .'The [_1]jsMath Home Page[_2] has information on how to download the '
- .'needed fonts. In the meantime, jsMath will do the best it can '
- .'with the fonts you have, but it may not be pretty and some equations '
- .'may not be rendered correctly.'
- ,''
- ,'')
- .'
'
- .'
';
-
$r->print(<$lt{'headline'}
ENDCOL
}
@@ -1134,13 +1168,13 @@ sub verify_and_change_colors {
# figure out colors
my $function=&Apache::loncommon::get_users_function();
my $domain=&Apache::loncommon::determinedomain();
- my %colortypes=('pgbg' => 'Page Background Color',
- 'tabbg' => 'Header Background Color',
- 'sidebg'=> 'Header Border Color',
- 'font' => 'Font Color',
- 'link' => 'Un-Visited Link Color',
- 'vlink' => 'Visited Link Color',
- 'alink' => 'Active Link Color');
+ my %colortypes=('pgbg' => 'Page Background',
+ 'tabbg' => 'Header Background',
+ 'sidebg'=> 'Header Border',
+ 'font' => 'Font',
+ 'link' => 'Un-Visited Link',
+ 'vlink' => 'Visited Link',
+ 'alink' => 'Active Link');
my $message='';
foreach my $item (keys %colortypes) {
@@ -1149,27 +1183,24 @@ sub verify_and_change_colors {
if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) {
&Apache::lonnet::put('environment',{$entry => $color});
&Apache::lonnet::appenv({'environment.'.$entry => $color});
- $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.$colortypes{$item}.'','"'.$color.'"'))
- .' ';
+ $message.=&mt('Set '.$colortypes{$item}.' to ').'"'.$color.'". ';
} else {
&Apache::lonnet::del('environment',[$entry]);
&Apache::lonnet::delenv('environment.'.$entry);
- $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.$colortypes{$item}.''))
- .' ';
+ $message.=&mt('Reset '.$colortypes{$item}.'.').' ';
}
}
- $message=&Apache::loncommon::confirmwrapper($message);
-
my $now = time;
&Apache::lonnet::put('environment',{'color.timestamp' => $now});
&Apache::lonnet::appenv({'environment.color.timestamp' => $now});
- $r->print(<
-
-
-ENDVCCOL
+ print_main_menu($r, $message);
+# $r->print(<
+#
+#
+#ENDVCCOL
}
######################################################
@@ -1181,6 +1212,11 @@ sub passwordchanger {
# Passwords are encrypted using londes.js (DES encryption)
$errormessage = ($errormessage || '');
my ($user,$domain,$currentpass,$defdom);
+ Apache::lonhtmlcommon::add_breadcrumb(
+ { href => '/adm/preferences?action=changepass',
+ text => 'Change Password'});
+ $r->print(Apache::loncommon::start_page('Change Password'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Password'));
if ((!defined($caller)) || ($caller eq 'preferences')) {
$user = $env{'user.name'};
$domain = $env{'user.domain'};
@@ -1191,9 +1227,7 @@ sub passwordchanger {
$defdom = $r->dir_config('lonDefDomain');
my %data = &Apache::lonnet::tmpget($mailtoken);
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 [_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.',
- '','')
- );
+ $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 new request 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.'));
return;
}
if (defined($data{time})) {
@@ -1290,8 +1324,6 @@ sub jscript_send {
this.document.client.elements.uname.value;
this.document.pserver.elements.udom.value =
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value;
- this.document.pserver.elements.email.value =
- this.document.client.elements.email.value;
|;
}
$ output .= qq|
@@ -1311,39 +1343,41 @@ sub client_form {
'newpass' => 'New Password',
'confirmpass' => 'Confirm Password',
'changepass' => 'Save');
- my $output = '
'
- .&Apache::lonhtmlcommon::start_pick_box();
+
+ my $output = qq|
+
-|;
+ENDFORM
return $output;
}
@@ -1374,7 +1408,6 @@ sub server_form {
-
|;
}
@@ -1519,25 +1552,17 @@ ENDERROR
# Inform the user the password has (not?) been changed
my $message;
if ($result =~ /^ok$/) {
- $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.',''.$user.''));
- if ($caller eq 'reset_by_email') {
- $r->print($message.' ');
- } else {
- $r->print(&Apache::loncommon::confirmwrapper($message));
- }
+ $message = &mt('The password for [_1] was successfully changed',$user);
+ print_main_menu($r, $message);
+# $r->print("
".&mt('The password for [_1] was successfully changed',$user)."
");
} else {
# error error: run in circles, scream and shout
- if ($caller eq 'reset_by_email') {
- if (!$result) {
- return 1;
- } else {
- return $result;
- }
- } else {
- $message = &Apache::lonhtmlcommon::confirm_success(
- &mt("The password for user [_1] was not changed.",''.$user.'').' '.&mt('Please make sure your old password was entered correctly.'),1);
- $r->print(&Apache::loncommon::confirmwrapper($message));
- }
+ $message = &mt("The password for [_1] was not changed",$user)
+ .&mt('Please make sure your old password was entered correctly.');
+ print_main_menu($r, $message);
+# $r->print("
".&mt("The password for [_1] was not changed",$user)."
".
+# &mt('Please make sure your old password was entered correctly.'));
+ return 1;
}
return;
}
@@ -1547,6 +1572,11 @@ ENDERROR
################################################################
sub discussionchanger {
my $r = shift;
+ Apache::lonhtmlcommon::add_breadcrumb(
+ { href => '/adm/preferences?action=changediscussions',
+ text => 'Change Discussion Preferences'});
+ $r->print(Apache::loncommon::start_page('Change Discussion Preferences'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Discussion Preferences'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
@@ -1560,7 +1590,7 @@ sub discussionchanger {
}
}
if (defined($userenv{'discmarkread'})) {
- unless ($userenv{'discmarkread'} eq '') {
+ unless ($userenv{'discdisplay'} eq '') {
$discmark = $userenv{'discmarkread'};
}
}
@@ -1586,7 +1616,7 @@ sub discussionchanger {
'disa' => 'Posts displayed?',
'npmr' => 'New posts cease to be identified as "New"?',
'thde' => 'The preferences you set here can be overridden within each individual discussion.',
- 'chgt' => 'Change to ',
+ 'chgt' => 'Change to '
);
my $dispchange = $lt{'unread'};
my $markchange = $lt{'ondisp'};
@@ -1610,9 +1640,9 @@ sub discussionchanger {
$lt{'sdpf'} $lt{'prca'}
@@ -1637,9 +1667,8 @@ END
END
$r->print(&Apache::loncommon::end_data_table_row().
&Apache::loncommon::end_data_table());
- $r->print(' '.
- ''.
- '');
+
+ $r->print('
'.&mt('Note').': '.$lt{'thde'}.'');
}
sub verify_and_change_discussion {
@@ -1650,11 +1679,11 @@ sub verify_and_change_discussion {
if (defined($env{'form.discdisp'}) ) {
my $newdisp = $env{'form.newdisp'};
if ($newdisp eq 'unread') {
- $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: only new posts will be displayed.')).' ';
+ $message .=&mt('In discussions: only new posts will be displayed.').' ';
&Apache::lonnet::put('environment',{'discdisplay' => $newdisp});
&Apache::lonnet::appenv({'environment.discdisplay' => $newdisp});
} else {
- $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: all posts will be displayed.')).' ';
+ $message .= &mt('In discussions: all posts will be displayed.').' ';
&Apache::lonnet::del('environment',['discdisplay']);
&Apache::lonnet::delenv('environment.discdisplay');
}
@@ -1662,19 +1691,19 @@ sub verify_and_change_discussion {
if (defined($env{'form.discmark'}) ) {
my $newmark = $env{'form.newmark'};
if ($newmark eq 'ondisp') {
- $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: new posts will be cease to be identified as "NEW" after display.')).' ';
+ $message.=&mt('In discussions: new posts will be cease to be identified as "NEW" after display.').' ';
&Apache::lonnet::put('environment',{'discmarkread' => $newmark});
&Apache::lonnet::appenv({'environment.discmarkread' => $newmark});
} else {
- $message.=&Apache::lonhtmlcommon::confirm_success(&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.')).' ';
+ $message.=&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.').' ';
&Apache::lonnet::del('environment',['discmarkread']);
&Apache::lonnet::delenv('environment.discmarkread');
}
}
- $message=&Apache::loncommon::confirmwrapper($message);
- $r->print(<print(< '/adm/preferences?action=changecourseinit',
+ text => 'Change Course Init. Pref.'});
+ $r->print(Apache::loncommon::start_page('Change Course Initialization Preference'));
+ $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Course Init. Pref.'));
my $user = $env{'user.name'};
my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get('environment',['course_init_display']);
@@ -1695,19 +1729,21 @@ sub coursedisplaychanger {
$whatsnewselect = '';
}
}
- my %pagenames = (
+ my %pagenames = &Apache::lonlocal::texthash(
firstres => 'First resource',
whatsnew => "What's New Page",
);
my $whatsnew_off=&mt('Display the [_1]first resource[_2] in the course.','','');
my $whatsnew_on=&mt("Display the [_1]What's New Page[_2] - a summary of items in the course which require attention.",'','');
- $r->print(' '.
- &mt('Set the default page to be displayed when you select a course role').
- ' '.
- &mt('(Currently: [_1])',$pagenames{$currvalue}).' '.
- &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] page in the course.",'','').
- '
');
+ $r->print(' '
+ .&mt('Set the default page to be displayed when you select a course role')
+ .' '
+ .&mt('(Currently: [_1])',$pagenames{$currvalue})
+ .' '
+ .&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.",'','')
+ .'