Diff for /rat/lonpage.pm between versions 1.101 and 1.102

version 1.101, 2013/06/09 02:59:25 version 1.102, 2013/06/10 03:12:24
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 667  sub get_buttons { Line 667  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 .= '&nbsp;<a href="javascript:'.$jscall.';">'.$pic.'</a>';
               }
           }
       }
     return $metainfo;      return $metainfo;
 }  }
   

Removed from v.1.101  
changed lines
  Added in v.1.102


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