version 1.64, 2017/05/10 19:25:28
|
version 1.66, 2017/12/18 23:23:14
|
Line 84 sub wrapper {
|
Line 84 sub wrapper {
|
|
|
my $startpage = &Apache::loncommon::start_page('Menu',undef,$args); |
my $startpage = &Apache::loncommon::start_page('Menu',undef,$args); |
my $endpage = &Apache::loncommon::end_page(); |
my $endpage = &Apache::loncommon::end_page(); |
|
|
|
if (($exttool) && (&Apache::lonnet::EXT('resource.0.gradable'))) { |
|
my $resource_due = &Apache::lonhomework::due_date(0, $env{'request.symb'}); |
|
if ($resource_due) { |
|
my $time_left = $resource_due - time(); |
|
if ($resource_due && ($time_left > 0)) { |
|
$startpage .=' |
|
<script type="text/javascript"> |
|
// <![CDATA['."\n". |
|
&Apache::lonhtmlcommon::countdown().' |
|
// ]]> |
|
</script>'."\n". |
|
&Apache::lonhtmlcommon::set_due_date($resource_due); |
|
} |
|
} |
|
} |
|
|
if (($env{'browser.mobile'}) || ($exttool eq 'window') || ($exttool eq 'tab')) { |
if (($env{'browser.mobile'}) || ($exttool eq 'window') || ($exttool eq 'tab')) { |
my $output = $startpage; |
my $output = $startpage; |
if ($is_pdf) { |
if ($is_pdf) { |
Line 142 ENDLINK
|
Line 158 ENDLINK
|
if ($explanation ne '') { |
if ($explanation ne '') { |
$output .= '<div>'.$explanation.'</div>'; |
$output .= '<div>'.$explanation.'</div>'; |
} |
} |
|
if (&Apache::lonnet::EXT('resource.0.gradable')) { |
|
$output .= &Apache::lonfeedback::list_discussion('tool','OPEN'); |
|
} |
} else { |
} else { |
my $dest = &HTML::Entities::encode($url.$anchor,'&<>"'); |
my $dest = &HTML::Entities::encode($url.$anchor,'&<>"'); |
$output .= '<div style="overflow:scroll; -webkit-overflow-scrolling:touch;">'."\n". |
$output .= '<div style="overflow:scroll; -webkit-overflow-scrolling:touch;">'."\n". |
Line 226 sub handler {
|
Line 245 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_ltitools($cdom); |
my %ltitools = &Apache::lonnet::get_domain_lti($cdom,'consumer'); |
if (ref($ltitools{$toolhash{'id'}}) eq 'HASH') { |
if (ref($ltitools{$toolhash{'id'}}) eq 'HASH') { |
$exttoolremote = $ltitools{$toolhash{'id'}}{'url'}; |
$exttoolremote = $ltitools{$toolhash{'id'}}{'url'}; |
} |
} |