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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 08 May 2003 19:17:32 -0000


sakharuk		Thu May  8 15:17:32 2003 EDT

  Modified files:              
    /loncom/interface	lonhelper.pm 
  Log:
   Small check where we are (construction space or resources space) added.
  
  
Index: loncom/interface/lonhelper.pm
diff -u loncom/interface/lonhelper.pm:1.23 loncom/interface/lonhelper.pm:1.24
--- loncom/interface/lonhelper.pm:1.23	Wed May  7 15:24:07 2003
+++ loncom/interface/lonhelper.pm	Thu May  8 15:17:31 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # .helper XML handler to implement the LON-CAPA helper
 #
-# $Id: lonhelper.pm,v 1.23 2003/05/07 19:24:07 bowersj2 Exp $
+# $Id: lonhelper.pm,v 1.24 2003/05/08 19:17:31 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -949,7 +949,7 @@
     }
 
     # Need to initialize the choices list, so everything can assume it exists
-    $paramHash->{'variable'} = $token->[2]{'variable'};
+    $paramHash->{'variable'} = $token->[2]{'variable'} if (!defined($paramHash->{'variable'}));
     $helper->declareVar($paramHash->{'variable'});
     $paramHash->{'multichoice'} = $token->[2]{'multichoice'};
     $paramHash->{CHOICES} = [];
@@ -1909,7 +1909,14 @@
         }
         my $fileName = $subdir .'/'. $file;
         if (&$filterFunc($file)) {
-            (my $status, my $color) = @{fileState($subdir, $file)};
+	    my $status;
+	    my $color;
+	    if ($helper->{VARS}->{'construction'}) {
+		($status, $color) = @{fileState($subdir, $file)};
+	    } else {
+		$status = '';
+		$color = '';
+	    }
 
             # Netscape 4 is stupid and there's nowhere to put the
             # information on the input tag that the file is Published,