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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 30 Jul 2002 21:23:45 -0000


matthew		Tue Jul 30 17:23:45 2002 EDT

  Modified files:              
    /loncom/interface	lonspreadsheet.pm 
  Log:
  Added student status selector from lonhtmlcommon.pm.
  
  
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.97 loncom/interface/lonspreadsheet.pm:1.98
--- loncom/interface/lonspreadsheet.pm:1.97	Mon Jul 15 08:26:51 2002
+++ loncom/interface/lonspreadsheet.pm	Tue Jul 30 17:23:44 2002
@@ -1,5 +1,5 @@
 #
-# $Id: lonspreadsheet.pm,v 1.97 2002/07/15 12:26:51 www Exp $
+# $Id: lonspreadsheet.pm,v 1.98 2002/07/30 21:23:44 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -71,7 +71,7 @@
 use Apache::Constants qw(:common :http);
 use GDBM_File;
 use HTML::TokeParser;
-
+use Apache::lonhtmlcommon;
 #
 # Caches for previously calculated spreadsheets
 #
@@ -1652,6 +1652,8 @@
             my ($end,$start)=split(/\:/,&Apache::lonnet::unescape($value));
             my $active=1;
             if (($end) && ($now>$end)) { $active=0; }
+            $active = 1 if ($ENV{'form.Status'} eq 'Any');
+            $active = !$active if ($ENV{'form.Status'} eq 'Expired');
             if ($active) {
                 my $rowlabel='';
                 $name=&Apache::lonnet::unescape($name);
@@ -2742,6 +2744,9 @@
     }
 
 # ------------------------------------------------------------------ Insertrows
+    $r->print(' Student Status: '.
+              &Apache::lonhtmlcommon::StatusOptions
+              ($ENV{'form.Status'},'sheet'));
 
    $r->print(<<ENDINSERTBUTTONS);
 <br>