--- loncom/homework/edit.pm 2003/09/08 21:22:15 1.63
+++ loncom/homework/edit.pm 2003/10/08 16:46:38 1.67
@@ -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.67 2003/10/08 16:46:38 albertel 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) .
@@ -283,6 +283,8 @@ sub insert_formularesponse {
+
+
';
}
@@ -292,6 +294,8 @@ sub insert_numericalresponse {
+
+
';
}
@@ -301,6 +305,8 @@ sub insert_stringresponse {
+
+
';
}
@@ -318,6 +324,8 @@ sub insert_imageresponse {
+
+
';
}
@@ -328,6 +336,8 @@ sub insert_optionresponse {
+
+
';
}
@@ -338,6 +348,8 @@ sub insert_radiobuttonresponse {
+
+
';
}
@@ -348,6 +360,8 @@ sub insert_rankresponse {
+
+
';
}
@@ -360,6 +374,8 @@ sub insert_matchresponse {
+
+
';
}
@@ -374,6 +390,14 @@ sub insert_hintpart {
';
}
+sub insert_hintgroup {
+ return '
+
+
+
+';
+}
+
sub insert_numericalhint {
return '
@@ -569,17 +593,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.' |