--- loncom/interface/lonwhatsnew.pm 2009/02/04 13:03:44 1.85
+++ loncom/interface/lonwhatsnew.pm 2009/05/04 21:44:54 1.92
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.85 2009/02/04 13:03:44 schafran Exp $
+# $Id: lonwhatsnew.pm,v 1.92 2009/05/04 21:44:54 lueken Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -99,7 +99,7 @@ sub handler {
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb
({href=>'/adm/whatsnew',
- text=>"Display Action Items"});
+ text=>"What's New?"});
if (($command eq 'chgthreshold') && $checkallowed{'abovethreshold'}) {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage,
@@ -194,7 +194,7 @@ sub display_main_box {
);
my %initpage = &Apache::lonlocal::texthash (
firstres => "first resource in the $lctype",
- whatsnew => "what's new? page",
+ whatsnew => "What's New Page",
userpref => 'your general user preferences',
coursespecific => "specific setting for this $lctype",
);
@@ -267,7 +267,7 @@ END
';
}
my $course_type=&Apache::loncommon::course_type();
- return &Apache::loncommon::start_page($course_type.' Action Items',
+ return &Apache::loncommon::start_page("What's New?",
$scripttag);
}
@@ -327,7 +327,7 @@ sub display_actions_box {
my %threshold = ();
my %pagedesc = &Apache::lonlocal::texthash (
firstres => 'First resource',
- whatsnew => "What's New? page",
+ whatsnew => "What's New Page",
userpref => 'user preference',
coursespecific => $lctype.' only',
default => 'default',
@@ -594,7 +594,7 @@ sub display_threshold_config {
&Apache::loncommon::end_data_table_row());
}
$r->print(&Apache::loncommon::end_data_table()."\n".
- '
+ '
');
@@ -650,7 +650,7 @@ sub display_interval_config {
}
$r->print('
');
+ &mt('Save').'" />');
return;
}
@@ -681,9 +681,9 @@ function toggle_countunread(choice) {
}
');
$r->print('
'
- .&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.')
+ .&mt('Choose whether or not to display a count of the number of new posts for each resource or discussion board which has unread posts.')
.'
'
- .&mt("This can increase the time taken to gather data for the 'What's New?' page by a few seconds.")
+ .&mt("This can increase the time taken to gather data for the [_1]What's New Page[_2] by a few seconds.",'','')
.' '
.&mt('Currently set to [_1].',''.$current.'.')
);
@@ -725,7 +725,7 @@ sub courseinit_config {
'anis' => 'and is set to display',
'padc' => 'Page display controlled by',
'chce' => 'Choose '.$lctype.' entry',
- 'moce' => 'Modify '.$lctype.' entry',
+ 'moce' => 'Save',
);
$r->print(<<"END");
$lt{'chwp'}
@@ -1153,6 +1153,8 @@ sub getnormalmail {
# Check for unread mail in course
my $msgcount = 0;
+ my $datetime;
+
my @messages = sort(&Apache::lonnet::getkeys('nohist_email'));
foreach my $message (@messages) {
my $msgid=&escape($message);
@@ -1161,9 +1163,9 @@ sub getnormalmail {
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
if (defined($sendtime) && $sendtime!~/error/) {
my $numsendtime = $sendtime;
- $sendtime = &Apache::lonlocal::locallocaltime($sendtime);
if ($status eq 'new') {
- $msgcount ++;
+ $sendtime = &Apache::lonlocal::locallocaltime($sendtime,'',\$datetime);
+ $msgcount ++;
if ($shortsubj eq '') {
$shortsubj = &mt('No subject');
}
@@ -1186,6 +1188,7 @@ sub getcritmail {
# Check for critical messages in course
my %what=&Apache::lonnet::dump('critical');
my $result = '';
+ my $datetime;
my $critmsgcount = 0;
foreach my $msgid (sort(keys(%what))) {
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=
@@ -1193,7 +1196,7 @@ sub getcritmail {
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
if (defined($sendtime) && $sendtime!~/error/) {
my $numsendtime = $sendtime;
- $sendtime = &Apache::lonlocal::locallocaltime($sendtime);
+ $sendtime = &Apache::lonlocal::locallocaltime($sendtime,'',\$datetime);
$critmsgcount ++;
if ($shortsubj eq '') {
$shortsubj = &mt('No subject');
@@ -1614,6 +1617,7 @@ sub display_versionchanges {
sub display_rolechanges {
my ($r,$chgcount,$changed,$interval,$crstype) = @_;
my $now = time();
+ my $datetime;
my %lt = &Apache::lonlocal::texthash(
'user' => 'User',
'tich' => 'Time of change',
@@ -1651,7 +1655,7 @@ sub display_rolechanges {
my $link =
&Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom);
$r->print('