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

raeburn raeburn@source.lon-capa.org
Sat, 31 Oct 2009 19:58:48 -0000


raeburn		Sat Oct 31 19:58:48 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - After a switch role to "Student" by a CC folderpath from &loncommon::restore_course_settings() ignored if it's not in Supplemental DOCS.  
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.408 loncom/interface/londocs.pm:1.409
--- loncom/interface/londocs.pm:1.408	Sat Oct 31 19:54:51 2009
+++ loncom/interface/londocs.pm	Sat Oct 31 19:58:48 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.408 2009/10/31 19:54:51 raeburn Exp $
+# $Id: londocs.pm,v 1.409 2009/10/31 19:58:48 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2682,7 +2682,12 @@
         &Apache::loncommon::restore_course_settings('docs_folderpath',
                                               {'folderpath' => 'scalar'});
     }
-    if (!$env{'form.folderpath'}) {
+    if (!$allowed) {
+        unless($env{'form.folderpath'} =~ /^supplemental/) {
+            $env{'form.folderpath'} = '';
+        }
+    }
+    if (!$env{'form.folderpath'} && $allowed) {
         &Apache::loncommon::restore_course_settings('docs_folderpath',
                                               {'pagepath' => 'scalar'});
     }