--- loncom/homework/structuretags.pm 2007/11/20 17:53:22 1.414 +++ loncom/homework/structuretags.pm 2008/01/15 03:09:09 1.416 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.414 2007/11/20 17:53:22 albertel Exp $ +# $Id: structuretags.pm,v 1.416 2008/01/15 03:09:09 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -94,6 +94,7 @@ sub end_tex { sub homework_js { return &Apache::loncommon::resize_textarea_js(). + &setmode_javascript(). <<'JS'; JS } +sub setmode_javascript { + return <<"ENDSCRIPT"; + +ENDSCRIPT +} + sub page_start { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$name, $extra_head)=@_; @@ -307,14 +320,15 @@ sub problem_edit_header { '.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').'
- - - + + +
- - + +

'.&Apache::lonxml::message_location().' @@ -328,13 +342,14 @@ sub problem_edit_footer { @@ -461,8 +476,9 @@ $show_all if (!$numtoanalyze) { $numtoanalyze=20; } $result .= ''. &mt('[_1] for [_2] versions.', - '', - ' + '). &Apache::loncommon::help_open_topic("Analyze_Problem",'',undef,undef,300). ''; @@ -472,9 +488,11 @@ $show_all $result.='
'; - $result.=''; - $result .= ''; - $result .= ''; + $result.=''; + $result .= ''; + $result .= ''; $result.='
'.&Apache::lonxml::message_location().' @@ -754,7 +772,8 @@ sub start_problem { } if ($target ne 'analyze') { - $Apache::lonhomework::type=&Apache::lonnet::EXT('resource.0.type'); + my $type = &Apache::lonnet::EXT('resource.0.type'); + $Apache::lonhomework::type=$type; if (($env{'request.state'} eq 'construct') && $env{'form.problemtype'} =~ /\S/) { $Apache::lonhomework::type=$env{'form.problemtype'};