[LON-CAPA-cvs] cvs: loncom /homework edit.pm

banghart lon-capa-cvs-allow@mail.lon-capa.org
Tue, 19 Jun 2007 19:41:54 -0000


banghart		Tue Jun 19 15:41:54 2007 EDT

  Modified files:              
    /loncom/homework	edit.pm 
  Log:
  	Bug 3796: Add $only to browse routine allowing restricte file
  		display.
  
  
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.106 loncom/homework/edit.pm:1.107
--- loncom/homework/edit.pm:1.106	Mon May 21 21:03:35 2007
+++ loncom/homework/edit.pm	Tue Jun 19 15:41:52 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.106 2007/05/22 01:03:35 albertel Exp $
+# $Id: edit.pm,v 1.107 2007/06/19 19:41:52 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -920,7 +920,7 @@
 #----------------------------------------------------- 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') {
@@ -931,7 +931,7 @@
     }
     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>