--- loncom/interface/lonpreferences.pm 2009/11/19 15:41:59 1.125.8.3 +++ loncom/interface/lonpreferences.pm 2009/04/25 17:14:24 1.153 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.125.8.3 2009/11/19 15:41:59 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.153 2009/04/25 17:14:24 www 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('Content Display Settings')); + $r->print(Apache::lonhtmlcommon::breadcrumbs('Change WYSIWYG Preferences')); + my %userenv = &Apache::lonnet::get ('environment',['wysiwygeditor']); my $onselect='checked="checked"'; @@ -129,11 +135,8 @@ sub verify_and_change_wysiwyg { my $newsetting=$env{'form.wysiwyg'}; &Apache::lonnet::put('environment',{'wysiwygeditor' => $newsetting}); &Apache::lonnet::appenv({'environment.wysiwygeditor' => $newsetting}); - my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('WYSIWYG Editor').'',''.&mt($newsetting).'')); - $message=&Apache::loncommon::confirmwrapper($message); - $r->print(<'.&Apache::lonhtmlcommon::confirm_success(&mt('Setting WYSIWYG editor to:').' ' + .&mt($newsetting)).'

'); } ################################################################ @@ -141,6 +144,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('Content Display Settings')); + $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Language')); my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; my %userenv = &Apache::lonnet::get @@ -177,17 +186,14 @@ 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=&Apache::lonhtmlcommon::confirm_success(&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=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred language.')); } - $message=&Apache::loncommon::confirmwrapper($message); &Apache::loncommon::flush_langs_cache($user,$domain); - $r->print(< '/adm/preferences?action=changetexenginepref', + text => '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'}; my %userenv = &Apache::lonnet::get('environment',['texengine']); @@ -204,8 +215,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 +230,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'}

-$lt{'preftxt'}: $selectionbox +$lt{'preftxt'}: $selectionbox

@@ -252,9 +247,20 @@ $lt{'exmpl'}

$lt{'jsmath'}

$jsMath_start - @@ -271,7 +277,7 @@ if (jsMath.nofonts == 1) {

ENDLSCREEN if ($env{'environment.texengine'} ne 'jsMath') { - $r->print(''); + $r->print(''); } } @@ -294,16 +300,13 @@ sub verify_and_change_texengine { if ($newtexengine) { &Apache::lonnet::put('environment',{'texengine' => $newtexengine}); &Apache::lonnet::appenv({'environment.texengine' => $newtexengine}); - $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Preferred method to display Math').'','"'.$newtexengine.'"')); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set new preferred math display to ').'"'.$newtexengine.'".'); } else { &Apache::lonnet::del('environment',['texengine']); &Apache::lonnet::delenv('environment.texengine'); - $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Preferred method to display Math').'')); + $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset preferred math display.')); } - $message=&Apache::loncommon::confirmwrapper($message); - $r->print(< '/adm/preferences?action=changerolespref', + text => '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'}; my $checked; if ($hotlist_flag) { - $checked = ' checked="checked"'; + $checked = 'checked="checked"'; } if (!$hotlist_n) { $hotlist_n=3; } @@ -356,13 +364,13 @@ sub rolesprefchanger { my $checked = ""; my $value = $recent_roles{$role_key}; if ($frozen_roles{$role_key}) { - $checked = ' checked="checked"'; + $checked = "checked=\"checked\""; } $count++; $roles_check_list .= &Apache::loncommon::start_data_table_row(). ''. - "". "". @@ -374,10 +382,10 @@ sub rolesprefchanger { $r->print('

'.&mt('Some LON-CAPA users have a long list of '.$lc_role.'s. The Recent '.$role.'s Hotlist feature keeps track of the last N '.$lc_role.'s which have been visited and places a table of these at the top of the '.$lc_role.'s page. People with very few '.$lc_role.'s should leave this feature disabled.').'

- +
+
'.&mt('Number of '.$role.'s in Hotlist:').' $text
-
+
ENDSCREEN @@ -688,17 +703,7 @@ 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'}}); - my $status=''; - if ($domcoord{'domcoord.author'} eq 'blocked') { - $status=&mt('on'); - } else { - $status=&mt('off'); - } - my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Block access to construction space').'',''.$status.'')); - $message=&Apache::loncommon::confirmwrapper($message); - $r->print(< 'Notification E-mail Address(es)', foad_exmpl => 'e.g. userA:domain1,userB:domain2,...', 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 => '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 'Save' and then add the next one", + toen => "To enter multiple addresses, enter one address at a time, click 'Change' and then add the next one", prme => 'Back', ); + Apache::lonhtmlcommon::add_breadcrumb( + { href => '/adm/preferences?action=changemsgforward', + text => '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"); my $criticalMessageHelp = &Apache::loncommon::help_open_topic("Course_Critical_Message"); @@ -769,7 +780,7 @@ sub msgforwardchanger { my %allnot = &get_notifications(\%userenv); my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email(); my $jscript = qq| -