Diff for /loncom/xml/londefdef.pm between versions 1.442 and 1.445

version 1.442, 2013/01/04 05:30:52 version 1.445, 2013/09/14 02:04:47
Line 572  sub start_body { Line 572  sub start_body {
     if ($env{'request.state'} eq 'construct') {      if ($env{'request.state'} eq 'construct') {
         my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});          my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});
         &Apache::lonhtmlcommon::add_breadcrumb({          &Apache::lonhtmlcommon::add_breadcrumb({
             'text'  => 'Construction Space',              'text'  => 'Authoring Space',
             'href'  => &Apache::loncommon::authorspace($url),              'href'  => &Apache::loncommon::authorspace($url),
         });          });
         &Apache::lonhtmlcommon::add_breadcrumb({          &Apache::lonhtmlcommon::add_breadcrumb({
Line 633  sub edit_controls { Line 633  sub edit_controls {
     if (($env{'request.course.id'}) && ($env{'form.forceedit'})) {      if (($env{'request.course.id'}) && ($env{'form.forceedit'})) {
         my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});          my $url=&Apache::lonnet::hreflocation('',$env{'request.filename'});
         if ($url =~ /\.html?$/i) {          if ($url =~ /\.html?$/i) {
               my ($cdom,$cnum);
             if ($env{'request.course.id'}) {              if ($env{'request.course.id'}) {
                   $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
                   $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
                 if ($env{'request.filename'} =~ m{/userfiles/supplemental/default|\d+/}) {                  if ($env{'request.filename'} =~ m{/userfiles/supplemental/default|\d+/}) {
                     if (&Apache::lonnet::is_course_upload($env{'request.filename'},                      if (&Apache::lonnet::is_course_upload($env{'request.filename'},
                         $env{'course.'.$env{'request.course.id'}.'.num'},                                                            $cnum,$cdom)) {
                         $env{'course.'.$env{'request.course.id'}.'.domain'})) {  
                         &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},                          &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
                                                                 ['folderpath','title']);                                                                  ['folderpath','title']);
                     }                      }
                 }                  }
             }              }
             my ($symb,$itemtitle,$displayfile) =               my ($symb,$itemtitle,$displayfile,$caller);
                 &Apache::lonxml::get_courseupload_hierarchy($url,              if ($url =~ m{^/uploaded/$cdom/$cnum/portfolio/syllabus/}) {
                                                             $env{'form.folderpath'},                  $itemtitle = &mt('Syllabus');
                                                             $env{'form.title'});                  $caller = "/public/$cdom/$cnum/syllabus";
             if (($symb ne '') || ($env{'httpref.'.$url} ne '')) {              } else {
                   $caller = $url;
                   ($symb,$itemtitle,$displayfile) =
                       &Apache::lonxml::get_courseupload_hierarchy($url,
                                                                   $env{'form.folderpath'},
                                                                   $env{'form.title'});
               }
               if (($symb ne '') || ($env{'httpref.'.$url} ne '') ||
                   ($url =~ m{^/uploaded/$cdom/$cnum/portfolio/syllabus/})) {
                   $result .= (' ' x 3).                    $result .= (' ' x 3).
                              &Apache::lonhtmlcommon::dependencies_button()."\n".                               &Apache::lonhtmlcommon::dependencies_button()."\n".
                              &Apache::lonhtmlcommon::dependencycheck_js($symb,                               &Apache::lonhtmlcommon::dependencycheck_js($symb,
                                  $itemtitle,$url,$env{'form.folderpath'},$url)."\n";                                   $itemtitle,$url,$env{'form.folderpath'},$caller)."\n";
             }              }
         }          }
     }      }
Line 3560  sub start_iframe { Line 3570  sub start_iframe {
     my ($target,$token) = @_;      my ($target,$token) = @_;
     my $currentstring = '';      my $currentstring = '';
     if ($target eq 'web' || $target eq 'webgrade') {      if ($target eq 'web' || $target eq 'webgrade') {
  $currentstring = $token->[4];               my ($src,$url,$query);
     }           if ($token->[2]->{'src'}) {
               $src = $token->[2]->{'src'};
           } elsif ($token->[2]->{'SRC'}) {
               $src = $token->[2]->{'SRC'};
           }
           if ($src) {
               ($url,$query) = ($src =~ /^([^?]+)\??([^?]*)$/);
               if ($query =~ /inhibitmenu=yes/) {
                   $currentstring = $token->[4];
               } else {
                   my $inhibit;
                   if ($url =~ m{^[^/.].*\.x?html?$}) {
                       $inhibit = 1;
                   } elsif ($url =~ m{^/(uploaded|res)/.*\.x?html?$}) {
                       $inhibit = 1;
                   }
                   if ($inhibit) {
                       $currentstring = '<iframe ';
                       foreach my $attrib (@{$token->[3]}) {
                           if (lc($attrib) eq 'src') {
                               if ($query) {
                                   $query.='&amp;inhibitmenu=yes';
                               } else {
                                   $query = 'inhibitmenu=yes';
                               } 
                               $currentstring .= 'src="'.$url.'?'.$query.'" ';
                           } else {
                               $currentstring .= lc($attrib).'="'.$token->[2]->{$attrib}.'" ';
                           }
                       }
                       $currentstring =~ s/\s+$//;
                       $currentstring .= '>';
                   } else {
                       $currentstring = $token->[4];
                   }
               }
           } else {
               $currentstring = $token->[4];
           }
       }
     return $currentstring;      return $currentstring;
 }  }
   

Removed from v.1.442  
changed lines
  Added in v.1.445


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