--- loncom/homework/edit.pm 2003/09/08 21:22:15 1.63
+++ loncom/homework/edit.pm 2003/09/19 19:37:53 1.66
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.63 2003/09/08 21:22:15 albertel Exp $
+# $Id: edit.pm,v 1.66 2003/09/19 19:37:53 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -67,7 +67,7 @@ sub tag_start {
#
".
# &movebuttons($target,$token).
# " | \n";
- my @help;# = Apache::lonxml::helpinfo($token);
+ my @help = Apache::lonxml::helpinfo($token);
if ($help[0]) {
$result .= ' | ' .
Apache::loncommon::help_open_topic(@help) .
@@ -569,17 +569,19 @@ sub select_arg {
my $optionlist="";
my $selected=$token->[2]{$name};
foreach my $option (@$list) {
- my $value;
+ my ($text,$value);
if ( ref($option) eq 'ARRAY') {
$value='value="'.$$option[0].'"';
- $option=$$option[1];
+ $text=$$option[1];
+ $option=$$option[0];
} else {
+ $text=$option;
$value='value="'.$option.'"';
}
if ( $selected eq $option ) {
- $optionlist.="\n";
+ $optionlist.="\n";
} else {
- $optionlist.="\n";
+ $optionlist.="\n";
}
}
$result.=''.$description.' |