[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
raeburn
raeburn at source.lon-capa.org
Sun Feb 5 17:53:42 EST 2012
raeburn Sun Feb 5 22:53:42 2012 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
- Include dependencies for Camtasia files uploaded directly to a course
in httpref.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.436 loncom/xml/londefdef.pm:1.437
--- loncom/xml/londefdef.pm:1.436 Mon Nov 14 00:20:42 2011
+++ loncom/xml/londefdef.pm Sun Feb 5 22:53:42 2012
@@ -1,8 +1,7 @@
-
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.436 2011/11/14 00:20:42 raeburn Exp $
+# $Id: londefdef.pm,v 1.437 2012/02/05 22:53:42 raeburn Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -2972,22 +2971,47 @@
#-- <param> tag (end tag forbidden)
sub start_param {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- if (&Apache::lonxml::get_param('name',$parstack,
- $safeeval,undef,1)=~/^cabbase$/i) {
+ my $name = &Apache::lonxml::get_param('name',$parstack,$safeeval,
+ undef,1);
+ if ($name =~/^cabbase$/i) {
my $value=&Apache::lonxml::get_param('value',$parstack,
$safeeval,undef,1);
&Apache::lonxml::extlink($value);
- }
-
+ } elsif ($name eq 'flashvars') {
+ if (lc(&Apache::lonxml::get_param('type',$parstack,$safeeval,-2,1))
+ eq 'application/x-shockwave-flash') {
+ my $launcher =
+ &Apache::lonxml::get_param('data',$parstack,$safeeval,-2,1);
+ if ($launcher) {
+ &Apache::lonxml::extlink($launcher);
+ }
+ my $flashvars=&Apache::lonxml::get_param('value',$parstack,
+ $safeeval,undef,1);
+ if ($flashvars ne '') {
+ foreach my $item (split(/\&/,$flashvars)) {
+ my ($key,$value)=split(/=/,$item,2);
+ if ($key eq 'content') {
+ if ($value ne '') {
+ my ($dir) = ($launcher =~ m{(.+/)[^/]+$});
+ &Apache::lonxml::extlink($dir.$value);
+ }
+ } elsif ($key eq 'thumb') {
+ if ($value ne '') {
+ &Apache::lonxml::extlink($value);
+ }
+ }
+ }
+ }
+ }
+ }
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
- &Apache::lonxml::extlink($src);
+ if ($src ne '') {
+ &Apache::lonxml::extlink($src);
+ }
my $currentstring = '';
if ($target eq 'web' || $target eq 'webgrade') {
my %toconvert;
- my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
if ($src) { $toconvert{'src'}= $src; }
- my $name=&Apache::lonxml::get_param('name',$parstack,$safeeval,
- undef,1);
if ($name=~/^cabbase$/i) {
$toconvert{'value'}=&Apache::lonxml::get_param('value',$parstack,
$safeeval,undef,1);
More information about the LON-CAPA-cvs
mailing list