[LON-CAPA-cvs] cvs: rat(version_2_11_X) / lonwrapper.pm

raeburn raeburn at source.lon-capa.org
Wed Nov 30 12:40:39 EST 2016


raeburn		Wed Nov 30 17:40:39 2016 EDT

  Modified files:              (Branch: version_2_11_X)
    /rat	lonwrapper.pm 
  Log:
  - For 2.11
    - Backport 1.54, 1.55
  
  
Index: rat/lonwrapper.pm
diff -u rat/lonwrapper.pm:1.49.2.2 rat/lonwrapper.pm:1.49.2.3
--- rat/lonwrapper.pm:1.49.2.2	Mon Oct 31 21:31:42 2016
+++ rat/lonwrapper.pm	Wed Nov 30 17:40:39 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Wrapper for external and binary files as standalone resources
 #
-# $Id: lonwrapper.pm,v 1.49.2.2 2016/10/31 21:31:42 raeburn Exp $
+# $Id: lonwrapper.pm,v 1.49.2.3 2016/11/30 17:40:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,7 +56,7 @@
     if ($is_ext) {
         if ($env{'form.symb'}) {
             (undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'});
-            if ($res =~ /(\#.+)$/) {
+            if ($res =~ /(#[^#]+)$/) {
                 $anchor = $1;
             }
         } elsif ($env{'form.anchor'} ne '') {
@@ -105,11 +105,16 @@
         $output .= $endpage;
         return $output;
     } else {
+        my $offset = 5;
+        &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']);
+        if ($env{'form.inhibitmenu'} eq 'yes') {
+            $offset = 0;
+        }
         my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT);
         \$(document).ready( function() {
             \$(window).unbind('resize').resize(function(){
-                var header;
-                var offset = 5;
+                var header = null;
+                var offset = $offset;
                 var height = 0;
                 var hdrtop = 0;
                 if (\$('div.LC_head_subbox:first').length) {
@@ -120,7 +125,7 @@
                         header = \$('#LC_breadcrumbs');
                     }
                 }
-                if (header.length) {
+                if (header != null && header.length) {
                     height = header.height();
                     hdrtop = header.position().top;
                 }




More information about the LON-CAPA-cvs mailing list