--- loncom/interface/lonwhatsnew.pm 2006/06/03 21:28:07 1.59
+++ loncom/interface/lonwhatsnew.pm 2006/09/07 19:31:26 1.62
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.59 2006/06/03 21:28:07 albertel Exp $
+# $Id: lonwhatsnew.pm,v 1.62 2006/09/07 19:31:26 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -256,7 +256,7 @@ sub display_actions_box {
'Group' => 'members',
);
my %lt = &Apache::lonlocal::texthash(
- 'yacc' => 'You are accessing an invalid course or group',
+ 'yacc' => 'You are accessing an invalid course',
'gtfr' => 'Go to first resource',
'hial' => 'Hide all',
'shal' => 'Show all',
@@ -319,7 +319,7 @@ 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/groups',$refpage).'
');
+ &mt('or for all your courses',$refpage).' ');
if ($command eq 'reset') {
$result = &process_reset($cdom,$crs);
@@ -687,7 +687,7 @@ sub display_launcher {
$critmsgcount,$critmsgs,$interval,$countunread) = @_;
if ($$checkallowed{$action}) {
- &start_box($r,$tabbg,$show,$headings,$action,$refpage);
+ &start_box($r,$tabbg,$show,$headings,$action,$refpage,$action);
if ($$show{$action}) {
if ($action eq 'handgrading') { # UNGRADED ITEMS
&display_handgrade($r,$tograde,$rowColor1,$rowColor2,
@@ -701,7 +701,7 @@ sub display_launcher {
} elsif ($action eq 'abovethreshold') { # DEGDIFF/AV. TRIES TRIGGERS
&display_abovethreshold($r,$refpage,$warnings,$triggered,
- $res_title);
+ $res_title);
} elsif ($action eq 'coursediscussion') { # UNREAD COURSE DISCUSSION
&display_coursediscussion($r,$newdiscussions,$unread,
$countunread,$res_title,$rowColor1,$rowColor2);
@@ -739,7 +739,6 @@ sub getitems {
$cdom,$crs);
}
- my $warningnum = 0;
foreach my $resource (@allres) {
my $result = '';
my $applies = 0;
@@ -773,9 +772,8 @@ sub getitems {
# Maxtries and degree of difficulty for problem parts, unless handgradeable
if ($$show{'abovethreshold'}) {
- $warningnum = &check_thresholds($resource,$symb,\%resourcetracker,
- $triggered,$threshold,$warnings,
- $warningnum,$rowColor1,$rowColor2);
+ &check_thresholds($resource,$symb,\%resourcetracker,
+ $triggered,$threshold,$warnings);
}
}
@@ -839,8 +837,7 @@ sub check_bombed {
}
sub check_thresholds {
- my ($resource,$symb,$resourcetracker,$triggered,$threshold,$warnings,
- $warningnum,$rowColor1,$rowColor2) = @_;
+ my ($resource,$symb,$resourcetracker,$triggered,$threshold,$warnings) = @_;
# Compile maxtries and degree of difficulty for problem parts, unless handgradeable
my @parts = @{$resource->parts()};
my %stats;
@@ -885,41 +882,32 @@ sub check_thresholds {
}
}
if ($warning) {
- if ($warningnum%2 == 1) {
- $rowColor = $rowColor1;
- } else {
- $rowColor = $rowColor2;
- }
- $$triggered{$symb}{rowColor} = $rowColor;
$$triggered{$symb}{title} = $resource->title;
+ my $partcount = 0;
+ @{$$triggered{$symb}{text}} = ();
foreach my $part (@parts) {
if (exists($stats{$part}{users})) {
my $resetname = 'reset_'.&escape($symb."\0".$part);
my $resettitle = 'title_'.&escape($symb."\0".$part);
- if ($$triggered{$symb}{numparts}) {
- $$triggered{$symb}{text} .= '