--- loncom/homework/edit.pm 2003/06/30 20:41:35 1.57
+++ loncom/homework/edit.pm 2003/10/06 20:11:38 1.57.2.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.57 2003/06/30 20:41:35 albertel Exp $
+# $Id: edit.pm,v 1.57.2.2 2003/10/06 20:11:38 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -527,17 +527,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.'