--- loncom/homework/edit.pm	2007/02/18 02:00:59	1.105
+++ loncom/homework/edit.pm	2007/06/19 19:41:52	1.107
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.105 2007/02/18 02:00:59 albertel Exp $
+# $Id: edit.pm,v 1.107 2007/06/19 19:41:52 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -324,6 +324,56 @@ sub insert_customresponse_answer {
 ';
 }
 
+sub insert_customhint {
+    return '
+        <customhint>
+            <answer type="loncapa/perl">
+            </answer>
+        </customhint>';
+}
+
+sub insert_customhint_answer {
+    return '
+            <answer type="loncapa/perl">
+            </answer>
+';
+}
+
+sub insert_mathresponse {
+    return '
+<mathresponse>
+    <answer>
+    </answer>
+    <textline />
+    <hintgroup>
+        <startouttext />
+        <endouttext />
+    </hintgroup>
+</mathresponse>';
+}
+
+sub insert_mathresponse_answer {
+    return '
+    <answer>
+    </answer>
+';
+}
+
+sub insert_mathhint {
+    return '
+        <mathhint>
+            <answer>
+            </answer>
+        </mathhint>';
+}
+
+sub insert_mathhint_answer {
+    return '
+            <answer>
+            </answer>
+';
+}
+
 sub insert_stringresponse {
     return '
 <stringresponse answer="" type="">
@@ -870,7 +920,7 @@ sub deletecoorddata {
 #----------------------------------------------------- browse
 sub browse {
     # insert a link to call up the filesystem browser (lonindexer)
-    my ($id, $mode, $titleid) = @_;
+    my ($id, $mode, $titleid, $only) = @_;
     my $form    = 'lonhomework';
     my $element;
     if (! defined($mode) || $mode eq 'attribute') {
@@ -881,7 +931,7 @@ sub browse {
     }
     my $titleelement;
     if ($titleid) {
-	$titleelement=",'','','".&escape("$titleid\_$Apache::lonxml::curdepth")."'";
+	$titleelement=",'$only','','".&escape("$titleid\_$Apache::lonxml::curdepth")."'";
     }
     my $result = <<"ENDBUTTON";
 <a href=\"javascript:openbrowser('$form','$element'$titleelement)\"\>Select</a>