--- loncom/homework/edit.pm 2003/09/08 21:22:15 1.63
+++ loncom/homework/edit.pm 2003/09/10 21:59:44 1.64
@@ -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.64 2003/09/10 21:59:44 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -568,18 +568,21 @@ sub select_arg {
my $result;
my $optionlist="";
my $selected=$token->[2]{$name};
+ &Apache::lonxml::error("Wha $selected");
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.'