--- loncom/homework/edit.pm 2003/10/08 16:46:38 1.67
+++ loncom/homework/edit.pm 2003/10/24 21:09:24 1.68
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.67 2003/10/08 16:46:38 albertel Exp $
+# $Id: edit.pm,v 1.68 2003/10/24 21:09:24 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -731,17 +731,21 @@ ENDBUTTON
#----------------------------------------------------- browse
sub browse {
# insert a link to call up the filesystem browser (lonindexer)
- my ($id, $mode) = @_;
+ my ($id, $mode, $titleid) = @_;
my $form = 'lonhomework';
my $element;
if (! defined($mode) || $mode eq 'attribute') {
$element = &Apache::lonnet::escape("$id\_$Apache::lonxml::curdepth");
} elsif ($mode eq 'textnode') { # for data between ...
$element = &Apache::lonnet::escape('homework_edit_'.
- $Apache::lonxml::curdepth);
+ $Apache::lonxml::curdepth);
+ }
+ my $titleelement;
+ if ($titleid) {
+ $titleelement=",'','','".&Apache::lonnet::escape("$titleid\_$Apache::lonxml::curdepth")."'";
}
my $result = <<"ENDBUTTON";
-Select
+Select
ENDBUTTON
return $result;
}
@@ -749,7 +753,7 @@ ENDBUTTON
#----------------------------------------------------- browse
sub search {
# insert a link to call up the filesystem browser (lonindexer)
- my ($id, $mode) = @_;
+ my ($id, $mode, $titleid) = @_;
my $form = 'lonhomework';
my $element;
if (! defined($mode) || $mode eq 'attribute') {
@@ -758,8 +762,12 @@ sub search {
$element = &Apache::lonnet::escape('homework_edit_'.
$Apache::lonxml::curdepth);
}
+ my $titleelement;
+ if ($titleid) {
+ $titleelement=",'".&Apache::lonnet::escape("$titleid\_$Apache::lonxml::curdepth")."'";
+ }
my $result = <<"ENDBUTTON";
-Search
+Search
ENDBUTTON
return $result;
}