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

raeburn raeburn at source.lon-capa.org
Mon Mar 11 15:46:13 EDT 2013


raeburn		Mon Mar 11 19:46:13 2013 EDT

  Modified files:              
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - Course Editor breadcrumbs
    - hidden, encrypted, randompick, randomorder do not apply to supplemental
      content.
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.341 loncom/interface/lonhtmlcommon.pm:1.342
--- loncom/interface/lonhtmlcommon.pm:1.341	Tue Feb  5 16:22:27 2013
+++ loncom/interface/lonhtmlcommon.pm	Mon Mar 11 19:46:13 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.341 2013/02/05 16:22:27 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.342 2013/03/11 19:46:13 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1908,8 +1908,11 @@
 
 sub docs_breadcrumbs {
     my ($allowed,$crstype,$contenteditor,$title,$precleared)=@_;
-    my ($folderpath, at folders);
+    my ($folderpath, at folders,$supplementalflag);
     @folders = split('&',$env{'form.folderpath'});
+    if ($env{'form.folderpath'} =~ /^supplemental/) {
+        $supplementalflag = 1;
+    }
     my $plain='';
     my $container = 'sequence';
     my ($randompick,$isencrypted,$ishidden,$is_random_order) = (-1,0,0,0);
@@ -1930,16 +1933,18 @@
 # each of randompick number, hidden, encrypted, random order, is_page 
 # are appended with ":"s to the foldername
         $name=~s/\:(\d*)\:(\w*)\:(\w*):(\d*)\:?(\d*)$//;
-        if ($contenteditor) { 
-            if ($1 ne '') {
-                $randompick=$1;
-            } else {
-               $randompick=-1;
+        unless ($supplementalflag) {
+            if ($contenteditor) { 
+                if ($1 ne '') {
+                    $randompick=$1;
+                } else {
+                    $randompick=-1;
+                }
+                if ($2) { $ishidden=1; }
+                if ($3) { $isencrypted=1; }
+                if ($4 ne '') { $is_random_order = 1; }
+                if ($5 == 1) {$container = 'page'; }
             }
-            if ($2) { $ishidden=1; }
-            if ($3) { $isencrypted=1; }
-            if ($4 ne '') { $is_random_order = 1; }
-            if ($5 == 1) {$container = 'page'; }
         }
         if ($folder eq 'supplemental') {
             $name = &mt('Supplemental '.$crstype.' Contents');




More information about the LON-CAPA-cvs mailing list