--- loncom/xml/londefdef.pm 2013/06/04 22:20:20 1.444 +++ loncom/xml/londefdef.pm 2013/09/14 02:04:47 1.445 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.444 2013/06/04 22:20:20 raeburn Exp $ +# $Id: londefdef.pm,v 1.445 2013/09/14 02:04:47 raeburn Exp $ # # # Copyright Michigan State University Board of Trustees @@ -3570,8 +3570,47 @@ sub start_iframe { my ($target,$token) = @_; my $currentstring = ''; 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 = '