Diff for /rat/lonpage.pm between versions 1.98 and 1.99

version 1.98, 2012/11/30 18:16:53 version 1.99, 2012/11/30 20:48:20
Line 227  sub handler { Line 227  sub handler {
                   my %ssialink=();                    my %ssialink=();
             
                   my %cellemb=();                    my %cellemb=();
                     my %cellexternal=();
   
                   my $allscript='';                    my $allscript='';
                   my $allmeta='';                    my $allmeta='';
Line 244  sub handler { Line 245  sub handler {
                       $lcm*=($#colcont+1)/euclid($lcm,($#colcont+1));                        $lcm*=($#colcont+1)/euclid($lcm,($#colcont+1));
                       foreach (@colcont) {                        foreach (@colcont) {
                           my $src=$hash{'src_'.$_};                            my $src=$hash{'src_'.$_};
   my ($extension)=($src=~/\.(\w+)$/);                            my ($extension)=($src=~/\.(\w+)$/);
     $cellexternal{$_}=($hash{'ext_'.$_} eq 'true:');
   if ($hash{'encrypted_'.$_}) {    if ($hash{'encrypted_'.$_}) {
       $src=&Apache::lonenc::encrypted($src);        $src=&Apache::lonenc::encrypted($src);
   }    }
                           $cellemb{$_}=                            $cellemb{$_}=
       &Apache::loncommon::fileembstyle($extension);        &Apache::loncommon::fileembstyle($extension);
                           if ($cellemb{$_} eq 'ssi') {                            if ($cellexternal{$_}) {
                                 unless (($target eq 'tex') || ($target eq 'tex_answer')) {
                                     $ssibody{$_} = <<ENDEXT;
   <iframe src="$src" width="100%">No iframe support!</iframe>
   ENDEXT
                                 }
                             } elsif ($cellemb{$_} eq 'ssi') {
 # --------------------------------------------------------- This is an SSI cell  # --------------------------------------------------------- This is an SSI cell
       my ($mapid,$resid)=split(/\./,$_);        my ($mapid,$resid)=split(/\./,$_);
       my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$src);        my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$src);
Line 477  sub handler { Line 485  sub handler {
     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.'"');
     }      }
                               if ($cellemb{$rid} eq 'ssi') {                                if (($cellemb{$rid} eq 'ssi') || ($cellexternal{$rid})) {
   unless (($target eq 'tex') || ($target eq 'tex_answer')) {    unless (($target eq 'tex') || ($target eq 'tex_answer')) {
       if ($ssibgcolor{$rid}) {        if ($ssibgcolor{$rid}) {
   $r->print(' bgcolor="'.    $r->print(' bgcolor="'.
Line 499  sub handler { Line 507  sub handler {
       }                     }             
       $r->print('>');        $r->print('>');
   }    }
                                   $r->print($ssibody{$rid});                                    unless (($cellexternal{$rid}) && 
                                             ($target eq 'tex') && ($target eq 'tex_answer')) {
                                         $r->print($ssibody{$rid});
                                     }
   unless (($target eq 'tex') || ($target eq 'tex_answer')) {    unless (($target eq 'tex') || ($target eq 'tex_answer')) {
       $r->print('</font>');        $r->print('</font>');
                                   }                                    }
Line 595  sub get_buttons { Line 606  sub get_buttons {
  $esrc=&Apache::lonenc::encrypted($esrc);   $esrc=&Apache::lonenc::encrypted($esrc);
     }      }
     if ($hash->{'src_'.$rid} !~ m-^/uploaded/-      if ($hash->{'src_'.$rid} !~ m-^/uploaded/-
           && $hash->{'src_'.$rid} !~ m{^https?://}
  && !$env{'request.enc'}   && !$env{'request.enc'}
  && ($env{'request.role.adv'}   && ($env{'request.role.adv'}
     || !$hash->{'encrypted_'.$rid})) {       || !$hash->{'encrypted_'.$rid})) { 
Line 603  sub get_buttons { Line 615  sub get_buttons {
     '<img src="/adm/lonMisc/cat_button.png" class="LC_icon" />'.      '<img src="/adm/lonMisc/cat_button.png" class="LC_icon" />'.
     '</a>';      '</a>';
     }      }
     if ($hash->{'src_'.$rid} !~ m{^/uploaded/}) {      if (($hash->{'src_'.$rid} !~ m{^/uploaded/}) &&
           ($hash->{'src_'.$rid} !~ m{^https?://})) {
         $metainfo .= '<a href="/adm/evaluate?postdata='.          $metainfo .= '<a href="/adm/evaluate?postdata='.
     &escape($esrc).      &escape($esrc).
     '" target="LONcatInfo">'.      '" target="LONcatInfo">'.

Removed from v.1.98  
changed lines
  Added in v.1.99


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>