--- loncom/homework/edit.pm 2008/12/10 21:45:31 1.120
+++ loncom/homework/edit.pm 2009/10/16 17:23:51 1.124
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.120 2008/12/10 21:45:31 bisitz Exp $
+# $Id: edit.pm,v 1.124 2009/10/16 17:23:51 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -202,7 +202,7 @@ sub start_table {
$Apache::edit::colordepth++;
push(@Apache::edit::inserttag,$token->[1]);
my $result='
';
- $result.='
';
+ $result.='';
return $result;
}
@@ -230,7 +230,7 @@ sub end_table {
return $result;
}
-sub start_spanning_row { return '';}
+sub start_spanning_row { return ' |
';}
sub start_row { return ' |
'; }
sub end_row { return ' |
'; }
@@ -612,6 +612,18 @@ sub insert_numericalhint {
';
}
+sub insert_reactionhint {
+ return '
+
+';
+}
+
+sub insert_organichint {
+ return '
+
+';
+}
+
sub insert_stringhint {
return '
@@ -871,21 +883,23 @@ sub select_arg {
my $result;
my $optionlist="";
my $selected=$token->[2]{$name};
- foreach my $option (@$list) {
- my ($text,$value);
- if ( ref($option) eq 'ARRAY') {
- $value='value="'.&HTML::Entities::encode($$option[0]).'"';
- $text=$$option[1];
- $option=$$option[0];
- } else {
- $text=$option;
- $value='value="'.&HTML::Entities::encode($option,'\'"&<>').'"';
- }
- if ( $selected eq $option ) {
- $optionlist.="\n";
- } else {
- $optionlist.="\n";
- }
+ if (ref($list) eq 'ARRAY') {
+ foreach my $option (@{$list}) {
+ my ($text,$value);
+ if (ref($option) eq 'ARRAY') {
+ $value='value="'.&HTML::Entities::encode($option->[0]).'"';
+ $text=$option->[1];
+ $option=$option->[0];
+ } else {
+ $text=$option;
+ $value='value="'.&HTML::Entities::encode($option,'\'"&<>').'"';
+ }
+ if ( $selected eq $option ) {
+ $optionlist.="\n";
+ } else {
+ $optionlist.="\n";
+ }
+ }
}
$result.=''.&mt($description).'