version 1.80, 2022/10/27 21:35:30
|
version 1.83, 2023/09/27 14:52:28
|
Line 95 sub wrapper {
|
Line 95 sub wrapper {
|
} |
} |
if ($env{'form.only_body'}) { |
if ($env{'form.only_body'}) { |
$args->{'only_body'} = $env{'form.only_body'}; |
$args->{'only_body'} = $env{'form.only_body'}; |
|
} elsif (($is_supp) && ($env{'form.folderpath'} ne '')) { |
|
$args->{'bread_crumbs_nomenu'} = 1; |
} |
} |
|
|
my ($countdown,$donemsg,$headjs); |
my ($countdown,$donemsg,$headjs); |
Line 302 ENDLINK
|
Line 304 ENDLINK
|
} else { |
} else { |
my $offset = 5; |
my $offset = 5; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
if ($env{'form.inhibitmenu'} eq 'yes') { |
if (($env{'form.inhibitmenu'} eq 'yes') || ($env{'form.only_body'})) { |
$offset = 0; |
$offset = 0; |
} |
} |
my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT); |
my $script = &Apache::lonhtmlcommon::scripttag(<<SCRIPT); |
Line 425 sub handler {
|
Line 427 sub handler {
|
my %toolhash = &Apache::lonnet::get('exttool_'.$marker,['target','linktext','explanation','id','width','height'], |
my %toolhash = &Apache::lonnet::get('exttool_'.$marker,['target','linktext','explanation','id','width','height'], |
$cdom,$cnum); |
$cdom,$cnum); |
if ($toolhash{'id'}) { |
if ($toolhash{'id'}) { |
my %ltitools = &Apache::lonnet::get_domain_lti($cdom,'consumer'); |
my ($idx,%ltitools); |
if (ref($ltitools{$toolhash{'id'}}) eq 'HASH') { |
if ($toolhash{'id'} =~ /^c(\d+)$/) { |
$exttoolremote = $ltitools{$toolhash{'id'}}{'url'}; |
$idx = $1; |
|
%ltitools = &Apache::lonnet::get_course_lti($cnum,$cdom,'consumer'); |
|
} else { |
|
$idx = $toolhash{'id'}; |
|
%ltitools = &Apache::lonnet::get_domain_lti($cdom,'consumer'); |
|
} |
|
if (ref($ltitools{$idx}) eq 'HASH') { |
|
$exttoolremote = $ltitools{$idx}{'url'}; |
} |
} |
} |
} |
if ($toolhash{'target'} eq 'window') { |
if ($toolhash{'target'} eq 'window') { |
Line 446 sub handler {
|
Line 455 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','anchor']); |
['forceedit','register','folderpath','symb','idx','title','anchor','only_body']); |
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/) || |
Line 484 sub handler {
|
Line 493 sub handler {
|
$title = &mt('External Tool'); |
$title = &mt('External Tool'); |
} |
} |
} |
} |
|
$title = &HTML::Entities::encode($title,'\'"<>&'); |
$is_supp = 1; |
$is_supp = 1; |
if ($env{'request.course.id'}) { |
if ($env{'request.course.id'}) { |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
&Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); |
&Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); |
} |
} |
$brcrum = |
unless ($env{'form.only_body'}) { |
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
$brcrum = |
|
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
|
} |
} |
} |
} elsif ($env{'request.course.id'}) { |
} elsif ($env{'request.course.id'}) { |
my $courseurl = &Apache::lonnet::courseid_to_courseurl($env{'request.course.id'}); |
my $courseurl = &Apache::lonnet::courseid_to_courseurl($env{'request.course.id'}); |
Line 499 sub handler {
|
Line 511 sub handler {
|
if ($url =~ m{^\Q/uploaded/$courseurl/supplemental/\E}) { |
if ($url =~ m{^\Q/uploaded/$courseurl/supplemental/\E}) { |
$is_supp = 1; |
$is_supp = 1; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folderpath','title']); |
['folderpath','title','only_body']); |
if ($env{'form.folderpath'}) { |
if ($env{'form.folderpath'}) { |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
$cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
&Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); |
&Apache::loncommon::validate_folderpath(1,'',$cnum,$cdom); |
} |
} |
my $title = $env{'form.title'}; |
my $title = $env{'form.title'}; |
|
$title = &HTML::Entities::encode($title,'\'"<>&'); |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
$brcrum = |
unless ($env{'form.only_body'}) { |
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
$brcrum = |
|
&Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1); |
|
} |
} |
} |
} |
} |
|
|