--- loncom/interface/lonwhatsnew.pm 2008/04/30 23:52:00 1.77
+++ loncom/interface/lonwhatsnew.pm 2009/02/10 09:30:16 1.86
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.77 2008/04/30 23:52:00 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.86 2009/02/10 09:30:16 schafran Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -169,19 +169,19 @@ sub display_main_box {
degdiff => 'Degree of difficulty',
numstudents => 'Total number of students with submissions',
);
- my %versions = &Apache::lonlocal::texthash (
+ my %versions = (
-1 => "version changes since start of $lctype",
2592000 => 'version changes since last month',
604800 => 'version changes since last week',
86400 => 'version changes since yesterday',
);
- my %newroles = &Apache::lonlocal::texthash (
+ my %newroles = (
-1 => "roles which have become active since start of $lctype",
2592000 => 'roles which have become active since last month',
604800 => 'roles which have become active since last week',
86400 => 'roles which have become active since yesterday',
);
- my %oldroles = &Apache::lonlocal::texthash (
+ my %oldroles = (
-1 => "roles which expired since start of $lctype",
2592000 => 'roles which expired since last month',
604800 => 'roles which expired since last week',
@@ -352,15 +352,15 @@ sub display_actions_box {
}
$r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype).'.'
.' '
- .&mt('Currently: [_1]',$currinit)
- .'. '
-# &mt('Change for just this '.$lctype.'',$refpage).' '.
-# &mt('or for all your courses.',$refpage).'
');
- .&mt('Change for just [_1]this course[_2]'
- .' or for all [_3]your courses[_2].'
+ .&mt('Currently: [_1].',''.$currinit.'')
+ .' '
+ .&mt('[_1]Change[_2] for just [_3]this course[_4] or for all [_5]your courses[_6].'
+ ,''
+ ,''
,''
,''
- ,'')
+ ,''
+ ,'')
.' ');
if ($command eq 'reset') {
@@ -402,13 +402,13 @@ sub display_actions_box {
);
if ($timediff{'versions'} == -1) {
- $headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since start of '.$lctype;
+ $headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since start of '.$lctype);
} elsif ($timediff{'versions'} == 2592000) {
- $headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since last month';
+ $headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since last month');
} elsif ($timediff{'versions'} == 604800) {
- $headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since last week';
+ $headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since last week');
} elsif ($timediff{'versions'} == 86400) {
- $headings{'versionchanges'} = 'Resources in '.$lctype.' with version changes since yesterday';
+ $headings{'versionchanges'} = &mt('Resources in '.$lctype.' with version changes since yesterday');
}
$timediff{'oldroles'} = $display_settings{$cid.':oldroleinterval'};
@@ -416,13 +416,13 @@ sub display_actions_box {
$interval{'oldroles'} = $interval_titles->{'oldroles'}->{$timediff{'oldroles'}};
if ($timediff{'oldroles'} == -1) {
- $headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since start of '.$lctype;
+ $headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since start of '.$lctype);
} elsif ($timediff{'oldroles'} == 2592000) {
- $headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since last month';
+ $headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since last month');
} elsif ($timediff{'oldroles'} == 604800) {
- $headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since last week';
+ $headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since last week');
} elsif ($timediff{'oldroles'} == 86400) {
- $headings{'oldroles'} = 'Roles for which access to '.$lctype.' has expired since yesterday';
+ $headings{'oldroles'} = &mt('Roles for which access to '.$lctype.' has expired since yesterday');
}
$timediff{'newroles'} = $display_settings{$cid.':newroleinterval'};
@@ -430,13 +430,13 @@ sub display_actions_box {
$interval{'newroles'} = $interval_titles->{'newroles'}->{$timediff{'newroles'}};
if ($timediff{'newroles'} == -1) {
- $headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since start of '.$lctype;
+ $headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since start of '.$lctype);
} elsif ($timediff{'newroles'} == 2592000) {
- $headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since last month';
+ $headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since last month');
} elsif ($timediff{'newroles'} == 604800) {
- $headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since last week';
+ $headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since last week');
} elsif ($timediff{'newroles'} == 86400) {
- $headings{'newroles'} = 'Roles for which access to '.$lctype.' has become available since yesterday';
+ $headings{'newroles'} = &mt('Roles for which access to '.$lctype.' has become available since yesterday');
}
my $now = time;
@@ -464,9 +464,9 @@ sub display_actions_box {
}
$headings{'abovethreshold'} =
- &mt('Problems with av. attempts ≥ [_1] or deg. difficulty ≥ [_2] and total number of '.$stulabel{$crstype}.' with submissions ≥ [_3]',
+ &mt('(Problems with av. attempts ≥ [_1] or deg. difficulty ≥ [_2]) [_3] and total number of '.$stulabel{$crstype}.' with submissions ≥ [_4]',
$threshold{'av_attempts'},$threshold{'degdiff'},
- $threshold{'numstudents'});
+ ' ',$threshold{'numstudents'});
my @actionorder = ('handgrading','haserrors','abovethreshold','versionchanges','coursediscussion','coursenormalmail','coursecritmail','newroles','oldroles');
@@ -490,8 +490,9 @@ sub display_actions_box {
}
}
+ my $itemserror;
if ($needitems) {
- &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\%changed,\@newdiscussions,\@tograde,\@bombs,\@warnings,\%threshold,$cdom,$crs,\%res_title,\%show,$starttime,$countunread);
+ $itemserror = &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\%changed,\@newdiscussions,\@tograde,\@bombs,\@warnings,\%threshold,$cdom,$crs,\%res_title,\%show,$starttime,$countunread);
}
if ($show{'coursenormalmail'}) {
$msgcount = &getnormalmail(\@newmsgs);
@@ -533,7 +534,7 @@ sub display_actions_box {
if ($displayed == $halfway) {
$r->print('
');
}
return;
}
sub display_coursediscussion {
- my ($r,$newdiscussions,$unread,$countunread,$res_title) = @_;
+ my ($r,$newdiscussions,$unread,$countunread,$res_title,$itemserror) = @_;
my $lctype = lc(&Apache::loncommon::course_type());
my %lt = &Apache::lonlocal::texthash(
'loca' => 'Location',
@@ -1681,7 +1699,7 @@ sub display_coursediscussion {
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
my $disclink = $feedurl.'?symb='.$$unread{$ressymb}{symb};
if ($feedurl =~ /bulletinboard/) {
- $type = 'Bulletin Board';
+ $type = 'Discussion Board';
}
if ($$unread{$ressymb}{'enclink'}) {
$disclink = $$unread{$ressymb}{'enclink'}.'?symb='.$$unread{$ressymb}{'encsymb'};
@@ -1699,6 +1717,8 @@ sub display_coursediscussion {
}
$r->print("\n");
}
+ } elsif ($itemserror) {
+ $r->print('
'.$itemserror.'
');
} else {
$r->print('
'.$lt{'noun'}.'
');
}
@@ -1877,9 +1897,10 @@ sub store_courseinit_setting {
\%courseinit_settings,$udom,$uname);
if ($outcome eq 'ok') {
if ($page_control eq 'global preferences') {
- $result = &mt("Page displayed after role selection in $lctype now set by user's global preferences.");
+ $result = &mt("Page displayed after role selection in $lctype now set by [_1]user's global preferences[_2].",'','');
} else {
- $result = &mt('Page displayed after role selection in this '.$lctype.' set to [_2]',$lctype,$$initpage{$env{'form.courseinit_page'}});
+ $result = &mt('Page displayed after role selection in this '.$lctype.' set to [_1].'
+ ,''.$$initpage{$env{'form.courseinit_page'}}.'');
}
} else {
&Apache::lonnet::logthis('Error saving whatsnew courseinit '.
@@ -1891,8 +1912,10 @@ sub store_courseinit_setting {
''.$page_control.'',
''.$outcome.'. ');
} else {
- $result = &mt('Unable to set page display, after role selection, for this '.$lctype.' to [_2] due to [_3]. ',
- $$initpage{$env{'form.courseinit_page'}},$outcome);
+ $result = &mt('Unable to set page display, after role selection, for this '.$lctype.' to [_1] due to [_2].'
+ ,''.$$initpage{$env{'form.courseinit_page'}}.''
+ ,''.$outcome.'')
+ .' ';
}
}
}