[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /interface lonpreferences.pm
raeburn
raeburn@source.lon-capa.org
Sat, 21 Mar 2009 04:41:50 -0000
This is a MIME encoded message
--raeburn1237610510
Content-Type: text/plain
raeburn Sat Mar 21 04:41:50 2009 EDT
Modified files: (Branch: version_2_8_X)
/loncom/interface lonpreferences.pm
Log:
- Backport 1.134, 1.138, 1.139, 1.142, 1.148.
--raeburn1237610510
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20090321044150.txt"
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.125.2.2 loncom/interface/lonpreferences.pm:1.125.2.3
--- loncom/interface/lonpreferences.pm:1.125.2.2 Tue Dec 23 19:28:07 2008
+++ loncom/interface/lonpreferences.pm Sat Mar 21 04:41:50 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.125.2.2 2008/12/23 19:28:07 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.125.2.3 2009/03/21 04:41:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -176,7 +176,7 @@
$message=&mt('Set new preferred languages to ').'<tt>"'.$newlanguage.'"</tt>.';
} 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);
@@ -230,7 +230,7 @@
<h3>$lt{'jsmath'}</h3>
<p>
$jsMath_start
-<script type="text/javascript">
+<script type="text/javascript" language="JavaScript">
if (jsMath.nofonts == 1) {
document.writeln
('<div style="padding: 10; border-style: solid; border-width:3;'
@@ -260,7 +260,7 @@
</p>
ENDLSCREEN
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>');
}
}
@@ -286,7 +286,7 @@
$message=&mt('Set new preferred math display to ').'<tt>"'.$newtexengine.'"</tt>.';
} else {
&Apache::lonnet::del('environment',['texengine']);
- &Apache::lonnet::delenv('environment\.texengine');
+ &Apache::lonnet::delenv('environment.texengine');
$message=&mt('Reset preferred math display.');
}
@@ -425,7 +425,7 @@
$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) {
@@ -520,7 +520,7 @@
$message=&mt('Set new screenname to ').'<tt>"'.$newscreen.'."</tt>.';
} else {
&Apache::lonnet::del('environment',['screenname']);
- &Apache::lonnet::delenv('environment\.screenname');
+ &Apache::lonnet::delenv('environment.screenname');
$message=&mt('Reset screenname.');
}
# Nickname
@@ -533,7 +533,7 @@
$message.=&mt('Set new nickname to ').'<tt>"'.$newscreen.'"</tt>.';
} 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);
@@ -736,7 +736,7 @@
my %allnot = &get_notifications(\%userenv);
my $validatescript = &Apache::lonhtmlcommon::javascript_valid_email();
my $jscript = qq|
-<script type="text/javascript">
+<script type="text/javascript" language="JavaScript">
function validate() {
for (var i=0; i<document.prefs.numnotify.value; i++) {
var checkaddress = 0;
@@ -941,7 +941,7 @@
.'<br />';
} else {
&Apache::lonnet::del('environment',['msgforward']);
- &Apache::lonnet::delenv('environment\.msgforward');
+ &Apache::lonnet::delenv('environment.msgforward');
$message.= &mt("Set message forwarding to 'off'.").'<br />';
}
my $critnotification;
@@ -981,7 +981,7 @@
$message.=&mt('Set non-critical message notification address(es) to ').'<tt>"'.$notification.'"</tt>.<br />';
} else {
&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 />';
}
if ($critnotification) {
@@ -990,7 +990,7 @@
$message.=&mt('Set critical message notification address(es) to ').'<tt>"'.$critnotification.'"</tt>.<br />';
} else {
&Apache::lonnet::del('environment',['critnotification']);
- &Apache::lonnet::delenv('environment\.critnotification');
+ &Apache::lonnet::delenv('environment.critnotification');
$message.=&mt("Set critical message notification to 'off'.").'<br />';
}
if ($critnotification || $notification) {
@@ -1000,7 +1000,7 @@
$message.=&mt('Set address(es) to receive excerpts with html retained ').'<tt>"'.$notify_with_html.'"</tt>.';
} else {
&Apache::lonnet::del('environment',['notifywithhtml']);
- &Apache::lonnet::delenv('environment\.notifywithhtml');
+ &Apache::lonnet::delenv('environment.notifywithhtml');
if ($totaladdresses == 1) {
$message.=&mt("Set notification address to receive excerpts with html stripped.");
} else {
@@ -1009,7 +1009,7 @@
}
} else {
&Apache::lonnet::del('environment',['notifywithhtml']);
- &Apache::lonnet::delenv('environment\.notifywithhtml');
+ &Apache::lonnet::delenv('environment.notifywithhtml');
}
if ($message) {
$message .= '<br /><hr />';
@@ -1116,7 +1116,7 @@
$message.=&mt('Set '.$colortypes{$item}.' to ').'<tt>"'.$color.'"</tt>.<br />';
} else {
&Apache::lonnet::del('environment',[$entry]);
- &Apache::lonnet::delenv('environment\.'.$entry);
+ &Apache::lonnet::delenv('environment.'.$entry);
$message.=&mt('Reset '.$colortypes{$item}.'.').'<br />';
}
}
@@ -1220,7 +1220,7 @@
sub jscript_send {
my ($caller) = @_;
my $output = qq|
-<script language="JavaScript">
+<script type="text/javascript" language="JavaScript">
function send() {
uextkey=this.document.client.elements.ukey_cpass.value;
@@ -1580,15 +1580,7 @@
END
$r->print(&Apache::loncommon::end_data_table_row().
&Apache::loncommon::end_data_table());
- $r->print(<<"END");
-<br />
-<br />
-<input type="submit" name="sub" value="Save Changes" />
-<br />
-<br />
-Note: $lt{'thde'}
-</form>
-END
+ $r->print('<br /><br /><input type="submit" name="sub" value="'.&mt('Save').'" /><br /><br />'.&mt('Note').': '.$lt{'thde'}.'</form>');
}
sub verify_and_change_discussion {
@@ -1605,7 +1597,7 @@
} else {
$message .= &mt('In discussions: all posts will be displayed.').'<br />';
&Apache::lonnet::del('environment',['discdisplay']);
- &Apache::lonnet::delenv('environment\.discdisplay');
+ &Apache::lonnet::delenv('environment.discdisplay');
}
}
if (defined($env{'form.discmark'}) ) {
@@ -1617,7 +1609,7 @@
} else {
$message.=&mt('In discussions: posts will be identified as "NEW" until marked as read by the reader.').'<br />';
&Apache::lonnet::del('environment',['discmarkread']);
- &Apache::lonnet::delenv('environment\.discmarkread');
+ &Apache::lonnet::delenv('environment.discmarkread');
}
}
$r->print(<<ENDVCSCREEN);
@@ -1643,14 +1635,21 @@
$whatsnewselect = '';
}
}
- my %pagenames = (
+ my %pagenames = &Apache::lonlocal::texthash(
firstres => 'First resource',
- whatsnew => "What's new page",
+ whatsnew => "What's New Page",
);
- my $whatsnew_off=&mt('Display the [_1] in the course.','<b>first resource</b>');
- my $whatsnew_on=&mt('Display the "[_1]" page - a summary of items in the course which require attention.',"<b>What's New</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>');
- $r->print('<br /><b>'.&mt('Set the default page to be displayed when you select a course role').'</b> '.&mt('(Currently: [_1])',$pagenames{$currvalue}).'<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]" page in the course',"<i>What's New</i>").'<br /><br />');
+ $r->print('<br /><b>'
+ .&mt('Set the default page to be displayed when you select a course role')
+ .'</b> '
+ .&mt('(Currently: [_1])',$pagenames{$currvalue})
+ .'<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>')
+ .'<br /><br />'
+ );
$r->print(<<ENDLSCREEN);
<form name="prefs" action="/adm/preferences" method="post">
<input type="hidden" name="action" value="verify_and_change_coursepage" />
@@ -1682,7 +1681,7 @@
} else {
$message .= $lt{'apwb'}.'<br />';
&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'};
if (($env{'request.course.fn'}) && ($env{'request.course.id'})) {
@@ -2065,7 +2064,7 @@
sub toggle_debug {
if ($env{'user.debug'}) {
- &Apache::lonnet::delenv('user\.debug');
+ &Apache::lonnet::delenv('user.debug');
} else {
&Apache::lonnet::appenv({'user.debug' => 1});
}
--raeburn1237610510--