--- loncom/homework/edit.pm 2002/11/11 22:37:23 1.41
+++ 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.41 2002/11/11 22:37:23 www Exp $
+# $Id: edit.pm,v 1.42 2002/11/14 16:47:41 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -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