version 1.101, 2013/06/09 02:59:25
|
version 1.104, 2014/03/08 18:27:39
|
Line 36 use strict;
|
Line 36 use strict;
|
use Apache::Constants qw(:common :http); |
use Apache::Constants qw(:common :http); |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon(); |
use Apache::loncommon(); |
|
use Apache::lonhtmlcommon; |
use Apache::lonxml(); |
use Apache::lonxml(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonmenu; |
use Apache::lonmenu; |
Line 489 ENDEXT
|
Line 490 ENDEXT
|
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 =&get_buttons(\%hash,$rid).'<br />'; |
my $metainfo =&get_buttons(\%hash,$rid).'<br />'; |
unless (($target eq 'tex') || ($target eq 'tex_answer')) { |
unless (($target eq 'tex') || ($target eq 'tex_answer')) { |
$r->print('<td colspan="'.$avespan.'"'); |
$r->print('<td colspan="'.$avespan.'"'); |
Line 537 ENDEXT
|
Line 537 ENDEXT
|
$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)$/) { |
} elsif (&Apache::lonnet::declutter($hash{'src_'.$rid}) !~/\.(sequence|page)$/) { |
$r->print($metainfo.'<b>'.$hash{'title_'.$rid}.'</b><br />'. |
$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>'. |
unless ($cellemb{$rid} eq 'wrp') { |
&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 />'); |
$r->print(&mt('It is recommended that you use an up-to-date virus scanner before handling this file.')); |
|
} |
|
$r->print('</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') || ($target eq 'tex_answer')) { |
unless (($target eq 'tex') || ($target eq 'tex_answer')) { |
$r->print('</td>'); |
$r->print('</td>'); |
Line 564 ENDEXT
|
Line 570 ENDEXT
|
# ---------------------------------------------------------------- Submit, etc. |
# ---------------------------------------------------------------- Submit, etc. |
if ($nforms) { |
if ($nforms) { |
$r->print( |
$r->print( |
'<input name="all_submit" value="Submit All" type="'. |
'<input name="all_submit" value="'.&mt('Submit All').'" type="'. |
(($nforms>1)?'submit':'hidden').'"></input></form>'); |
(($nforms>1)?'submit':'hidden').'"></input></form>'); |
} |
} |
unless (($target eq 'tex') || ($target eq 'tex_answer')) { |
unless (($target eq 'tex') || ($target eq 'tex_answer')) { |
Line 667 sub get_buttons {
|
Line 673 sub get_buttons {
|
'</a>'; |
'</a>'; |
} |
} |
} |
} |
|
if (($env{'request.course.id'}) && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { |
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $file=&Apache::lonnet::declutter($hash->{'src_'.$rid}); |
|
my ($cfile,$home,$switchserver,$forceedit,$forceview) = |
|
&Apache::lonnet::can_edit_resource($file,$cnum,$cdom,$hash->{'src_'.$rid},$symb); |
|
if ($cfile ne '') { |
|
my $jscall = &Apache::lonhtmlcommon::jump_to_editres($cfile,$home,$switchserver, |
|
$forceedit,1,$symb,undef, |
|
&escape($env{'form.title'})); |
|
if ($jscall) { |
|
my $icon = 'pcstr.png'; |
|
my $label = &mt('Edit'); |
|
my $title = &mt('Edit this resource'); |
|
my $pic = '<img src="'.&Apache::loncommon::lonhttpdurl('/res/adm/pages/'.$icon).'"'. |
|
' class="LC_icon" alt="'.$label.'" title="'.$title.'" />'; |
|
$metainfo .= ' <a href="javascript:'.$jscall.';">'.$pic.'</a>'; |
|
} |
|
} |
|
} |
return $metainfo; |
return $metainfo; |
} |
} |
|
|