From: Simon H. <sim...@us...> - 2010-11-18 14:21:23
|
Update of /cvsroot/stack/stack-dev/opaque In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv5138/opaque Modified Files: Tag: item_state_separation MoodleDisplayItem.php MoodleQuestionDeployment.php Log Message: Index: MoodleQuestionDeployment.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleQuestionDeployment.php,v retrieving revision 1.3.8.1.2.2 retrieving revision 1.3.8.1.2.3 diff -C2 -d -r1.3.8.1.2.2 -r1.3.8.1.2.3 *** MoodleQuestionDeployment.php 16 Nov 2010 19:04:31 -0000 1.3.8.1.2.2 --- MoodleQuestionDeployment.php 18 Nov 2010 14:21:15 -0000 1.3.8.1.2.3 *************** *** 104,108 **** //$this->logger->debug("in MQD constructor: ".print_r($this->param, 1)); ! $this->deployment = new Deployment($this->param['id'], $this->param['engineID']); } --- 104,109 ---- //$this->logger->debug("in MQD constructor: ".print_r($this->param, 1)); ! // foo change ! $this->deployment = new Deployment($this->param['id'], $this->param['engineID']); } Index: MoodleDisplayItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleDisplayItem.php,v retrieving revision 1.11.6.1.2.1 retrieving revision 1.11.6.1.2.2 diff -C2 -d -r1.11.6.1.2.1 -r1.11.6.1.2.2 *** MoodleDisplayItem.php 9 Nov 2010 16:51:39 -0000 1.11.6.1.2.1 --- MoodleDisplayItem.php 18 Nov 2010 14:21:15 -0000 1.11.6.1.2.2 *************** *** 260,264 **** // get current state from cache ! $item = $cache->getDisplayItem($this->stateID); // bring Item expired status uptodate to ensure worked solution shown --- 260,272 ---- // get current state from cache ! //$item = $cache->getDisplayItem($this->stateID); ! $state = $cache->getState($this->stateID); ! ! if(is_a($state, "DisplayItem")) { // retrofitting to populated caches ! $item = $state; ! } else { ! $item = new DisplayItem($state['ItemOptions'], $state['qID']); // base question ! $item->setState($state); // specific state ! } // bring Item expired status uptodate to ensure worked solution shown |