version 1.58, 2004/08/29 18:45:52
|
version 1.60, 2004/09/14 01:21:49
|
Line 351 sub handler {
|
Line 351 sub handler {
|
unless ($contents) { |
unless ($contents) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
$r->print('<html><body>'.&mt('Empty page').'.</body></html>'); |
$r->print('<html>'."\n". |
|
'<head>'."\n". |
|
&Apache::lonmenu::registerurl(1,undef)."\n". |
|
'</head>'."\n". |
|
'<body bgcolor="#FFFFFF" onLoad="' |
|
.&Apache::lonmenu::loadevents. |
|
'" onUnload="'.&Apache::lonmenu::unloadevents.'">'. |
|
&Apache::lonmenu::menubuttons(undef,$target,1) |
|
); |
|
$r->print(&mt('This page is either empty or it only contains resources that are currently hidden').'. '); |
|
$r->print('<br /><br />'.&mt('Please use the LON-CAPA navigation arrows to move to another item in the course').'.</body></html>'); |
} else { |
} else { |
# ------------------------------------------------------------------ Build page |
# ------------------------------------------------------------------ Build page |
|
|
Line 414 sub handler {
|
Line 424 sub handler {
|
my $avespan=$lcm/($#colcont+1); |
my $avespan=$lcm/($#colcont+1); |
for ($j=0;$j<=$#colcont;$j++) { |
for ($j=0;$j<=$#colcont;$j++) { |
my $rid=$colcont[$j]; |
my $rid=$colcont[$j]; |
my $metainfo='<a name="'. |
my $metainfo = ''; |
&Apache::lonnet::escape(&Apache::lonnet::declutter($hash{'src_'.$rid})).'" />'. |
print STDERR "src is $hash{'src_'.$rid}\n"; |
'<a href="'. |
unless ($hash{'src_'.$rid} =~ m-^/uploaded/-) { |
$metalink{$rid}.'" target="LONcatInfo">'. |
$metainfo ='<a name="'. |
'<img src="/adm/lonMisc/cat_button.gif" border=0>'. |
&Apache::lonnet::escape(&Apache::lonnet::declutter($hash{'src_'.$rid})).'" />'. |
'</img></a><a href="/adm/evaluate?postdata='. |
'<a href="'.$metalink{$rid}.'" target="LONcatInfo">'. |
&Apache::lonnet::escape(&Apache::lonnet::declutter($hash{'src_'.$rid})) |
'<img src="/adm/lonMisc/cat_button.gif" border=0>'. |
.'" target="LONcatInfo">'. |
'</img></a>'; |
'<img src="/adm/lonMisc/eval_button.gif" border=0>'. |
} |
'</img></a>'; |
$metainfo .= '<a href="/adm/evaluate?postdata='. |
|
&Apache::lonnet::escape(&Apache::lonnet::declutter($hash{'src_'.$rid})). |
|
'" target="LONcatInfo">'. |
|
'<img src="/adm/lonMisc/eval_button.gif" border=0>'. |
|
'</img></a>'; |
if ( |
if ( |
($hash{'src_'.$rid}=~/\.(problem|exam|quiz|assess|survey|form)$/) && |
($hash{'src_'.$rid}=~/\.(problem|exam|quiz|assess|survey|form)$/) && |
(&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'}))) { |
(&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'})) && |
|
($hash{'src_'.$rid} !~ m-^/uploaded/-)) { |
my ($mapid,$resid)=split(/\./,$rid); |
my ($mapid,$resid)=split(/\./,$rid); |
my $symb= |
my $symb= |
&Apache::lonnet::declutter($hash{'map_id_'.$mapid}). |
&Apache::lonnet::declutter($hash{'map_id_'.$mapid}). |
Line 494 sub handler {
|
Line 509 sub handler {
|
} elsif ($cellemb{$rid} eq 'emb') { |
} elsif ($cellemb{$rid} eq 'emb') { |
$r->print('>'.$metainfo.'<embed src="'. |
$r->print('>'.$metainfo.'<embed src="'. |
$hash{'src_'.$rid}.'"></embed>'); |
$hash{'src_'.$rid}.'"></embed>'); |
|
} elsif (&Apache::lonnet::declutter($hash{'src_'.$rid}) !~/\.(sequence|page)$/) { |
|
$r->print($metainfo.'<b>'.$hash{'title_'.$rid}.'</b><br />'. |
|
&mt('It is recommended that you use an up-to-date virus scanner before handling this file.').'</p><p><table>'. |
|
&Apache::londocs::entryline(0,&mt("Click to download or use your browser's Save Link function"),'/'.&Apache::lonnet::declutter($hash{'src_'.$rid})).'</table></p><br />'); |
} |
} |
unless ($target eq 'tex') { |
unless ($target eq 'tex') { |
$r->print('</td>'); |
$r->print('</td>'); |