version 1.24, 2005/07/14 21:30:25
|
version 1.28, 2005/09/12 01:45:25
|
Line 208 sub display_actions_box() {
|
Line 208 sub display_actions_box() {
|
if ($result) { |
if ($result) { |
$r->print($result.'<hr width="100%" />'); |
$r->print($result.'<hr width="100%" />'); |
} |
} |
|
$r->rflush(); |
|
|
&get_curr_thresholds(\%threshold,$cdom,$crs); |
&get_curr_thresholds(\%threshold,$cdom,$crs); |
&getitems(\%unread,\%ungraded,\%bombed,\%triggered,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs,%res_title); |
&getitems(\%unread,\%ungraded,\%bombed,\%triggered,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs,%res_title); |
Line 421 END
|
Line 422 END
|
} else { |
} else { |
$rowColor = $rowColor2; |
$rowColor = $rowColor2; |
} |
} |
$r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. <small></td><td valign="top"><small><a href="/adm/mail?">'.$msg->{'shortsub'}.'</a> </small></td><td valign="top"><small> '.$msg->{'from'}.'@'.$msg->{'fromdom'}.' </small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>'); |
$r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. <small></td><td valign="top"><small><a href="/adm/email?">'.$msg->{'shortsub'}.'</a> </small></td><td valign="top"><small> '.$msg->{'from'}.'@'.$msg->{'fromdom'}.' </small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>'); |
$rowNum ++; |
$rowNum ++; |
$mailcount ++; |
$mailcount ++; |
} |
} |
Line 507 sub display_config_box() {
|
Line 508 sub display_config_box() {
|
sub getitems { |
sub getitems { |
my ($unread,$ungraded,$bombed,$triggered,$newdiscussions,$tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs,$res_title) = @_; |
my ($unread,$ungraded,$bombed,$triggered,$newdiscussions,$tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs,$res_title) = @_; |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my @allres=$navmap->retrieveResources(); |
# force retrieve Resource to seed the part id cache we'll need it later |
|
my @allres=$navmap->retrieveResources(undef,sub {if ($_[0]->is_problem) { $_[0]->parts();} return 1;}); |
my %discussiontime = &Apache::lonnet::dump('discussiontimes',$cdom,$crs); |
my %discussiontime = &Apache::lonnet::dump('discussiontimes',$cdom,$crs); |
my %lastread = &Apache::lonnet::dump('nohist_'.$env{'request.course.id'}. |
my %lastread = &Apache::lonnet::dump('nohist_'.$env{'request.course.id'}. |
'_discuss',$env{'user.domain'},$env{'user.name'},'lastread'); |
'_discuss',$env{'user.domain'},$env{'user.name'},'lastread'); |
Line 564 sub getitems {
|
Line 566 sub getitems {
|
if ($resource->is_problem()) { |
if ($resource->is_problem()) { |
my $ctr = 0; |
my $ctr = 0; |
my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb); |
my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb); |
my ($partlist,$handgrade,$responseType) = |
my $partlist=$resource->parts(); |
&Apache::grades::response_type($url,$symb); |
|
my $handgradeable; |
my $handgradeable; |
foreach my $value (values(%{$handgrade})) { |
foreach my $part (@$partlist) { |
if ($value eq 'yes') { $handgradeable=1; last; } |
if ($resource->handgrade($part) eq 'yes') { |
|
$handgradeable=1; last; |
|
} |
} |
} |
if ($handgradeable) { |
if ($handgradeable) { |
foreach my $student (keys(%$classlist)) { |
foreach my $student (keys(%$classlist)) { |