|
From: Chris S. <san...@us...> - 2009-06-26 15:08:59
|
Update of /cvsroot/stack/stack-dev/lib/ui In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17098/ui Modified Files: Tag: stack_cache DisplayItem.php Log Message: Index: DisplayItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/ui/DisplayItem.php,v retrieving revision 1.73.4.38 retrieving revision 1.73.4.39 diff -C2 -d -r1.73.4.38 -r1.73.4.39 *** DisplayItem.php 16 Jun 2009 16:42:31 -0000 1.73.4.38 --- DisplayItem.php 26 Jun 2009 15:08:50 -0000 1.73.4.39 *************** *** 1421,1424 **** --- 1421,1425 ---- } + //echo "<pre>"; print_r($test_post); echo "</pre>"; return $test_post; } *************** *** 1624,1627 **** --- 1625,1629 ---- } + /* Actually perform the tests on the item */ private function getTestOutcomes() { *************** *** 1637,1641 **** foreach($tests as $test) { // Empty answers do not appear in the $_POST ! // Hence, to mimic the posted data we should unset where neccessary. foreach($test['IE'] as $key=>$val){ if (''==trim($val)) --- 1639,1643 ---- foreach($tests as $test) { // Empty answers do not appear in the $_POST ! // Hence, to mimic the posted data we should unset where necessary. foreach($test['IE'] as $key=>$val){ if (''==trim($val)) *************** *** 1645,1649 **** } // If a PRT is not traversed then the answernote should not exist. ! // This is different from an answernote existing with the value "NONE", so unset where neccessary. foreach($test['PRT'] as $key=>$val){ if ('NONE'==trim($val)) --- 1647,1651 ---- } // If a PRT is not traversed then the answernote should not exist. ! // This is different from an answernote existing with the value "NONE", so unset where necessary. foreach($test['PRT'] as $key=>$val){ if ('NONE'==trim($val)) *************** *** 1653,1669 **** } ! // Slight hack to ensure we have a clean version of the instantiated item without the effort of creating it again! ! $test_q = unserialize($serial_blank_question); ! // Evaluate test variables in the context of the question variables. ! $test_post = $test_q->getTestInput($test['IE']); ! // Two attempts really needed: Validation then Marking. ! $test_q->processQuestion($test_post, true, false); ! $test_q->processQuestion($test_post, true, false); ! //echo "<pre>"; print_r($test_q); echo "</pre>"; ! $xhtml .= $test_q->displayAttempts(false,$test['PRT']); ! $xhtml .= '<br />'; } --- 1655,1671 ---- } ! // Slight hack to ensure we have a clean version of the instantiated item without the effort of creating it again! ! $test_q = unserialize($serial_blank_question); ! // Evaluate test variables in the context of the question variables. ! $test_post = $test_q->getTestInput($test['IE']); ! // Two attempts really needed: Validation then Marking. ! $test_q->processQuestion($test_post, true, false); ! $test_q->processQuestion($test_post, true, false); ! //echo "<pre>"; print_r($test_q); echo "</pre>"; ! $xhtml .= $test_q->displayAttempts(false,$test['PRT']); ! $xhtml .= '<br />'; } *************** *** 1676,1678 **** } ! ?> --- 1678,1680 ---- } ! ?> \ No newline at end of file |