--- loncom/homework/edit.pm 2003/09/10 21:59:44 1.64
+++ loncom/homework/edit.pm 2003/10/24 21:45:32 1.69
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# edit mode helpers
#
-# $Id: edit.pm,v 1.64 2003/09/10 21:59:44 albertel Exp $
+# $Id: edit.pm,v 1.69 2003/10/24 21:45:32 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -67,7 +67,7 @@ sub tag_start {
#
\n";
- my @help;# = Apache::lonxml::helpinfo($token);
+ my @help = Apache::lonxml::helpinfo($token);
if ($help[0]) {
$result .= ' | ' .
Apache::loncommon::help_open_topic(@help) .
@@ -273,6 +273,11 @@ sub handle_insertafter {
return $result;
}
+sub insert_img {
+ return '
+ ';
+}
+
sub insert_responseparam {
return '
';
@@ -283,6 +288,8 @@ sub insert_formularesponse {
+
+
';
}
@@ -292,6 +299,8 @@ sub insert_numericalresponse {
+
+
';
}
@@ -301,6 +310,8 @@ sub insert_stringresponse {
+
+
';
}
@@ -318,6 +329,8 @@ sub insert_imageresponse {
+
+
';
}
@@ -328,6 +341,8 @@ sub insert_optionresponse {
+
+
';
}
@@ -338,6 +353,8 @@ sub insert_radiobuttonresponse {
+
+
';
}
@@ -348,6 +365,8 @@ sub insert_rankresponse {
+
+
';
}
@@ -360,6 +379,8 @@ sub insert_matchresponse {
+
+
';
}
@@ -374,6 +395,14 @@ sub insert_hintpart {
';
}
+sub insert_hintgroup {
+ return '
+
+
+
+';
+}
+
sub insert_numericalhint {
return '
@@ -568,7 +597,6 @@ sub select_arg {
my $result;
my $optionlist="";
my $selected=$token->[2]{$name};
- &Apache::lonxml::error("Wha $selected");
foreach my $option (@$list) {
my ($text,$value);
if ( ref($option) eq 'ARRAY') {
@@ -708,17 +736,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;
}
@@ -726,7 +758,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') {
@@ -735,8 +767,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;
}
|