[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm

lueken lueken@source.lon-capa.org
Mon, 04 May 2009 21:44:54 -0000


lueken		Mon May  4 21:44:54 2009 EDT

  Modified files:              
    /loncom/interface	lonwhatsnew.pm 
  Log:
  Using the new Locallocaltime-Function SpeedUp Hack
  
  
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.91 loncom/interface/lonwhatsnew.pm:1.92
--- loncom/interface/lonwhatsnew.pm:1.91	Thu Apr 16 21:19:56 2009
+++ loncom/interface/lonwhatsnew.pm	Mon May  4 21:44:54 2009
@@ -1,5 +1,5 @@
 #
-# $Id: lonwhatsnew.pm,v 1.91 2009/04/16 21:19:56 lueken Exp $
+# $Id: lonwhatsnew.pm,v 1.92 2009/05/04 21:44:54 lueken Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1153,6 +1153,8 @@
 # Check for unread mail in course
     my $msgcount = 0;
 
+    my $datetime;
+
     my @messages = sort(&Apache::lonnet::getkeys('nohist_email'));
     foreach my $message (@messages) {
 	my $msgid=&escape($message);
@@ -1162,7 +1164,7 @@
             if (defined($sendtime) && $sendtime!~/error/) {
                 my $numsendtime = $sendtime;
                 if ($status eq 'new') {
-                $sendtime = &Apache::lonlocal::locallocaltime($sendtime);
+                $sendtime = &Apache::lonlocal::locallocaltime($sendtime,'',\$datetime);
 		    $msgcount ++;
                     if ($shortsubj eq '') {
                         $shortsubj = &mt('No subject');
@@ -1186,6 +1188,7 @@
 # Check for critical messages in course
     my %what=&Apache::lonnet::dump('critical');
     my $result = '';
+    my $datetime;
     my $critmsgcount = 0;
     foreach my $msgid (sort(keys(%what))) {
         my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=
@@ -1193,7 +1196,7 @@
         if (($fromcid) && ($fromcid eq  $env{'request.course.id'})) {
             if (defined($sendtime) && $sendtime!~/error/) {
                 my $numsendtime = $sendtime;
-                $sendtime = &Apache::lonlocal::locallocaltime($sendtime);
+                $sendtime = &Apache::lonlocal::locallocaltime($sendtime,'',\$datetime);
                 $critmsgcount ++;
                 if ($shortsubj eq '') {
                     $shortsubj = &mt('No subject');
@@ -1614,6 +1617,7 @@
 sub display_rolechanges {
     my ($r,$chgcount,$changed,$interval,$crstype) = @_;
     my $now = time();
+    my $datetime;
     my %lt = &Apache::lonlocal::texthash(
         'user'  => 'User',
         'tich'  => 'Time of change',
@@ -1651,7 +1655,7 @@
                             my $link = 
                                 &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom);
                             $r->print('<tr'.$css_class.'>'.
-                                      '<td>'.&Apache::lonlocal::locallocaltime($item).'</td>'.
+                                      '<td>'.&Apache::lonlocal::locallocaltime($item,'',\$datetime).'</td>'.
                                       '<td>'.$link.'</td>'.
                                       '<td>'.$role.'</td>'.
                                       '<td>'.$section.'</td>'.