--- loncom/homework/structuretags.pm 2011/06/06 21:01:06 1.489 +++ loncom/homework/structuretags.pm 2011/07/04 13:01:57 1.490 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.489 2011/06/06 21:01:06 www Exp $ +# $Id: structuretags.pm,v 1.490 2011/07/04 13:01:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1183,6 +1183,9 @@ sub start_problem { } } } + if ($env{'form.grade_imsexport'}) { + $result = ''; + } } elsif ($target eq 'tex') { $result .= 'INSERTTEXFRONTMATTERHERE'; @@ -1321,7 +1324,8 @@ sub end_problem { } } elsif ( ($target eq 'web' || $target eq 'tex') && $Apache::inputtags::part eq '0' && - $status ne 'UNCHECKEDOUT' && $status ne 'NOT_YET_VIEWED') { + $status ne 'UNCHECKEDOUT' && $status ne 'NOT_YET_VIEWED' + && !$env{'form.grade_imsexport'}) { # if part is zero, no s existed, so we need show the current # grading status my $gradestatus = &Apache::inputtags::gradestatus($Apache::inputtags::part,$target); @@ -1331,8 +1335,9 @@ sub end_problem { (($target eq 'web') && ($env{'request.state'} ne 'construct')) || ($target eq 'answer') || ($target eq 'tex') ) { - if ($target ne 'tex' && - $env{'form.answer_output_mode'} ne 'tex') { + if (($target ne 'tex') && + ($env{'form.answer_output_mode'} ne 'tex') && + (!$env{'form.grade_imsexport'})) { $result.=""; } if ($target eq 'web') { @@ -2055,7 +2060,8 @@ sub end_part { !$hidden && $in_order_show) { my $gradestatus=&Apache::inputtags::gradestatus($Apache::inputtags::part, $target); - if ($Apache::lonhomework::type eq 'exam' && $target eq 'tex') { + if (($Apache::lonhomework::type eq 'exam' && $target eq 'tex') || + ($env{'form.grade_imsexport'})) { $gradestatus=''; } $result.=$gradestatus;