--- loncom/homework/response.pm 2012/12/18 18:26:41 1.232 +++ loncom/homework/response.pm 2013/12/28 23:16:02 1.234 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.232 2012/12/18 18:26:41 raeburn Exp $ +# $Id: response.pm,v 1.234 2013/12/28 23:16:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -469,6 +469,18 @@ sub end_customresponse { $error = $award; $award = 'ERROR'; } + if (($award eq 'INCORRECT' || $award eq 'APPROX_ANS' || + $award eq 'EXACT_ANS')) { + if ($Apache::lonhomework::type eq 'survey') { + $award='SUBMITTED'; + } elsif ($Apache::lonhomework::type eq 'surveycred') { + $award='SUBMITTED_CREDIT'; + } elsif ($Apache::lonhomework::type eq 'anonsurvey') { + $award='ANONYMOUS'; + } elsif ($Apache::lonhomework::type eq 'anonsurveycred') { + $award='ANONYMOUS_CREDIT'; + } + } &Apache::response::handle_previous(\%previous,$award); $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}= $award; @@ -574,7 +586,7 @@ sub edit_mathresponse_button { function edit_${id}_${field} (textarea) { thenumber = textarea; thedata = document.forms['lonhomework'].elements[textarea].value; - newwin = window.open("/adm/dragmath/applet/MaximaPopup.html","","width=565,height=400,resizable"); + newwin = window.open("/adm/dragmath/MaximaPopup.html","","width=565,height=400,resizable"); } $button @@ -614,6 +626,18 @@ sub end_mathresponse { $error = $award; $award = 'ERROR'; } + if (($award eq 'INCORRECT' || $award eq 'APPROX_ANS' || + $award eq 'EXACT_ANS')) { + if ($Apache::lonhomework::type eq 'survey') { + $award='SUBMITTED'; + } elsif ($Apache::lonhomework::type eq 'surveycred') { + $award='SUBMITTED_CREDIT'; + } elsif ($Apache::lonhomework::type eq 'anonsurvey') { + $award='ANONYMOUS'; + } elsif ($Apache::lonhomework::type eq 'anonsurveycred') { + $award='ANONYMOUS_CREDIT'; + } + } &Apache::response::handle_previous(\%previous,$award); $Apache::lonhomework::results{"resource.$part.$id.awarddetail"}= $award;