[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 24 Apr 2004 05:20:54 -0000


albertel		Sat Apr 24 01:20:54 2004 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - BUG 2943, import now wors in DOCS even on first entry into it.
  - no need to tokenwrapper URLs
  
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.117 loncom/interface/londocs.pm:1.118
--- loncom/interface/londocs.pm:1.117	Thu Apr  8 17:10:25 2004
+++ loncom/interface/londocs.pm	Sat Apr 24 01:20:54 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.117 2004/04/08 21:10:25 albertel Exp $
+# $Id: londocs.pm,v 1.118 2004/04/24 05:20:54 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -485,9 +485,7 @@
           $url='/adm/coursedocs?';
 	  $folderarg=$1;
           $isfolder=1;
-       } else {
-	  $url=&Apache::lonnet::tokenwrapper($url);
-       } 
+       }
     }
     $url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//;
     if ((!$isfolder) && ($residx) && ($folder!~/supplemental/)) {
@@ -1128,6 +1126,15 @@
 					 'vc' => 'Verify Content',
 					 'cv' => 'Check/Set Resource Versions',
 					  );
+
+       my $folderpath=$ENV{'form.folderpath'};
+       if (!$folderpath) {
+	   if ($ENV{'form.folder'} eq '' ||
+	       $ENV{'form.folder'} eq 'supplemental') {
+	       $folderpath='default&'.
+		   &Apache::lonnet::escape(&mt('Main Course Documents'));
+	   }
+       }
        $r->print(<<ENDCOURSEVERIFY);
 <form name="renameform" method="post" action="/adm/coursedocs">
 <input type="hidden" name="title" />
@@ -1136,7 +1143,7 @@
 </form>
 <form name="simpleedit" method="post" action="/adm/coursedocs">
 <input type=hidden name="importdetail" value="">
-<input type="hidden" name="folderpath" value="$ENV{'form.folderpath'}" />
+<input type="hidden" name="folderpath" value="$folderpath" />
 </form>
 <form action="/adm/coursedocs" method="post" name="courseverify">
 <table bgcolor="#AAAAAA" width="100%" cellspacing="4" cellpadding="4">
@@ -1301,7 +1308,7 @@
 </nobr>
 </form>
 <form action="/adm/imsimportdocs" method="post" name="ims">
-<input type="hidden" name="folder" value="$ENV{'form.folder'}" />
+<input type="hidden" name="folder" value="$folder" />
 <input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" />
 </nobr>
 </form>