--- loncom/xml/scripttag.pm 2010/05/26 02:04:20 1.154 +++ loncom/xml/scripttag.pm 2011/12/10 18:11:05 1.159 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # ".&mt('Script Vars')."
"; - &Apache::lonxml::add_script_result($script_var); + &Apache::lonxml::add_script_result( + &Apache::loncommon::modal_adhoc_window($function_name,500,500, + '
'.&Apache::run::dump($target,$safeeval).'
', + &mt('Script Vars'))."
"); } } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); @@ -387,23 +371,13 @@ sub start_import { my $importmode=&Apache::lonxml::get_param('importmode',$parstack,$safeeval); if (($importmode eq 'problem') || ($importmode eq 'part')) { # We are using import to import published problems -# This will require some on-the-fly rewriting - my $importid=&Apache::lonxml::get_param('id',$parstack,$safeeval); - if ($importid) { -# Rewrite all internal IDs of the problem to avoid duplicates - $file=~s/id\s*=\s*([\"\'])(\w+)([\"\'])/id=$1$2DynPart$importid$3/gs; - } if (($importmode eq 'problem') || ($file=~//s)) { # We explicitly don't want this to be a separate part or the problem already has parts $file=~s/^\s*//s; $file=~s/<\/problem>\s*$/<\/library>/s; } else { # We want this to be a separate part, but it currently is not - if ($importid) { - $file=~s/^\s*//s; - } else { - $file=~s/^\s*//s; - } + $file=~s/^\s*//s; $file=~s/<\/problem>\s*$/<\/part><\/library>/s; } } @@ -450,7 +424,7 @@ sub start_import { if ($id) { $result.='" id="'.$id; } - $result.='">'; + $result.='" importmode="'.$token->[2]{'importmode'}.'">'; $result.=$bodytext; $result.=''; } @@ -637,7 +611,7 @@ sub start_algebra { $inside = &Apache::run::evaluate($inside,$safeeval,$$parstack[-1]); if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { my $style=&Apache::lonxml::get_param('style',$parstack,$safeeval); - $result=&Apache::lontexconvert::algebra($inside,undef,$target,$style,$parstack,$safeeval); + $result=&Apache::lontexconvert::algebra($inside,$target,$style,$parstack,$safeeval); } $Apache::lonxml::post_evaluate=0; }