--- loncom/homework/edit.pm 2002/11/08 14:38:47 1.40
+++ loncom/homework/edit.pm 2003/01/19 08:13:54 1.43
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.40 2002/11/08 14:38:47 albertel Exp $
+# $Id: edit.pm,v 1.43 2003/01/19 08:13:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -100,7 +100,7 @@ sub start_table {
$Apache::edit::colordepth++;
push(@Apache::edit::inserttag,$token->[1]);
my $result='
';
- $result.='
';
+ $result.='';
return $result;
}
@@ -122,8 +122,8 @@ sub end_table {
return $result;
}
-sub start_spanning_row { return '';}
-sub start_row { return ' |
'; }
+sub start_spanning_row { return ' |
';}
+sub start_row { return ' |
'; }
sub end_row { return ' |
'; }
sub movebuttons {
@@ -327,6 +327,16 @@ sub insert_radiobuttonresponse {
';
}
+sub insert_rankresponse {
+ return '
+
+
+
+
+
+';
+}
+
sub insert_displayduedate { return ''; }
sub insert_displaytitle { return ''; }
sub insert_hintpart {
@@ -518,9 +528,15 @@ sub select_or_text_arg {
#----------------------------------------------------- browse
sub browse {
# insert a link to call up the filesystem browser (lonindexer)
- $_ = shift;
+ my ($id, $mode) = @_;
my $form = 'lonhomework';
- my $element = &Apache::lonnet::escape("$Apache::lonxml::curdepth.$_");
+ my $element;
+ if (! defined($mode) || $mode eq 'attribute') {
+ $element = &Apache::lonnet::escape("$Apache::lonxml::curdepth.$id");
+ } elsif ($mode eq 'textnode') { # for data between ...
+ $element = &Apache::lonnet::escape('homework_edit_'.
+ $Apache::lonxml::curdepth);
+ }
my $result = <<"ENDBUTTON";
Browse
ENDBUTTON