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

www lon-capa-cvs-allow@mail.lon-capa.org
Wed, 28 May 2008 14:21:32 -0000


www		Wed May 28 10:21:32 2008 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  Remember what we worked on in DOCS
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.306 loncom/interface/londocs.pm:1.307
--- loncom/interface/londocs.pm:1.306	Thu May 22 13:47:33 2008
+++ loncom/interface/londocs.pm	Wed May 28 10:21:30 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.306 2008/05/22 17:47:33 www Exp $
+# $Id: londocs.pm,v 1.307 2008/05/28 14:21:30 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2513,6 +2513,21 @@
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
 					    ['folderpath','pagepath',
 					     'pagesymb']);
+# No folderpath, no pagepath, see if we have something stored
+    if ((!$env{'form.folderpath'}) && (!$env{'form.pagepath'})) {
+        &Apache::loncommon::restore_course_settings('docs_folderpath',
+                                              {'folderpath' => 'scalar'});
+    }
+    if (!$env{'form.folderpath'}) {
+        &Apache::loncommon::restore_course_settings('docs_folderpath',
+                                              {'pagepath' => 'scalar'});
+    }
+    if ($env{'form.pagepath'}) {
+       $env{'form.folderpath'}='';
+    }
+    &Apache::loncommon::store_course_settings('docs_folderpath',
+                                                {'pagepath' => 'scalar',
+                                                 'folderpath' => 'scalar'});
     if ($env{'form.folderpath'}) {
 	my (@folderpath)=split('&',$env{'form.folderpath'});
 	$env{'form.foldername'}=&unescape(pop(@folderpath));