--- loncom/interface/lonhelper.pm 2003/05/02 19:20:51 1.17
+++ 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.17 2003/05/02 19:20:51 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} = [];
@@ -997,17 +997,20 @@ sub render {
if ($self->{'multichoice'}) {
$result .= <
SCRIPT
$buttons = <
BUTTONS
}
@@ -1474,10 +1477,10 @@ sub render {
if ($self->{'multichoice'}) {
$result = <
SCRIPT
$buttons = <
BUTTONS
}
@@ -1682,7 +1689,7 @@ BUTTONS
$checked = 1;
}
$result .=
- " value='" . HTML::Entities::encode($_)
+ " value='" . HTML::Entities::encode($_ . ':' . $choices->{$_}->[$section])
. "' />