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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 14 Jun 2006 18:34:46 -0000


albertel		Wed Jun 14 14:34:46 2006 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - from mlucas some of BUG#3763
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.132 loncom/interface/lonhtmlcommon.pm:1.133
--- loncom/interface/lonhtmlcommon.pm:1.132	Tue Jun 13 10:42:24 2006
+++ loncom/interface/lonhtmlcommon.pm	Wed Jun 14 14:34:46 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.132 2006/06/13 14:42:24 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.133 2006/06/14 18:34:46 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -150,8 +150,13 @@
 
 # Create hash with key as time and recent as value
     my %time_hash = ();
+    my $nfrozen = 0;
     foreach (keys %recent) {
-        my $thistime=(split(/\&/,$recent{$_}))[0];
+        my ($thistime,$thisvalue)=(split(/\&/,$recent{$_}));
+        if (($thisvalue eq 'role_frozen') && ($area='roles')) {
+            $thistime=time+$nfrozen;
+            $nfrozen++;
+        }
         $time_hash{$thistime} = $_;
     }
 
@@ -160,7 +165,7 @@
     my $idx = 1;
     foreach (reverse sort keys %time_hash) {
        $return_hash{$time_hash{$_}} =
-                  &unescape((split(/\&/,$recent{$_}))[1]);
+                  &unescape((split(/\&/,$recent{$time_hash{$_}}))[1]);
        if ($n && ($idx++ >= $n)) {last;}
     }