Diff for /loncom/interface/lonwhatsnew.pm between versions 1.34 and 1.35

version 1.34, 2005/12/05 16:42:26 version 1.35, 2005/12/05 19:27:53
Line 208  sub display_actions_box() { Line 208  sub display_actions_box() {
              coursecritmail => 1,               coursecritmail => 1,
     );      );
   
       my $timediff = 604800;
     my %display_settings = &get_display_settings();      my %display_settings = &get_display_settings();
     my $starttime = 86400;      my $now = time;
     my %intervals = (      my %intervals = (
                   all => 'since resource creation',  
                    -1 => 'since start of course',                     -1 => 'since start of course',
               2592000 => 'since last month',                2592000 => 'since last month',
                604800 => 'since last week',                 604800 => 'since last week',
                 86400 => 'since yesterday',                  86400 => 'since yesterday',
     );      );
     my $interval = $intervals{$starttime};      my $interval = $intervals{$timediff};
       if ($timediff == -1) {
           $timediff = time;
       } 
       my $starttime = $now - $timediff;
   
     my %headings = &Apache::lonlocal::texthash(      my %headings = &Apache::lonlocal::texthash(
                 coursediscussion =>  'Unread course discussion posts',                  coursediscussion =>  'Unread course discussion posts',
Line 527  sub check_handgraded { Line 531  sub check_handgraded {
             }              }
         }          }
         if ($handgradeable) {          if ($handgradeable) {
             my @ungraded = &Apache::bridgetask::get_users_in_queue(              my @ungraded = &Apache::bridgetask::get_queue_symb_status(
                                              'gradingqueue',$symb,$cdom,$cnum);                                               'gradingqueue',$symb,$cdom,$cnum);
             if (@ungraded > 0) {              if (@ungraded > 0) {
                 $$ungraded{$symb}{count} = scalar(@ungraded);                  $$ungraded{$symb}{count} = scalar(@ungraded);
Line 598  sub check_thresholds { Line 602  sub check_thresholds {
         }          }
     }      }
     if ($warning) {      if ($warning) {
         if ($$warningnum %2 == 1) {          if ($warningnum %2 == 1) {
             $rowColor = $rowColor1;              $rowColor = $rowColor1;
         } else {          } else {
             $rowColor = $rowColor2;              $rowColor = $rowColor2;
Line 629  sub check_thresholds { Line 633  sub check_thresholds {
             }              }
         }          }
         push(@{$warnings},$symb);          push(@{$warnings},$symb);
         $$warningnum ++;          $warningnum ++;
     }      }
 }  }
   
Line 797  sub checkversions { Line 801  sub checkversions {
                     my $revdate =                       my $revdate = 
                           &Apache::lonnet::metadata($root.'.'.$extension,                            &Apache::lonnet::metadata($root.'.'.$extension,
                                                      'lastrevisiondate');                                                       'lastrevisiondate');
                     print STDERR "revdate for $root and $extension is $revdate\n";  
                     $revdate =  &Apache::lonlocal::locallocaltime($revdate);                      $revdate =  &Apache::lonlocal::locallocaltime($revdate);
                     my $linkurl=&Apache::lonnet::clutter($key);                      my $linkurl=&Apache::lonnet::clutter($key);
                     my $usedversion=$navmap->usedVersion('version_'.$linkurl);                      my $usedversion=$navmap->usedVersion('version_'.$linkurl);
Line 808  sub checkversions { Line 811  sub checkversions {
                         $version = $currentversion;                          $version = $currentversion;
                     }                      }
                     foreach my $res (@resources) {                      foreach my $res (@resources) {
                         my $symb = $res->symb();                           if (ref($res) eq 'Apache::lonnavmaps::resource') { 
                         %{$$changed{$symb}} = (                              my $symb = $res->symb();
                               %{$$changed{$symb}} = (
                                                 current => $currentversion,                                                  current => $currentversion,
                                                 version => $version,                                                  version => $version,
                                                 revdate => $revdate,                                                  revdate => $revdate,
                         );                              );
                           }
                     }                      }
                 }                  }
             }              }
Line 914  sub display_abovethreshold { Line 919  sub display_abovethreshold {
             $r->print('<tr bgcolor="'.$rowColor.'"><td '.$rowspan.'><a href="'.$linkurl.'"><small>'.$$triggered{$res}{title}.'</small></a></td>'.$$triggered{$res}{text});              $r->print('<tr bgcolor="'.$rowColor.'"><td '.$rowspan.'><a href="'.$linkurl.'"><small>'.$$triggered{$res}{title}.'</small></a></td>'.$$triggered{$res}{text});
             $warningnum ++;              $warningnum ++;
         }          }
         $r->print('<tr bgcolor="#cccccc"><td colspan="7" align="right"><br /><b><small><input type="submit" name="counters" value="'.$lt{'rese'}.'/></form>');          $r->print('<tr bgcolor="#cccccc"><td colspan="7" align="right"><br /><b><small><input type="submit" name="counters" value="'.$lt{'rese'}.'" /></form>');
     } else {      } else {
         $r->print('<tr><td bgcolor="#ffffff"><br /><center><b><i><small>'.$lt{'nopr'}.'</small></i></b></center><br /></td></tr>');          $r->print('<tr><td bgcolor="#ffffff"><br /><center><b><i><small>'.$lt{'nopr'}.'</small></i></b></center><br /></td></tr>');
     }      }

Removed from v.1.34  
changed lines
  Added in v.1.35


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