Update of /cvsroot/stack/stack-dev/lib/answertests In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29766/lib/answertests Modified Files: Tag: question_reporting EqualComAss.php CasEqual.php FacForm.php ATRegExp.php SAExpanded.php LowestTerms.php Creating new answer tests.txt SubstEquiv.php GreaterThan.php AnsTestController.php AlgEquiv.php Diff.php CompSquare.php GreaterThanEqual.php Expanded.php PartFrac.php SameType.php template_cas_answertest.php Int.php SingleFrac.php Added Files: Tag: question_reporting NumSigFigs.php EquationAT.php MultiEquiv.php Log Message: Merging from the current HEAD into question_reporting. Apologies in advance if this all goes horribly wrong. Index: SameType.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/SameType.php,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** SameType.php 27 Aug 2009 16:23:00 -0000 1.9 --- SameType.php 22 Nov 2010 23:05:45 -0000 1.9.2.1 *************** *** 61,65 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 61,64 ---- Index: ATRegExp.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/ATRegExp.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** ATRegExp.php 27 Aug 2009 16:23:00 -0000 1.7 --- ATRegExp.php 22 Nov 2010 23:05:45 -0000 1.7.2.1 *************** *** 52,57 **** if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing regular expression in Cas Option field'); ! $this->ATError = 'Missing regular expression in Cas Option field'; return NULL; } --- 52,60 ---- if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing regular expression in CAS Option field'); ! $this->ATError = 'Missing regular expression in CAS Option field'; ! $this->ATFeedback = ' stack_trans("TEST_FAILED");'; ! $this->ATAnsNote = 'STACKERROR_OPTION_REGEX'; ! $this->ATMark = 0; return NULL; } Index: Expanded.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/Expanded.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Expanded.php 27 Aug 2009 16:23:00 -0000 1.2 --- Expanded.php 22 Nov 2010 23:05:45 -0000 1.2.2.1 *************** *** 61,65 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 61,64 ---- Index: AlgEquiv.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/AlgEquiv.php,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -C2 -d -r1.12 -r1.12.2.1 *** AlgEquiv.php 27 Aug 2009 16:23:00 -0000 1.12 --- AlgEquiv.php 22 Nov 2010 23:05:45 -0000 1.12.2.1 *************** *** 64,68 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 64,67 ---- Index: FacForm.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/FacForm.php,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** FacForm.php 27 Aug 2009 16:23:00 -0000 1.11 --- FacForm.php 22 Nov 2010 23:05:45 -0000 1.11.2.1 *************** *** 60,66 **** if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing required variable in CAS Option field'); ! $this->ATError = 'Missing required variable in CAS Option field'; ! return NULL; } else --- 60,69 ---- if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing variable in CAS Option field'); ! $this->ATError = 'Missing variable in CAS Option field'; ! $this->ATFeedback = ' stack_trans("TEST_FAILED");'; ! $this->ATAnsNote = 'STACKERROR_OPTION'; ! $this->ATMark = 0; ! return NULL; } else *************** *** 85,89 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 88,91 ---- Index: LowestTerms.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/LowestTerms.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** LowestTerms.php 27 Aug 2009 16:23:00 -0000 1.2 --- LowestTerms.php 22 Nov 2010 23:05:45 -0000 1.2.2.1 *************** *** 67,71 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 67,70 ---- Index: GreaterThan.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/GreaterThan.php,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** GreaterThan.php 27 Aug 2009 16:23:00 -0000 1.9 --- GreaterThan.php 22 Nov 2010 23:05:45 -0000 1.9.2.1 *************** *** 62,66 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 62,65 ---- Index: SingleFrac.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/SingleFrac.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** SingleFrac.php 11 Sep 2009 10:14:13 -0000 1.4 --- SingleFrac.php 22 Nov 2010 23:05:45 -0000 1.4.2.1 *************** *** 62,70 **** $ta = $this->tAnsKey; $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$ta, self::casFunction); $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 62,70 ---- $ta = $this->tAnsKey; + $this->maximaPreferences->updateOption('Simplify', 'false'); $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$ta, self::casFunction); $this->ATMark = $result['rawmark']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; Index: EqualComAss.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/EqualComAss.php,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** EqualComAss.php 27 Aug 2009 16:23:00 -0000 1.9 --- EqualComAss.php 22 Nov 2010 23:05:45 -0000 1.9.2.1 *************** *** 62,66 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 62,65 ---- Index: CompSquare.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/CompSquare.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** CompSquare.php 11 Sep 2009 13:35:49 -0000 1.1 --- CompSquare.php 22 Nov 2010 23:05:45 -0000 1.1.2.1 *************** *** 60,65 **** if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing required variable in CAS Option field'); ! $this->ATError = 'Missing required variable in CAS Option field'; return NULL; } --- 60,68 ---- if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing variable in CAS Option field'); ! $this->ATError = 'Missing variable in CAS Option field'; ! $this->ATFeedback = ' stack_trans("TEST_FAILED");'; ! $this->ATAnsNote = 'STACKERROR_OPTION'; ! $this->ATMark = 0; return NULL; } *************** *** 85,89 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 88,91 ---- Index: GreaterThanEqual.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/GreaterThanEqual.php,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** GreaterThanEqual.php 27 Aug 2009 16:23:00 -0000 1.9 --- GreaterThanEqual.php 22 Nov 2010 23:05:45 -0000 1.9.2.1 *************** *** 61,65 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 61,64 ---- Index: template_cas_answertest.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/template_cas_answertest.php,v retrieving revision 1.2 retrieving revision 1.2.14.1 diff -C2 -d -r1.2 -r1.2.14.1 *** template_cas_answertest.php 27 Sep 2007 10:40:04 -0000 1.2 --- template_cas_answertest.php 22 Nov 2010 23:05:45 -0000 1.2.14.1 *************** *** 26,32 **** * Description of the answertest.. * ! * @author ! * @version ! * @copyright */ class template_cas_answertest extends AnsTest { --- 26,32 ---- * Description of the answertest.. * ! * @author ! * @version ! * @copyright */ class template_cas_answertest extends AnsTest { *************** *** 34,38 **** // Associations // Operations ! /** * constant --- 34,38 ---- // Associations // Operations ! /** * constant *************** *** 41,60 **** const casFunction = 'ATTest'; /** ! * ! * ! * @param string $sAnsKey ! * @param string $tAnsKey ! * @param CasString $casOption * @access public */ public function __construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption = NULL) { ! parent::__construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption); } /** * The actual answertest code, for most answertests using the cas this will suffice ! * ! * @return bool * @access public */ --- 41,60 ---- const casFunction = 'ATTest'; /** ! * ! * ! * @param string $sAnsKey ! * @param string $tAnsKey ! * @param CasString $casOption * @access public */ public function __construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption = NULL) { ! parent::__construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption); } /** * The actual answertest code, for most answertests using the cas this will suffice ! * ! * @return bool * @access public */ *************** *** 63,73 **** $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$this->tAnsKey, self::casFunction); //the call to the cas ! $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; $this->ATError = $result['error']; ! if($this->ATMark == '1') { --- 63,72 ---- $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$this->tAnsKey, self::casFunction); //the call to the cas ! $this->ATMark = $result['rawmark']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; $this->ATError = $result['error']; ! if($this->ATMark == '1') { Index: Diff.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/Diff.php,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** Diff.php 27 Aug 2009 16:23:00 -0000 1.11 --- Diff.php 22 Nov 2010 23:05:45 -0000 1.11.2.1 *************** *** 59,64 **** if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing required variable in Cas Option field'); ! $this->ATError = 'Missing required variable in Cas Option field'; return NULL; } --- 59,67 ---- if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing variable in CAS Option field'); ! $this->ATError = 'Missing variable in CAS Option field'; ! $this->ATFeedback = ' stack_trans("TEST_FAILED");'; ! $this->ATAnsNote = 'STACKERROR_OPTION'; ! $this->ATMark = 0; return NULL; } *************** *** 83,87 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 86,89 ---- --- NEW FILE: NumSigFigs.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @author Chris Sangwin (C.J...@bh...) * * @package stackAnswertest */ global $config; require_once $config->get('docroot').'/lib/items/CasString.php'; require_once 'AnsTest.php'; /** * This is test checks to see if the difference between the teacher's answer (ta) and student's answer (sa) is within a tolerance of the answer. The default tolerance is 0.05, but this can be changed with the answer test option. Literally this test is passed if abs(sa-ta) <= tol and false otherwise. */ class NumSigFigs extends AnsTest { // Attributes // Associations // Operations /** * constant * The name of the cas function this answer test uses. */ const casFunction = 'ATNumSigFigs'; /** * * @param string $sAnsKey * @param string $tAnsKey * @param CasString $casOption * @access public */ public function __construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption = NULL) { parent::__construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption); } /** * * * @return bool * @access public */ public function doAnsTest() { $atOpt = $this->ATOption; // Set a default option if (''==trim($atOpt)) { $atOpt='3'; } $ta = "[$this->tAnsKey,$atOpt]"; $this->maximaPreferences->updateOption('Simplify', 'true'); $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$ta, self::casFunction); $this->ATMark = $result['rawmark']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; $this->ATError = $result['error']; if($this->ATMark == '1') { return true; } else { return false; } } } ?> Index: CasEqual.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/CasEqual.php,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -C2 -d -r1.10 -r1.10.2.1 *** CasEqual.php 27 Aug 2009 16:23:00 -0000 1.10 --- CasEqual.php 22 Nov 2010 23:05:45 -0000 1.10.2.1 *************** *** 63,67 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 63,66 ---- Index: Creating new answer tests.txt =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/Creating new answer tests.txt,v retrieving revision 1.6 retrieving revision 1.6.14.1 diff -C2 -d -r1.6 -r1.6.14.1 *** Creating new answer tests.txt 4 Feb 2008 11:48:25 -0000 1.6 --- Creating new answer tests.txt 22 Nov 2010 23:05:45 -0000 1.6.14.1 *************** *** 87,91 **** This sample answertest will return true if the students answer is a floating point number. ! In the doAnsTest method, begin by editing the casCommands array to contain all the commands you require. Each individual cas command should be a seperate array entry. After the code to send the castext to the CAS change how you wish to derive a true/false answer. --- 87,91 ---- This sample answertest will return true if the students answer is a floating point number. ! In the doAnsTest method, begin by editing the casCommands array to contain all the commands you require. Each individual cas command should be a separate array entry. After the code to send the castext to the CAS change how you wish to derive a true/false answer. --- NEW FILE: MultiEquiv.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @author Jonathan Hart (j.p...@bh...) * * @package stackAnswertest */ global $config; require_once $config->get('docroot').'/lib/items/CasString.php'; require_once $config->get('docroot').'/lib/CAS/maximaConnector.php'; require_once 'AnsTest.php'; /** * detailed description * * @author * @version * @copyright */ class MultiEquiv extends AnsTest { // Attributes // Associations // Operations /** * constant * The name of the cas function this answer test uses. */ const casFunction = 'ATMultiEquiv'; /** * * * @param string $sAnsKey * @param string $tAnsKey * @param CasString $casOption * @access public */ public function __construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption = NULL) { parent::__construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption); } /** * * * @return bool * @access public */ public function doAnsTest() { $this->maximaPreferences->updateOption('Simplify', 'false'); $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$this->tAnsKey, self::casFunction); $this->ATMark = $result['rawmark']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; $this->ATError = $result['error']; if($this->ATMark == '1') { //echo '<strong>Returning true</strong>'; return true; } else { //echo '<strong>Returning false</strong>'; return false; } } } ?> Index: SAExpanded.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/SAExpanded.php,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** SAExpanded.php 27 Aug 2009 16:23:00 -0000 1.9 --- SAExpanded.php 22 Nov 2010 23:05:45 -0000 1.9.2.1 *************** *** 61,65 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 61,64 ---- Index: AnsTestController.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/AnsTestController.php,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -C2 -d -r1.31 -r1.31.2.1 *** AnsTestController.php 11 Sep 2009 13:35:49 -0000 1.31 --- AnsTestController.php 22 Nov 2010 23:05:45 -0000 1.31.2.1 *************** *** 73,76 **** --- 73,77 ---- 'NumAbsolute'=>get_string('stackOptions_AnsTest_values_Num_tol_absolute','stack',''), 'NumRelative'=>get_string('stackOptions_AnsTest_values_Num_tol_relative','stack',''), + 'NumSigFigs'=>get_string('stackOptions_AnsTest_values_Num_sig_figs','stack',''), 'LowestTerms'=>get_string('stackOptions_AnsTest_values_Num_LowestTerms','stack',''), 'Diff'=>get_string('stackOptions_AnsTest_values_Diff','stack',''), *************** *** 179,182 **** --- 180,188 ---- break; + case 'NumSigFigs': + require_once 'NumSigFigs.php'; + $this->AT = new NumSigFigs($sAns, $tAns, $maximaPreferences, $AnsTestOption); + break; + case 'LowestTerms': require_once 'LowestTerms.php'; *************** *** 184,187 **** --- 190,205 ---- break; + // The following two are only used in the module ODE and should not be available for questions. + // CJS, 30/10/9 + + case 'MultiEquiv': + require_once 'MultiEquiv.php'; + $this->AT = new MultiEquiv($sAns, $tAns, $maximaPreferences, $AnsTestOption); + break; + case 'EquationAT': + require_once 'EquationAT.php'; + $this->AT = new EquationAT($sAns, $tAns, $maximaPreferences, $AnsTestOption); + break; + } --- NEW FILE: EquationAT.php --- <?php /** * * Welcome to STACK. A system for teaching and assessment using a * computer algebra kernel. * * This file is licensed under the GPL License. * * A copy of the license is in your STACK distribution called * license.txt. If you are missing this file you can obtain * it from: * http://www.stack.bham.ac.uk/license.txt * * @author Jonathan Hart (j.p...@bh...) * * @package stackAnswertest */ global $config; require_once $config->get('docroot').'/lib/items/CasString.php'; require_once 'AnsTest.php'; /** * detailed description * * @author * @version * @copyright */ class EquationAT extends AnsTest { // Attributes // Associations // Operations /** * constant * The name of the cas function this answer test uses. */ const casFunction = 'ATEquations'; /** * * * @param string $sAnsKey * @param string $tAnsKey * @param CasString $casOption * @access public */ public function __construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption = NULL) { parent::__construct($sAnsKey, $tAnsKey, $maximaPreferencs, $casOption); $this->CASProcessTestOps = true; } /** * * * @return bool * @access public */ public function doAnsTest() { if($this->ATOption == NULL) { $this->errorLog->addError('Missing variable in CAS Option field'); $this->ATError = 'Missing variable in CAS Option field'; $this->ATFeedback = ' stack_trans("TEST_FAILED");'; $this->ATAnsNote = 'STACKERROR_OPTION'; $this->ATMark = 0; return NULL; } else { $ATOptionCasString = new CasString($this->ATOption); $valid = $ATOptionCasString->validate(); if(!$valid) { $this->errorLog->addError("Answer test option $this->ATOption failed validation: ".$ATOptionCasString->getErrors()); return NULL; } else { //$this->errorLog = validate_casstring($atest_ops); $atOpt = $this->ATOption; $ta = "[$this->tAnsKey,$atOpt,false]"; $mconn = new maximaConnector($this->maximaPreferences); $result = $mconn->sendAnsTest($this->sAnsKey,$ta, self::casFunction); $this->ATMark = $result['rawmark']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; $this->ATError = $result['error']; if($this->ATMark == '1') { return true; } else { return false; } } } } } ?> Index: SubstEquiv.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/SubstEquiv.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** SubstEquiv.php 27 Aug 2009 16:23:00 -0000 1.2 --- SubstEquiv.php 22 Nov 2010 23:05:45 -0000 1.2.2.1 *************** *** 64,68 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 64,67 ---- Index: Int.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/Int.php,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** Int.php 27 Aug 2009 16:23:00 -0000 1.11 --- Int.php 22 Nov 2010 23:05:45 -0000 1.11.2.1 *************** *** 61,66 **** if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing required variable in Cas Option field'); ! $this->ATError = 'Missing required variable in Cas Option field'; return NULL; } --- 61,69 ---- if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing variable in CAS Option field'); ! $this->ATError = 'Missing variable in CAS Option field'; ! $this->ATFeedback = ' stack_trans("TEST_FAILED");'; ! $this->ATAnsNote = 'STACKERROR_OPTION'; ! $this->ATMark = 0; return NULL; } *************** *** 85,89 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 88,91 ---- Index: PartFrac.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/answertests/PartFrac.php,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -C2 -d -r1.11 -r1.11.2.1 *** PartFrac.php 27 Aug 2009 16:23:00 -0000 1.11 --- PartFrac.php 22 Nov 2010 23:05:45 -0000 1.11.2.1 *************** *** 60,65 **** if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing required variable in Cas Option field'); ! $this->ATError = 'Missing required variable in Cas Option field'; return NULL; } --- 60,68 ---- if($this->ATOption == NULL) { ! $this->errorLog->addError('Missing variable in CAS Option field'); ! $this->ATError = 'Missing variable in CAS Option field'; ! $this->ATFeedback = ' stack_trans("TEST_FAILED");'; ! $this->ATAnsNote = 'STACKERROR_OPTION'; ! $this->ATMark = 0; return NULL; } *************** *** 85,89 **** $this->ATMark = $result['rawmark']; - $this->ATValid = $result['valid']; $this->ATAnsNote = $result['answernote']; $this->ATFeedback = $result['feedback']; --- 88,91 ---- |