--- loncom/homework/edit.pm 2003/09/19 19:37:53 1.66
+++ 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.66 2003/09/19 19:37:53 matthew Exp $
+# $Id: edit.pm,v 1.68 2003/10/24 21:09:24 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -283,6 +283,8 @@ sub insert_formularesponse {
+
+
';
}
@@ -292,6 +294,8 @@ sub insert_numericalresponse {
+
+
';
}
@@ -301,6 +305,8 @@ sub insert_stringresponse {
+
+
';
}
@@ -318,6 +324,8 @@ sub insert_imageresponse {
+
+
';
}
@@ -328,6 +336,8 @@ sub insert_optionresponse {
+
+
';
}
@@ -338,6 +348,8 @@ sub insert_radiobuttonresponse {
+
+
';
}
@@ -348,6 +360,8 @@ sub insert_rankresponse {
+
+
';
}
@@ -360,6 +374,8 @@ sub insert_matchresponse {
+
+
';
}
@@ -374,6 +390,14 @@ sub insert_hintpart {
';
}
+sub insert_hintgroup {
+ return '
+
+
+
+';
+}
+
sub insert_numericalhint {
return '
@@ -707,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;
}
@@ -725,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') {
@@ -734,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;
}