--- loncom/xml/scripttag.pm 2010/05/23 12:29:25 1.153 +++ loncom/xml/scripttag.pm 2011/12/09 22:04:55 1.158 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # ".&mt('Script Vars')."
"; - &Apache::lonxml::add_script_result($script_var); + my $scriptblocklog=$start_page. + &Apache::loncommon::start_scrollbox('500px','480px','480px'). + '
'.&Apache::run::dump($target,$safeeval).'
'. + &Apache::loncommon::end_scrollbox(). + $end_page; + $scriptblocklog=~s/\'/\\'/gs; + &Apache::lonxml::add_script_result( + &Apache::loncommon::modal_adhoc_script($function_name,500,500,$scriptblocklog). + "".&mt('Script Vars')."
" + ); } } elsif ($target eq "edit" ) { #&Apache::run::run($bodytext,$safeeval); @@ -385,9 +384,17 @@ sub start_import { return ""; } my $importmode=&Apache::lonxml::get_param('importmode',$parstack,$safeeval); - if ($importmode eq 'problem') { - $file=~s/^\s*//s; - $file=~s/<\/problem>\s*$/<\/library>/s; + if (($importmode eq 'problem') || ($importmode eq 'part')) { +# We are using import to import published problems + 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 + $file=~s/^\s*//s; + $file=~s/<\/problem>\s*$/<\/part><\/library>/s; + } } my $dir=$location; $dir=~s:/[^/]*$::; @@ -406,14 +413,17 @@ sub start_import { $location=~s/\s*$//s; $result.=&Apache::edit::editline($location,$bodytext,'',40); $result.=&Apache::edit::browse(undef,'textnode'); - $result.= '