Diff for /rat/lonpage.pm between versions 1.120.2.2 and 1.121

version 1.120.2.2, 2020/06/03 03:48:37 version 1.121, 2017/02/20 18:29:33
Line 322  ENDEXT Line 322  ENDEXT
                               }                                }
                           } elsif ($cellemb{$_} eq 'ssi') {                            } elsif ($cellemb{$_} eq 'ssi') {
 # --------------------------------------------------------- This is an SSI cell  # --------------------------------------------------------- This is an SSI cell
       my $prefix='p_'.$_.'_';        my $prefix=$_.'_';
                               my $idprefix='p_'.join('_',($mapid,$resid,''));                                my $idprefix= join('_',($mapid,$resid,''));
                               my %posthash=('request.prefix' => $prefix,                                my %posthash=('request.prefix' => $prefix,
     'LONCAPA_INTERNAL_no_discussion' => 'true',      'LONCAPA_INTERNAL_no_discussion' => 'true',
     'symb' => $symb);      'symb' => $symb);
Line 356  ENDEXT Line 356  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 445  ENDEXT Line 442  ENDEXT
       s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi;        s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi;
                                   $output=~                                    $output=~
                                       s/\<((?:input|select|button|textarea)[^\>]+)id\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 id="$idprefix$2" $3\>/gsi;                                        s/\<((?:input|select|button|textarea)[^\>]+)id\s*\=\s*[\'\"]*([^\'\"]+)[\'\"]*([^\>]*)\>/\<$1 id="$idprefix$2" $3\>/gsi;
                                   $output=~  
                                       s/(\Qthis.form.elements['\E)(HW(?:VAL|CHK)_[^']+\'\]\.(?:value=\'|checked))/$1$prefix$2/gsi;  
                                   if ($hastimer) {                                    if ($hastimer) {
                                       $output=~                                        $output=~
                                           s/\<(input[^\>]+name=\Q"$prefix\Eaccessbutton"[^\>]+)(?:\Qdocument.markaccess.submit();\E)([^\>]*)\>/\<$1pageTimer(this.form,'$prefix')$2\>/gsi;                                            s/\<(input[^\>]+name=\Q"$prefix\Eaccessbutton"[^\>]+)(?:\Qdocument.markaccess.submit();\E)([^\>]*)\>/\<$1pageTimer(this.form,'$prefix')$2\>/gsi;
Line 956  sub get_buttons { Line 951  sub get_buttons {
         my ($cfile,$home,$switchserver,$forceedit,$forceview) =          my ($cfile,$home,$switchserver,$forceedit,$forceview) =
             &Apache::lonnet::can_edit_resource($file,$cnum,$cdom,$hash->{'src_'.$rid},$symb);              &Apache::lonnet::can_edit_resource($file,$cnum,$cdom,$hash->{'src_'.$rid},$symb);
         if ($cfile ne '') {          if ($cfile ne '') {
               my $hostname = $r->hostname();
             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.2  
changed lines
  Added in v.1.121


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