From: Chris S. <san...@us...> - 2005-10-20 13:26:07
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1616/scripts Modified Files: stackQuestion.php Log Message: Index: stackQuestion.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackQuestion.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** stackQuestion.php 20 Oct 2005 12:53:36 -0000 1.44 --- stackQuestion.php 20 Oct 2005 13:25:59 -0000 1.45 *************** *** 1724,1727 **** --- 1724,1732 ---- } + if ('true' != $this_PRattempt['Valid']) { + $NoErrors = FALSE; + $this_attempt['Valid'] = 'false'; + } + $this_attempt['AnswerNote'] .= ' '.stack_castext_to_display($this_PRattempt['AnswerNote'],$all_locs_Inst,$options,$errors); $this_attempt['FeedBack'] .= ' '.stack_castext_to_display($this_PRattempt['FeedBack'],$all_locs_Inst,$options,$errors); *************** *** 1734,1773 **** } ! // Modify the marks ! if ('=' == $potresp[$branch]['RawMarkMod']) { ! $this_attempt['RawMark'] = $potresp[$branch]['RawMark']; ! } else if ('+' == $potresp[$branch]['RawMarkMod']) { ! $this_attempt['RawMark'] += $potresp[$branch]['RawMark']; ! } else if ('-' == $potresp[$branch]['RawMarkMod']) { ! $this_attempt['RawMark'] -= $potresp[$branch]['RawMark']; ! } else if ('=AT' == $potresp[$branch]['RawMarkMod']) { ! // If the AnswerTest has assigned partial credit, we need to use it. ! if (array_key_exists('RawMark',$this_PRattempt)) { ! $this_attempt['RawMark'] = $this_PRattempt['RawMark']; ! } else if ($this_PRattempt['Result']) { ! $this_attempt['RawMark'] = 1; ! } else { ! $this_attempt['RawMark'] = 0; } - } ! // Add any penalty ! if (array_key_exists('Penalty',$potresp[$branch])) { ! $this_attempt['Penalty'] += $potresp[$branch]['Penalty']; ! } // If there is no penalty set, we use the default, *AT THE END* ! // Generate any FeedBack ! if (array_key_exists('FeedBack',$potresp[$branch])) { ! $out = ' '.stack_castext_inst($potresp[$branch]['FeedBack'],$all_locs_Inst,$options,$errors); ! $this_attempt['FeedBack'] .= $out; ! } ! // Generate any AnswerNote. if (array_key_exists('AnswerNote',$potresp[$branch])) { ! $out = ' '.stack_castext_inst($potresp[$branch]['AnswerNote'],$all_locs_Inst,$options,$errors); ! $this_attempt['AnswerNote'] .= $out; ! } ! // Need to check "Continue?" condition. $exed[$prn] = 0; --- 1739,1778 ---- } ! // Modify the marks ! if ('=' == $potresp[$branch]['RawMarkMod']) { ! $this_attempt['RawMark'] = $potresp[$branch]['RawMark']; ! } else if ('+' == $potresp[$branch]['RawMarkMod']) { ! $this_attempt['RawMark'] += $potresp[$branch]['RawMark']; ! } else if ('-' == $potresp[$branch]['RawMarkMod']) { ! $this_attempt['RawMark'] -= $potresp[$branch]['RawMark']; ! } else if ('=AT' == $potresp[$branch]['RawMarkMod']) { ! // If the AnswerTest has assigned partial credit, we need to use it. ! if (array_key_exists('RawMark',$this_PRattempt)) { ! $this_attempt['RawMark'] = $this_PRattempt['RawMark']; ! } else if ($this_PRattempt['Result']) { ! $this_attempt['RawMark'] = 1; ! } else { ! $this_attempt['RawMark'] = 0; ! } } ! // Add any penalty ! if (array_key_exists('Penalty',$potresp[$branch])) { ! $this_attempt['Penalty'] += $potresp[$branch]['Penalty']; ! } // If there is no penalty set, we use the default, *AT THE END* ! // Generate any FeedBack ! if (array_key_exists('FeedBack',$potresp[$branch])) { ! $out = ' '.stack_castext_inst($potresp[$branch]['FeedBack'],$all_locs_Inst,$options,$errors); ! $this_attempt['FeedBack'] .= $out; ! } ! // Generate any AnswerNote. if (array_key_exists('AnswerNote',$potresp[$branch])) { ! $out = ' '.stack_castext_inst($potresp[$branch]['AnswerNote'],$all_locs_Inst,$options,$errors); ! $this_attempt['AnswerNote'] .= $out; ! } ! // Need to check "Continue?" condition. $exed[$prn] = 0; *************** *** 1775,1786 **** if (array_key_exists($prn,$exed)) { ! if(0==$exed[$prn]) { // ERROR! we have been here before $this_attempt['AnswerNote'] .= get_string('QMarkBailOut','stack','')." ".$prn; } ! } else { // We have nowhere to go! ! $exed[$prn] = 0; ! } ! } while (1==$exed[$prn] and $NoErrors); // Finished processing each PR. --- 1780,1791 ---- if (array_key_exists($prn,$exed)) { ! if(0==$exed[$prn]) { // ERROR! we have been here before $this_attempt['AnswerNote'] .= get_string('QMarkBailOut','stack','')." ".$prn; } ! } else { // We have nowhere to go! ! $exed[$prn] = 0; ! } ! } while (1==$exed[$prn] and $NoErrors); // Finished processing each PR. *************** *** 1794,1798 **** $this_attempt['Penalty'] = 0; } ! } }// End If != error in Ans --- 1799,1803 ---- $this_attempt['Penalty'] = 0; } ! } }// End If != error in Ans |