Diff for /loncom/interface/lonwhatsnew.pm between versions 1.18 and 1.23

version 1.18, 2005/06/06 22:39:59 version 1.23, 2005/07/10 02:31:30
Line 178  sub display_actions_box() { Line 178  sub display_actions_box() {
     }      }
   
     my %threshold = (      my %threshold = (
                       av_attempts => 0,                        av_attempts => 2,
                       degdiff => 0.01,                        degdiff => 0.5,
                       numstudents => 0,                        numstudents => 2,
                      );                       );
   
     my $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);      my $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);
Line 264  END Line 264  END
         @bombs = sort { &cmp_title($a,$b,\%res_title) } @bombs;          @bombs = sort { &cmp_title($a,$b,\%res_title) } @bombs;
         foreach my $bomb (@bombs) {          foreach my $bomb (@bombs) {
             if ($bombnum %2 == 1) {              if ($bombnum %2 == 1) {
                  $rowColor = $rowColor1;   $rowColor = $rowColor1;
             } else {              } else {
                 $rowColor = $rowColor2;                  $rowColor = $rowColor2;
             }              }
Line 386  END Line 386  END
             } else {              } else {
                 $rowColor = $rowColor2;                  $rowColor = $rowColor2;
             }              }
             $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;<small></td><td valign="top"><small><a href="/adm/mail?">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');              $r->print('<tr bgcolor="'.$rowColor.'"><td valign="top"><small>'.$mailcount.'. &nbsp;<small></td><td valign="top"><small><a href="/adm/communicate">'.$msg->{'shortsub'}.'</a>&nbsp; &nbsp;</small></td><td valign="top"><small>&nbsp;'.$msg->{'from'}.'@'.$msg->{'fromdom'}.'&nbsp;</small></td><td valign="top"><small>'.$msg->{'sendtime'}.'</small></td></tr>');
             $rowNum ++;              $rowNum ++;
             $mailcount ++;              $mailcount ++;
         }          }
Line 532  sub getitems { Line 532  sub getitems {
         $$res_title{$symb} = $title;          $$res_title{$symb} = $title;
         my $ressymb = $resource->wrap_symb();          my $ressymb = $resource->wrap_symb();
 # Check for unread discussion postings  # Check for unread discussion postings
         if (defined($discussiontime{$ressymb})) {   if ($resource->hasDiscussion()) {
             push(@discussions,$ressymb);              push(@discussions,$ressymb);
             my $prevread = 0;              my $prevread = 0;
             my $unreadcount = 0;              my $unreadcount = 0;
Line 561  sub getitems { Line 561  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) = &Apache::grades::response_type($url,$symb);              my ($partlist,$handgrade,$responseType) = 
             foreach my $student (keys(%$classlist)) {   &Apache::grades::response_type($url,$symb);
                 my ($uname,$udom) = split(/:/,$student);      my $handgradeable;
                 my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist);      foreach my $value (values(%{$handgrade})) {
                 my $submitted = 0;   if ($value eq 'yes') { $handgradeable=1; last; }
                 my $ungraded = 0;      }
                 foreach (keys(%status)) {      if ($handgradeable) {
                     $submitted = 1 if ($status{$_} ne 'nothing');   foreach my $student (keys(%$classlist)) {
                     $ungraded = 1 if ($status{$_} =~ /^ungraded/);      my ($uname,$udom) = split(/:/,$student);
                     my ($foo,$partid,$foo1) = split(/\./,$_);      my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist);
                     if ($status{'resource.'.$partid.'.submitted_by'} ne '') {      my $submitted = 0;
                         $submitted = 0;      my $ungraded = 0;
                     }      foreach (keys(%status)) {
                 }   $submitted = 1 if ($status{$_} ne 'nothing');
                 next if (!$submitted || !$ungraded);   $ungraded = 1 if ($status{$_} =~ /^ungraded/);
                 $ctr ++;   my ($foo,$partid,$foo1) = split(/\./,$_);
             }   if ($status{'resource.'.$partid.'.submitted_by'} ne '') {
             if ($ctr) {      $submitted = 0;
                 $$ungraded{$symb}{count} = $ctr;   }
                 $$ungraded{$symb}{title} = $title;      }
                 push(@{$tograde}, $symb);      next if (!$submitted || !$ungraded);
             }      $ctr ++;
    }
    if ($ctr) {
       $$ungraded{$symb}{count} = $ctr;
       $$ungraded{$symb}{title} = $title;
       push(@{$tograde}, $symb);
    }
       }
         }          }
   
 # Check for bombs  # Check for bombs
         if ($resource->getErrors()) {          if ($resource->getErrors()) {
             my $errors = $resource->getErrors();              my $errors = $resource->getErrors();
             $errors =~ s/^,//;      $errors =~ s/^,//;
             my @bombs = split(/,/, $errors);              my @bombs = split(/,/, $errors);
             my $errorcount = scalar(@bombs);              my $errorcount = scalar(@bombs);
             my $errorlink = '<a href="/adm/email?display='.              my $errorlink = '<a href="/adm/email?display='.

Removed from v.1.18  
changed lines
  Added in v.1.23


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>