--- loncom/interface/lonhelper.pm 2003/05/07 18:48:15 1.22
+++ loncom/interface/lonhelper.pm 2003/05/08 19:17:31 1.24
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# .helper XML handler to implement the LON-CAPA helper
#
-# $Id: lonhelper.pm,v 1.22 2003/05/07 18:48:15 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 @@ sub start_choices {
}
# 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} = [];
@@ -1866,10 +1866,15 @@ SCRIPT
+BUTTONS
+
+ if ($helper->{VARS}->{'construction'}) {
+ $buttons .= <
BUTTONS
+ }
}
# Get the list of files in this directory.
@@ -1904,7 +1909,14 @@ BUTTONS
}
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,
@@ -1920,9 +1932,9 @@ BUTTONS
# couldn't figure out how to reach into the event handler's
# actual code to retreive a value), but it works well enough
# here.
-
+
my $onclick = '';
- if ($status eq 'Published') {
+ if ($status eq 'Published' && $helper->{VARS}->{'construction'}) {
$onclick = 'onclick="a=1" ';
}
$result .= '