--- loncom/homework/structuretags.pm 2005/12/01 18:46:31 1.326 +++ loncom/homework/structuretags.pm 2006/01/09 20:47:52 1.330 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.326 2005/12/01 18:46:31 albertel Exp $ +# $Id: structuretags.pm,v 1.330 2006/01/09 20:47:52 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -113,6 +113,9 @@ sub page_start { &Apache::lonhtmlcommon::htmlareaheaders(). &Apache::lonhtmlcommon::spellheader(). &Apache::lonxml::fontsettings(); + if ($target eq 'edit') { + $head_tag_start.=&Apache::edit::js_change_detection(); + } } my $body_tag_start; if (!defined($found{'body'}) && $env{'request.state'} eq 'construct') { @@ -150,7 +153,11 @@ sub page_start { $form_tag_start='
'; + $form_tag_start.=$uri.'" '; + if ($target eq 'edit') { + $form_tag_start.=&Apache::edit::form_change_detection(); + } + $form_tag_start.='>'; } return ($result,$head_tag_start,$body_tag_start,$form_tag_start); } @@ -225,7 +232,7 @@ sub problem_edit_header { &Apache::structuretags::remember_problem_state().' - +
'. @@ -712,6 +719,7 @@ sub end_problem { if (!$Apache::lonxml::metamode) { $result = &Apache::lonxml::endredirection(); #started in &start_problem + $Apache::lonxml::post_evaluate=0; } if ($target eq 'tex') { @@ -1364,6 +1372,7 @@ sub end_part { my $result; if (!$Apache::lonxml::metamode) { $result = &Apache::lonxml::endredirection(); # started in &start_part + $Apache::lonxml::post_evaluate=0; } if ($target eq 'grade') { if (($status eq 'CAN_ANSWER' || $Apache::lonhomework::scantronmode) && @@ -1577,7 +1586,7 @@ sub start_simpleeditbutton { my $result=''; if (($env{'form.simple_edit_button'} ne 'off') && ($target eq 'web') && - (&Apache::lonnet::allowed('srm',$env{'request.course.id'}))) { + (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { my $url=$env{'request.noversionuri'}; $url=~s/\?.*$//; my ($symb) = &Apache::lonxml::whichuser();