'; }
+
sub movebuttons {
my ($target,$token) = @_;
my $result='".$description." "; }
+ my $result = <<"END";
+$description
+
+END
+ return $result;
+}
+
sub editfield {
my ($tag,$data,$description,$minwidth,$minheight)=@_;
@@ -317,13 +332,6 @@ sub modifiedfield {
# &Apache::lonxml::debug("I want homework_edit_$Apache::lonxml::curdepth");
# &Apache::lonxml::debug($ENV{"form.homework_edit_$Apache::lonxml::curdepth"});
$result=$ENV{"form.homework_edit_$Apache::lonxml::curdepth"};
- if (defined $token) {
- if (defined $token->[4]) {
- $result=$token->[4].$result;
- } else {
- $result=$result.$token->[2];
- }
- }
return $result;
}
@@ -392,7 +400,7 @@ sub select_arg {
}
$result.=$description.'
';
+ ';
return $result;
}
@@ -414,12 +422,38 @@ sub select_or_text_arg {
if ($found) {
$result.=$description.'
';
+ ';
} else {
$result.=&text_arg($description,$name,$token,$size);
}
return $result;
}
+
+#----------------------------------------------------- browse
+sub browse {
+ # insert a link to call up the filesystem browser (lonindexer)
+ $_ = shift;
+ my $form = 'lonhomework';
+ my $element = &Apache::lonnet::escape("$Apache::lonxml::curdepth.$_");
+ my $result = <<"ENDBUTTON";
+Browse
+ENDBUTTON
+ return $result;
+}
+
+#----------------------------------------------------- browse
+sub search {
+ # insert a link to call up the filesystem browser (lonindexer)
+ $_ = shift;
+ my $form = 'lonhomework';
+ my $element = &Apache::lonnet::escape("$Apache::lonxml::curdepth.$_");
+ my $result = <<"ENDBUTTON";
+Search
+ENDBUTTON
+ return $result;
+}
+
+
1;
__END__
@@ -473,6 +507,18 @@ end_table() : reduce color depth; end ta
=item *
+start_spanning_row() : start a new table row spanning the 'edit' environment.
+
+=item *
+
+start_row() : start a new table row and element.
+
+=item *
+
+end_row() : end current table element and row.
+
+=item *
+
movebuttons($target,$token) : move-up and move-down buttons; return scalar
string
@@ -507,6 +553,21 @@ from lonxml; return a scalar string
get_insert_list($token) : provide an insertion list based on possibilities
from lonxml; return a scalar string
+=item *
+browse($elementname) : provide a link which will open up the filesystem
+browser (lonindexer) and, once a file is selected, place the result in
+the form element $elementname.
+
+=item *
+search($elementname) : provide a link which will open up the filesystem
+searcher (lonsearchcat) and, once a file is selected, place the result in
+the form element $elementname.
+
+= item *
+textfield(tag,data,description,size): Provide a for
+single-line text entry. This is to be used for text enclosed by tags, not
+arguements/parameters associated with a tag.
+
=back
incomplete...