Diff for /rat/lonpage.pm between versions 1.120.2.1 and 1.122

version 1.120.2.1, 2017/06/13 15:53:05 version 1.122, 2017/02/22 22:10:20
Line 185  sub handler { Line 185  sub handler {
       my $fn=$env{'request.course.fn'};        my $fn=$env{'request.course.fn'};
       if (-e "$fn.db") {        if (-e "$fn.db") {
           my %buttonshide;            my %buttonshide;
             my $hostname = $r->hostname();
           if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {            if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {
 # ------------------------------------------------------------------- Hash tied  # ------------------------------------------------------------------- Hash tied
               my $firstres=$hash{'map_start_'.$requrl};                my $firstres=$hash{'map_start_'.$requrl};
Line 356  ENDEXT Line 357  ENDEXT
       $posthash{'all_submit'}='yes';        $posthash{'all_submit'}='yes';
   }    }
       }        }
                               if ($env{'environment.remote'} eq 'on') {  
                                   $posthash{'inhibitmenu'} = 'yes';  
                               }  
                               my $output=Apache::lonnet::ssi($src,%posthash);                                my $output=Apache::lonnet::ssi($src,%posthash);
       $output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+?// END LON-CAPA Internal\s*(-->)?\s||gs;        $output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+?// END LON-CAPA Internal\s*(-->)?\s||gs;
                               if (($target eq 'tex') || ($target eq 'tex_answer')) {                                if (($target eq 'tex') || ($target eq 'tex_answer')) {
Line 749  ENDEXT Line 747  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,\%buttonshide).'<br />';        my $metainfo =&get_buttons(\%hash,$rid,\%buttonshide,$hostname).'<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 877  ENDEXT Line 875  ENDEXT
 }  }
   
 sub get_buttons {  sub get_buttons {
     my ($hash,$rid,$buttonshide) = @_;      my ($hash,$rid,$buttonshide,$hostname) = @_;
   
     my $metainfo = '';      my $metainfo = '';
     my $esrc=&Apache::lonnet::declutter($hash->{'src_'.$rid});      my $esrc=&Apache::lonnet::declutter($hash->{'src_'.$rid});
Line 956  sub get_buttons { Line 954  sub get_buttons {
         if ($cfile ne '') {          if ($cfile ne '') {
             my $jscall = &Apache::lonhtmlcommon::jump_to_editres($cfile,$home,$switchserver,              my $jscall = &Apache::lonhtmlcommon::jump_to_editres($cfile,$home,$switchserver,
                                                                  $forceedit,1,$symb,undef,                                                                   $forceedit,1,$symb,undef,
                                                                  &escape($env{'form.title'}));                                                                   &escape($env{'form.title'}),
                                                                    $hostname);
             if ($jscall) {              if ($jscall) {
                 my $icon = 'pcstr.png';                  my $icon = 'pcstr.png';
                 my $label = &mt('Edit');                  my $label = &mt('Edit');

Removed from v.1.120.2.1  
changed lines
  Added in v.1.122


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