--- loncom/homework/inputtags.pm 2016/04/02 04:30:39 1.340 +++ loncom/homework/inputtags.pm 2016/04/04 21:50:32 1.341 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.340 2016/04/02 04:30:39 raeburn Exp $ +# $Id: inputtags.pm,v 1.341 2016/04/04 21:50:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1684,7 +1684,13 @@ sub get_grade_messages { $trial.="/".$Apache::inputtags::params{'maxtries'}; } } - $trystr = ''.&mt($tries_text.' [_1]',$trial).''; + + unless (($env{'request.state'} ne "construct") && + ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Placement') && + (!$env{'request.role.adv'})) { + $trystr = ''.&mt($tries_text.' [_1]',$trial).''; + } + $trystr = ''.$trystr.''; } } @@ -1751,11 +1757,7 @@ sub gradestatus { } } - my $output= $previousmsg.$latemessage.$message; - my $crstype = $env{'course.'.$env{'request.course.id'}.'.type'}; - unless ($crstype eq 'Placement') { - $output .= $trystr; - } + my $output= $previousmsg.$latemessage.$message.$trystr; if ($output =~ /^\s*$/) { return $button; } else { @@ -1764,7 +1766,9 @@ sub gradestatus { } else { $output = ''.$output; - if ((!$no_previous) && ($crstype ne 'Placement')) { + if ((!$no_previous) && + (($env{'course.'.$env{'request.course.id'}.'.type'} ne 'Placement') || + ($env{'request.role.adv'}))) { $output.=''; } $output.= '
'.$button.''.&previous_tries($id,$target).'
';