|
From: Chris S. <san...@us...> - 2009-06-26 18:09:41
|
Update of /cvsroot/stack/stack-dev/lib/database In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8308/lib/database Modified Files: devCache.php MoodleDB.php Log Message: Index: MoodleDB.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/MoodleDB.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** MoodleDB.php 23 Jun 2009 14:39:35 -0000 1.12 --- MoodleDB.php 26 Jun 2009 18:08:36 -0000 1.13 *************** *** 42,46 **** { parent::__construct(); ! $this->logger = new Logger("MoodleDB"); } --- 42,46 ---- { parent::__construct(); ! $this->logger = new Logger("MoodleDB"); } *************** *** 129,133 **** } - $itemGUID = $item->questionGUID->getSelection(); $itemID = $item->getQuestionId(); --- 129,132 ---- *************** *** 236,243 **** $category, 0, ".$this->dbSafeString($qName)." , ".$this->dbSafeString('').", 0, ".$this->dbSafeString('').", ".$this->dbSafeString('').", $qMaxMark, 0,".$this->dbSafeString(QTYPE).", 1, ".$this->dbSafeString($qGUID).", ".$this->dbSafeString($timestamp).", 0, $timestamp, $timestamp, $userID );"; ! $this->connectMoodleDB(); $added = $this->query($sql); ! if($added !== false) { --- 235,242 ---- $category, 0, ".$this->dbSafeString($qName)." , ".$this->dbSafeString('').", 0, ".$this->dbSafeString('').", ".$this->dbSafeString('').", $qMaxMark, 0,".$this->dbSafeString(QTYPE).", 1, ".$this->dbSafeString($qGUID).", ".$this->dbSafeString($timestamp).", 0, $timestamp, $timestamp, $userID );"; ! $this->connectMoodleDB(); $added = $this->query($sql); ! if($added !== false) { *************** *** 282,286 **** */ public function inMoodleQuestionBank($stackID, $engineID) ! { $stackID = 'q'.$stackID; global $config; --- 281,285 ---- */ public function inMoodleQuestionBank($stackID, $engineID) ! { $stackID = 'q'.$stackID; global $config; *************** *** 293,297 **** $this->connect(); $result = $this->query($sql); ! $this->logger->finest("Query ".$sql."\n\n Returned".print_r($result,true)); $no = $this->noRows(); --- 292,296 ---- $this->connect(); $result = $this->query($sql); ! $this->logger->finest("Query ".$sql."\n\n Returned".print_r($result,true)); $no = $this->noRows(); *************** *** 531,535 **** return $return; } ! /** * Returns the context id for the passed in category id --- 530,534 ---- return $return; } ! /** * Returns the context id for the passed in category id *************** *** 581,585 **** ".$this->dbSafeString($name).", $context, ".$this->dbSafeString($info).", ".$this->dbSafeString($stamp).", $parent, 999 );"; ! $added = $this->query($sql); if($added !== false) --- 580,584 ---- ".$this->dbSafeString($name).", $context, ".$this->dbSafeString($info).", ".$this->dbSafeString($stamp).", $parent, 999 );"; ! $added = $this->query($sql); if($added !== false) Index: devCache.php =================================================================== RCS file: /cvsroot/stack/stack-dev/lib/database/devCache.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** devCache.php 23 Jun 2009 17:31:58 -0000 1.3 --- devCache.php 26 Jun 2009 18:08:36 -0000 1.4 *************** *** 20,24 **** // anti-plagiarism check: developers can uncomment line below ! die("Cache view for developers must be enabled in devCache.php"); $cache = new StackDBCache(); --- 20,24 ---- // anti-plagiarism check: developers can uncomment line below ! //die("Cache view for developers must be enabled in devCache.php"); $cache = new StackDBCache(); |