[Logicampus-cvs] logicampus/src/logicreate/lib lc_lob_test.php, NONE, 1.1 lc_lob.php, 1.27, 1.28
Brought to you by:
trilexcom
From: Mark K <har...@us...> - 2007-10-05 19:27:42
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27554 Modified Files: lc_lob.php Added Files: lc_lob_test.php Log Message: Moving test LOB into its own file. --- NEW FILE: lc_lob_test.php --- <?php include_once(LIB_PATH.'PBDO/LobTest.php'); include_once(LIB_PATH.'PBDO/LobTestQst.php'); /** * Hold lob repo entries and lob test entries */ class Lc_Lob_Test extends Lc_Lob { var $type = 'test'; var $questionObjs = array(); var $mime = 'X-LMS/test'; function Lc_Lob_Test($id = 0) { if ($id < 1) { $this->repoObj = new LobRepoEntry(); $this->lobSub = new LobTest(); $this->lobMetaObj = new LobMetadata(); $this->lobMetaObj->createdOn = time(); } else { $this->repoObj = LobRepoEntry::load($id); $tests = $this->repoObj->getLobTestsByLobRepoEntryId(); $this->lobSub = $tests[0]; } } function setTitle($t) { $this->repoObj->set('lobTitle', $t); } function setInstructions($i) { $this->repoObj->set('lobDescription', $i); } function setNotes($n) { $this->repoObj->set('lobNotes', $n); } function addQuestion($qtext, $type = 'QUESTION_ESSAY', $choices = '', $answers = '') { $q = new LobTestQst(); $q->qstText = $qtext; if ( is_array($choices) ) { } $this->questionObjs[] = $q; } function getQuestionCount() { return count($this->questionObjs); } } ?> Index: lc_lob.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/lc_lob.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** lc_lob.php 2 Oct 2007 17:06:36 -0000 1.27 --- lc_lob.php 5 Oct 2007 19:27:37 -0000 1.28 *************** *** 4,9 **** include_once(LIB_PATH.'PBDO/LobMetadata.php'); include_once(LIB_PATH.'PBDO/LobContent.php'); - include_once(LIB_PATH.'PBDO/LobTest.php'); - include_once(LIB_PATH.'PBDO/LobTestQst.php'); include_once(LIB_PATH.'PBDO/LobActivity.php'); --- 4,7 ---- *************** *** 459,500 **** /** - * Hold lob repo entries and lob test entries - */ - class Lc_Lob_Test extends Lc_Lob { - - var $type = 'test'; - var $questionObjs = array(); - var $mime = 'X-LMS/test'; - - function Lc_Lob_Test($id = -1) { - if ($id == -1) { - $this->repoObj = new LobRepoEntry(); - $this->lobSub = new LobTest(); - $this->lobMetaObj = new LobMetadata(); - $this->lobMetaObj->createdOn = time(); - } else { - $this->repoObj = LobRepoEntry::load($id); - $tests = $this->repoObj->getLobTestsByLobRepoEntryId(); - $this->lobSub = $tests[0]; - } - } - - function addQuestion($qtext, $type = 'QUESTION_ESSAY', $choices = '', $answers = '') { - - $q = new LobTestQst(); - $q->qstText = $qtext; - if ( is_array($choices) ) { - } - $this->questionObjs[] = $q; - } - - function getQuestionCount() { - return count($this->questionObjs); - } - } - - - - /** * Hold lob repo entries and lob activity entries */ --- 457,460 ---- |