--- loncom/homework/inputtags.pm 2003/04/19 09:00:54 1.92 +++ loncom/homework/inputtags.pm 2003/04/30 13:44:30 1.97 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # input definitons # -# $Id: inputtags.pm,v 1.92 2003/04/19 09:00:54 albertel Exp $ +# $Id: inputtags.pm,v 1.97 2003/04/30 13:44:30 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -124,11 +124,17 @@ sub start_textfield { } $result.=&Apache::edit::modifiedfield(); } elsif ($target eq 'tex') { + my $number_of_lines = &Apache::lonxml::get_param('rows',$parstack,$safeeval); + my $width_of_box = &Apache::lonxml::get_param('cols',$parstack,$safeeval); if ($$tagstack[-2] eq 'essayresponse' and $Apache::lonhomework::type eq 'exam') { - my $number_of_lines= &Apache::lonxml::get_param('rows',$parstack,$safeeval); $result = '\fbox{\fbox{\parbox{\textwidth-5mm}{'; - for (my $i=0;$i 0) { + $Apache::lonhomework::results{"resource.$id.awarded"}/= + $numawards; + } } elsif ( $award eq 'APPROX_ANS' || $award eq 'EXACT_ANS' ) { $Apache::lonhomework::results{"resource.$id.tries"} = $Apache::lonhomework::history{"resource.$id.tries"} + 1; $Apache::lonhomework::results{"resource.$id.solved"} = - 'correct_by_student'; + $solvemsg; $Apache::lonhomework::results{"resource.$id.awarded"} = '1'; } elsif ( $award eq 'INCORRECT' ) { $Apache::lonhomework::results{"resource.$id.tries"} = @@ -514,8 +530,8 @@ sub gradestatus { if ( $maxtries eq 'con_lost' ) { $maxtries = '0'; } if ( $showbutton ) { if ($target eq 'tex') { - if ($ENV{'request.state'} ne "construct") { - $trystr = ' {\small \textit{Tries} '.$tries.'/'.$maxtries.'} \vskip 0 mm '; + if ($ENV{'request.state'} ne "construct" && $Apache::lonhomework::type ne 'exam') { + $trystr = ' {\vskip 1 mm \small \textit{Tries} '.$tries.'/'.$maxtries.'} \vskip 2 mm '; } else { $trystr = '\vskip 0 mm '; }