--- loncom/homework/bridgetask.pm 2006/04/10 22:55:02 1.140 +++ loncom/homework/bridgetask.pm 2006/04/15 01:06:59 1.142 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: bridgetask.pm,v 1.140 2006/04/10 22:55:02 albertel Exp $ +# $Id: bridgetask.pm,v 1.142 2006/04/15 01:06:59 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -375,28 +375,28 @@ sub start_Task { } $Apache::lonhomework::parsing_a_task=1; - #should get back a or the neccesary stuff to start XML/MathML - my ($result,$head_tag_start,$body_tag_start,$form_tag_start)= - &Apache::structuretags::page_start($target,$token,$tagstack,$parstack,$parser,$safeeval); - - $head_tag_start .= &style($target); - $body_tag_start .= '
'."\n"; + my $name; if ($target eq 'web' || $target eq 'webgrade') { - $head_tag_start.=''. - &Apache::structuretags::get_resource_name($parstack,$safeeval). - ''; + $name = &Apache::structuretags::get_resource_name($parstack,$safeeval); } + my ($result,$form_tag_start)= + &Apache::structuretags::page_start($target,$token,$tagstack,$parstack, + $parser,$safeeval,$name,&style()); + + $result .= '
'."\n"; + + if ($target eq 'web' && $env{'request.state'} ne 'construct') { if ($Apache::lonhomework::modifygrades) { - $body_tag_start.='
'.&add_grading_button()."
"; + $result.=$uri.'">'.&add_grading_button().""; my $symb=&Apache::lonnet::symbread(); if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) { - $body_tag_start.='
'. + $result.=''. ''. ''. ''. + $result.=''. ''. ''. ''.$body_tag_start; if ($env{'request.state'} eq 'construct') { $result.=$form_tag_start; } @@ -497,9 +496,7 @@ DONESCREEN } } } elsif ($target eq 'web') { - $result.="$head_tag_start - $body_tag_start \n"; - + $result.=&preserve_grade_info(); $result.=&internal_location(); $result.=$form_tag_start. @@ -510,9 +507,7 @@ DONESCREEN $target eq 'webgrade') { my $webgrade='yes'; if ($target eq 'webgrade') { - $result.=$head_tag_start. - ''.$body_tag_start. - "\n".'
'."\n". + $result.= "\n".'
'."\n". ''; #$result.='
Review'.&show_queue('reviewqueue'); @@ -596,7 +591,7 @@ DONESCREEN $result.="\n".'
'; } } elsif ($target eq 'edit') { - $result.=$head_tag_start."".$body_tag_start.$form_tag_start. + $result.=$form_tag_start. &Apache::structuretags::problem_edit_header(); $Apache::lonxml::warnings_error_header= &mt("Editor Errors - these errors might not effect the running of the problem, but they will likely cause problems with further use of the Edit mode. Please use the EditXML mode to fix these errors.")."
"; @@ -844,7 +839,8 @@ DONEBUTTON } } if ($target eq 'web') { - $result.="\n
\n".&Apache::lonxml::xmlend().''; + $result.="\n
\n". + &Apache::loncommon::end_page({'discussion' => 1}); } } if ($target eq 'grade' && !$env{'form.webgrade'} && !$previous) {