--- loncom/homework/structuretags.pm 2016/04/02 04:16:19 1.545 +++ loncom/homework/structuretags.pm 2016/04/02 04:30:39 1.546 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.545 2016/04/02 04:16:19 raeburn Exp $ +# $Id: structuretags.pm,v 1.546 2016/04/02 04:30:39 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -226,9 +226,11 @@ sub end_tex { sub homework_js { my ($postsubmit,$timeout); if (($env{'request.course.id'}) && ($env{'request.state'} ne 'construct')) { - my $crstype; - if (&Apache::loncommon::course_type() eq 'Community') { + my $crstype = &Apache::loncommon::course_type(); + if ($crstype eq 'Community') { $crstype = 'community'; + } elsif ($crstype eq 'Placement') { + $crstype = 'placement'; } else { if ($env{'course.'.$env{'request.course.id'}.'.internal.coursecode'}) { $crstype = 'official'; @@ -1602,7 +1604,8 @@ sub start_problem { $form_tag_start.='
'; } elsif (($env{'request.state'} ne "construct") && ($Apache::lonhomework::type eq 'randomizetry') && - ($status eq 'CAN_ANSWER')) { + ($status eq 'CAN_ANSWER') && + ($env{'course.'.$env{'request.course.id'}.'.type'} ne 'Placement')) { my $reqtries = &Apache::lonnet::EXT("resource.$Apache::inputtags::part.randomizeontries"); my $problemstatus = &get_problem_status($Apache::inputtags::part); $form_tag_start.=&randomizetry_problem_header($problemstatus,$reqtries); @@ -1922,7 +1925,11 @@ sub end_problem { # Added separately at end of this routine, after added # so document will be valid xhtml. # - $result.= &Apache::loncommon::end_page({'discussion' => 1, + my $showdisc = 1; + if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement') { + $showdisc = 0; + } + $result.= &Apache::loncommon::end_page({'discussion' => $showdisc, 'notbody' => 1}); } elsif ($target eq 'tex') { my $endminipage = '';