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

raeburn raeburn at source.lon-capa.org
Wed Nov 9 18:14:47 EST 2016


raeburn		Wed Nov  9 23:14:47 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	lonhtmlcommon.pm 
  Log:
  - For 2.11
    - Backport 1.377, 1.378
  
  
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.358.2.9 loncom/interface/lonhtmlcommon.pm:1.358.2.10
--- loncom/interface/lonhtmlcommon.pm:1.358.2.9	Mon Oct 31 21:00:49 2016
+++ loncom/interface/lonhtmlcommon.pm	Wed Nov  9 23:14:47 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common html routines
 #
-# $Id: lonhtmlcommon.pm,v 1.358.2.9 2016/10/31 21:00:49 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.358.2.10 2016/11/09 23:14:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -407,7 +407,7 @@
 ##############################################
 ##############################################
 sub checkbox {
-    my ($name,$checked,$value) = @_;
+    my ($name,$checked,$value,$special) = @_;
     my $Str = '<input type="checkbox" name="'.$name.'" ';
     if (defined($value)) {
         $Str .= 'value="'.$value.'"';
@@ -415,7 +415,7 @@
     if ($checked) {
         $Str .= ' checked="checked"';
     }
-    $Str .= ' />';
+    $Str .= $special.' />';
     return $Str;
 }
 
@@ -1162,7 +1162,7 @@
 sub crumbs {
     my ($uri,$target,$prefix,$form,$skiplast,$onclick)=@_;
 # You cannot crumbnify uploaded or adm resources
-    if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Group Content)'); }
+    if ($uri=~/^\/*(uploaded|adm)\//) { return &mt('(Internal Course/Community Content)'); }
     if ($target) {
         $target = ' target="'.
                   &Apache::loncommon::escape_single($target).'"';
@@ -1182,6 +1182,12 @@
             } else {
                 $path.='/'; 
             }
+            if ($path eq '/res/') {
+                unless (&Apache::lonnet::allowed('bre',$path)) {
+                    $output.="$dir/";
+                    next;
+                }
+            }
             my $href_path = &HTML::Entities::encode($path,'<>&"');
             &Apache::loncommon::inhibit_menu_check(\$href_path);
             if ($form) {




More information about the LON-CAPA-cvs mailing list