version 1.52, 2016/10/31 12:59:11
|
version 1.58, 2017/03/08 02:51:18
|
Line 54 sub wrapper {
|
Line 54 sub wrapper {
|
); |
); |
|
|
my $anchor; |
my $anchor; |
if (($is_ext) && ($env{'form.symb'})) { |
if ($is_ext) { |
(undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); |
if ($env{'form.symb'}) { |
if ($res =~ /(#[^#]+)$/) { |
(undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); |
$anchor = $1; |
if ($res =~ /(#[^#]+)$/) { |
|
$anchor = $1; |
|
} |
|
} elsif ($env{'form.anchor'} ne '') { |
|
$anchor = '#'.$env{'form.anchor'}; |
} |
} |
} |
} |
|
|
Line 70 sub wrapper {
|
Line 74 sub wrapper {
|
$args->{'bread_crumbs'} = $brcrum; |
$args->{'bread_crumbs'} = $brcrum; |
} |
} |
if ($absolute) { |
if ($absolute) { |
$args->{'use_absolute'} = $absolute; |
$args->{'use_absolute'} = $absolute; |
|
} |
|
if ($env{'form.only_body'}) { |
|
$args->{'only_body'} = $env{'form.only_body'}; |
} |
} |
|
|
my $startpage = &Apache::loncommon::start_page('Menu',undef,$args); |
my $startpage = &Apache::loncommon::start_page('Menu',undef,$args); |
Line 107 sub wrapper {
|
Line 114 sub wrapper {
|
$output .= $endpage; |
$output .= $endpage; |
return $output; |
return $output; |
} else { |
} 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); |
my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT); |
\$(document).ready( function() { |
\$(document).ready( function() { |
\$(window).unbind('resize').resize(function(){ |
\$(window).unbind('resize').resize(function(){ |
var header; |
var header = null; |
var offset = 5; |
var offset = $offset; |
var height = 0; |
var height = 0; |
var hdrtop = 0; |
var hdrtop = 0; |
if (\$('div.LC_head_subbox:first').length) { |
if (\$('div.LC_head_subbox:first').length) { |
Line 122 sub wrapper {
|
Line 134 sub wrapper {
|
header = \$('#LC_breadcrumbs'); |
header = \$('#LC_breadcrumbs'); |
} |
} |
} |
} |
if (header.length) { |
if (header != null && header.length) { |
height = header.height(); |
height = header.height(); |
hdrtop = header.position().top; |
hdrtop = header.position().top; |
} |
} |
Line 152 sub handler {
|
Line 164 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
|
|
my $url = $r->uri; |
my $url = $r->uri; |
my ($is_ext,$brcrum,$absolute,$is_pdf,$exttool,$cdom,$cnum); |
my ($is_ext,$brcrum,$absolute,$is_pdf,$exttool,$cdom,$cnum,$hostname); |
|
|
for ($url){ |
for ($url){ |
s|^/adm/wrapper||; |
s|^/adm/wrapper||; |
Line 176 sub handler {
|
Line 188 sub handler {
|
} |
} |
if (($is_ext) || ($exttool)) { |
if (($is_ext) || ($exttool)) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['forceedit','register','folderpath','symb','idx','title']); |
['forceedit','register','folderpath','symb','idx','title','anchor']); |
if (($env{'form.forceedit'}) && |
if (($env{'form.forceedit'}) && |
(&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) && |
(&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) && |
(($env{'form.folderpath'} =~ /^supplemental/) || |
(($env{'form.folderpath'} =~ /^supplemental/) || |
($env{'form.symb'} =~ /^uploaded/))) { |
($env{'form.symb'} =~ /^uploaded/))) { |
(undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); |
if ($env{'form.symb'}) { |
if ($res =~ /(#[^#]+)$/) { |
(undef,undef,my $res) = &Apache::lonnet::decode_symb($env{'form.symb'}); |
$url .= $1; |
if ($res =~ /(#[^#]+)$/) { |
|
$url .= $1; |
|
} |
|
} elsif ($env{'form.folderpath'} =~ /^supplemental/) { |
|
if ($env{'form.anchor'} ne '') { |
|
$url .= '#'.$env{'form.anchor'}; |
|
} |
} |
} |
my $type = 'ext'; |
my $type = 'ext'; |
my %ltitools; |
|
if ($exttool) { |
if ($exttool) { |
$type = 'tool'; |
$type = 'tool'; |
%ltitools = &Apache::lonnet::get_domain_ltitools($cdom); |
} elsif (($url =~ /^http:/) && ($ENV{'SERVER_PORT'} == 443)) { |
|
$hostname = $r->hostname(); |
} |
} |
$r->print( |
$r->print( |
&Apache::lonextresedit::display_editor($url,$env{'form.folderpath'}, |
&Apache::lonextresedit::display_editor($url,$env{'form.folderpath'}, |
$env{'form.symb'}, |
$env{'form.symb'}, |
$env{'form.idx'},$type,$cdom, |
$env{'form.idx'},$type,$cdom, |
$cnum,\%ltitools)); |
$cnum,$hostname)); |
return OK; |
return OK; |
} elsif ($env{'form.folderpath'} =~ /^supplemental/) { |
} elsif ($env{'form.folderpath'} =~ /^supplemental/) { |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |