From: Simon H. <sim...@us...> - 2010-12-09 14:25:10
|
Update of /cvsroot/stack/stack-dev/opaque In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv30562/opaque Modified Files: Tag: item_state_separation MoodleDisplayItem.php Log Message: Intermediate debugging Index: MoodleDisplayItem.php =================================================================== RCS file: /cvsroot/stack/stack-dev/opaque/MoodleDisplayItem.php,v retrieving revision 1.11.6.1.2.3 retrieving revision 1.11.6.1.2.4 diff -C2 -d -r1.11.6.1.2.3 -r1.11.6.1.2.4 *** MoodleDisplayItem.php 19 Nov 2010 18:16:19 -0000 1.11.6.1.2.3 --- MoodleDisplayItem.php 9 Dec 2010 14:25:00 -0000 1.11.6.1.2.4 *************** *** 234,244 **** } ! /* ! * Process Item with STACK event. ! */ private function processItem($posted, $processRequest, $event) { // get connection to cache $cache = new StackDBCache(); ! $cache->connect(); // is this a user-initiated event or not? --- 234,244 ---- } ! /* ! * Process Item with STACK event. ! */ private function processItem($posted, $processRequest, $event) { // get connection to cache $cache = new StackDBCache(); ! $cache->connect(); // is this a user-initiated event or not? *************** *** 250,259 **** // try updating cache from currentState with posted ! $xhtml = $this->fetchCache($posted, $event); // stateID may be updated ! // if nothing in cache then grow the cache tree, possibly with a loop-back ! if(NULL !== $xhtml) { ! $this->logger->debug("Question state cached (to state ".$this->stateID.") so no need to process."); ! } else { $this->logger->debug("Question state not cached so must process from id=".$this->stateID." Event: ".$event); --- 250,259 ---- // try updating cache from currentState with posted ! $xhtml = $this->fetchCache($posted, $event); // stateID may be updated ! // if nothing in cache then grow the cache tree, possibly with a loop-back ! if(NULL !== $xhtml) { ! $this->logger->debug("Question state cached (to state ".$this->stateID.") so no need to process."); ! } else { $this->logger->debug("Question state not cached so must process from id=".$this->stateID." Event: ".$event); *************** *** 264,270 **** --- 264,273 ---- if(is_a($state, "DisplayItem")) { // retrofitting to prior caches + echo "ISA DisplayItem"; $item = $state; } else { + echo "IS NOT A DisplayItem"; $item = new DisplayItem($state['ItemOptions'], $state['qID']); // base question + echo '$state in processItem:'.print_r($state,1); $item->setState($state); // specific state } |