--- loncom/homework/edit.pm 2002/11/07 19:45:16 1.39
+++ loncom/homework/edit.pm 2002/11/14 16:47:41 1.42
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.39 2002/11/07 19:45:16 albertel Exp $
+# $Id: edit.pm,v 1.42 2002/11/14 16:47:41 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -99,14 +99,14 @@ sub start_table {
}
$Apache::edit::colordepth++;
push(@Apache::edit::inserttag,$token->[1]);
- my $result='
';
- $result.='
';
+ my $result='';
+ $result.='
';
return $result;
}
sub end_table {
$Apache::edit::colordepth--;
- my $result='
';
+ my $result='
';
$result.="";
my ($tagname,$closingtag);
@@ -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 {
@@ -518,9 +518,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