logicampus-cvs Mailing List for Logicampus
Brought to you by:
trilexcom
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(30) |
Sep
(77) |
Oct
(33) |
Nov
(29) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(36) |
Feb
(33) |
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(3) |
Jul
|
Aug
(2) |
Sep
(8) |
Oct
(1) |
Nov
(136) |
Dec
(30) |
2007 |
Jan
(64) |
Feb
(103) |
Mar
(29) |
Apr
(106) |
May
(185) |
Jun
(75) |
Jul
(3) |
Aug
(16) |
Sep
(154) |
Oct
(164) |
Nov
(26) |
Dec
|
2008 |
Jan
(15) |
Feb
(17) |
Mar
(32) |
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
(4) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
(21) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2010 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: <if...@us...> - 2010-02-26 11:00:28
|
Revision: 1311 http://logicampus.svn.sourceforge.net/logicampus/?rev=1311&view=rev Author: iflaah Date: 2010-02-26 11:00:21 +0000 (Fri, 26 Feb 2010) Log Message: ----------- student evaluation form Modified Paths: -------------- logicampus/trunk/data/pbdo.xml Modified: logicampus/trunk/data/pbdo.xml =================================================================== --- logicampus/trunk/data/pbdo.xml 2010-02-26 10:58:34 UTC (rev 1310) +++ logicampus/trunk/data/pbdo.xml 2010-02-26 11:00:21 UTC (rev 1311) @@ -929,5 +929,84 @@ size="11" type="INTEGER"/> </table> + <table name="evaluation_form"> + <column name="serial_no" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <column name="question" + size="255" + default="NULL" + type="VARCHAR"/> + <column name="visible" + size="1" + required="true" + default="0" + type="TINYINT"/> + <column name="excellent" + size="1" + default="1" + type="TINYINT"/> + <column name="very_good" + size="1" + default="1" + type="TINYINT"/> + <column name="good" + size="1" + default="1" + type="TINYINT"/> + <column name="satisfactory" + size="1" + default="1" + type="TINYINT"/> + <column name="unsatisfactory" + size="1" + default="1" + type="TINYINT"/> + <column name="date_created" + default="NULL" + type="DATETIME"/> + <column name="weightage" + default="0" + type="INTEGER"/> + </table> + <table name="evaluationform_flag"> + <column name="eval_form" + default="NULL" + size="20" + type="VARCHAR"/> + <column name="flag" + default="0" + size="1" + type="BINARY"/> + <column name="start" + default="0000-00-00 00:00:00" + type="DATETIME"/> + <column name="end" + default="0000-00-00 00:00:00" + type="DATETIME"/> + </table> + <table name="student_evaluation_form"> + <column name="id" + default="NULL" + required="true" + size="10" + type="INTEGER"/> + <column name="student_id" + default="0" + required="true" + size="11" + type="INTEGER"/> + <column name="id_classes" + size="11" + type="INTEGER"/> + <column name="serial_no" + size="5" + type="INTEGER"/> + <column name="rank" + size="5" + type="INTEGER"/> + </table> </database> <!-- END OF MYSQL2TURBINE DUMP --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <if...@us...> - 2010-02-26 10:58:41
|
Revision: 1310 http://logicampus.svn.sourceforge.net/logicampus/?rev=1310&view=rev Author: iflaah Date: 2010-02-26 10:58:34 +0000 (Fri, 26 Feb 2010) Log Message: ----------- student evaluation form files Added Paths: ----------- logicampus/trunk/data/evaluation_form.mysql.sql logicampus/trunk/data/evaluationform_flag.mysql.sql logicampus/trunk/data/student_evaluation_form.mysql.sql logicampus/trunk/src/logicreate/lib/EvaluationForm.php logicampus/trunk/src/logicreate/lib/EvaluationformFlag.php logicampus/trunk/src/logicreate/lib/StudentEvaluationForm.php logicampus/trunk/src/logicreate/services/administration/createEvalForm.lcp logicampus/trunk/src/logicreate/services/administration/studentVisibleDates.lcp logicampus/trunk/src/logicreate/services/administration/teacherEvaluation.lcp logicampus/trunk/src/logicreate/services/administration/templates/createEvalForm.html logicampus/trunk/src/logicreate/services/administration/templates/studentVisibleDates.html logicampus/trunk/src/logicreate/services/administration/templates/teacherEvaluation.html logicampus/trunk/src/logicreate/services/classroom/evaluation.lcp logicampus/trunk/src/logicreate/services/classroom/templates/evaluation.html Added: logicampus/trunk/data/evaluation_form.mysql.sql =================================================================== --- logicampus/trunk/data/evaluation_form.mysql.sql (rev 0) +++ logicampus/trunk/data/evaluation_form.mysql.sql 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,21 @@ +-- Dumping SQL for project logicampus +-- entity version: 0.0 +-- DB type: mysql +-- generated on: 02.26.2010 + + +DROP TABLE IF EXISTS `evaluation_form`; +CREATE TABLE `evaluation_form` ( + + `serial_no` integer (11) NOT NULL auto_increment, + `question` varchar (255) NOT NULL, + `visible` tinyint (1) NOT NULL, + `excellent` tinyint (1) NOT NULL, + `very_good` tinyint (1) NOT NULL, + `good` tinyint (1) NOT NULL, + `satisfactory` tinyint (1) NOT NULL, + `unsatisfactory` tinyint (1) NOT NULL, + `date_created` datetime NOT NULL, + `weightage` integer NOT NULL, + PRIMARY KEY (serial_no) +); Added: logicampus/trunk/data/evaluationform_flag.mysql.sql =================================================================== --- logicampus/trunk/data/evaluationform_flag.mysql.sql (rev 0) +++ logicampus/trunk/data/evaluationform_flag.mysql.sql 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,14 @@ +-- Dumping SQL for project logicampus +-- entity version: 0.0 +-- DB type: mysql +-- generated on: 02.26.2010 + + +DROP TABLE IF EXISTS `evaluationform_flag`; +CREATE TABLE `evaluationform_flag` ( + + `eval_form` varchar (20) NOT NULL, + `flag` binary (1) NOT NULL, + `start` datetime NOT NULL, + `end` datetime NOT NULL +); Added: logicampus/trunk/data/student_evaluation_form.mysql.sql =================================================================== --- logicampus/trunk/data/student_evaluation_form.mysql.sql (rev 0) +++ logicampus/trunk/data/student_evaluation_form.mysql.sql 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,15 @@ +-- Dumping SQL for project logicampus +-- entity version: 0.0 +-- DB type: mysql +-- generated on: 02.26.2010 + + +DROP TABLE IF EXISTS `student_evaluation_form`; +CREATE TABLE `student_evaluation_form` ( + + `id` integer (10) NOT NULL, + `student_id` integer (11) NOT NULL, + `id_classes` integer (11) NOT NULL, + `serial_no` integer (5) NOT NULL, + `rank` integer (5) NOT NULL +); Added: logicampus/trunk/src/logicreate/lib/EvaluationForm.php =================================================================== --- logicampus/trunk/src/logicreate/lib/EvaluationForm.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/EvaluationForm.php 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,272 @@ +<? + +class EvaluationFormBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.7'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $serialNo; + var $question; + var $visible; + var $excellent; + var $veryGood; + var $good; + var $satisfactory; + var $unsatisfactory; + var $dateCreated; + var $weightage; + + var $__attributes = array( + 'serialNo'=>'integer', + 'question'=>'varchar', + 'visible'=>'tinyint', + 'excellent'=>'tinyint', + 'veryGood'=>'tinyint', + 'good'=>'tinyint', + 'satisfactory'=>'tinyint', + 'unsatisfactory'=>'tinyint', + 'dateCreated'=>'datetime', + 'weightage'=>'integer'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->serialNo; + } + + + function setPrimaryKey($val) { + $this->serialNo = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(EvaluationFormPeer::doInsert($this,$dsn)); + } else { + EvaluationFormPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + $where = ''; + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "serial_no='".$key."'"; + } + $array = EvaluationFormPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = EvaluationFormPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + EvaluationFormPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class EvaluationFormPeerBase { + + var $tableName = 'evaluation_form'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("evaluation_form",$where); + $st->fields['serial_no'] = 'serial_no'; + $st->fields['question'] = 'question'; + $st->fields['visible'] = 'visible'; + $st->fields['excellent'] = 'excellent'; + $st->fields['very_good'] = 'very_good'; + $st->fields['good'] = 'good'; + $st->fields['satisfactory'] = 'satisfactory'; + $st->fields['unsatisfactory'] = 'unsatisfactory'; + $st->fields['date_created'] = 'date_created'; + $st->fields['weightage'] = 'weightage'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = EvaluationFormPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("evaluation_form"); + $st->fields['serial_no'] = $obj->serialNo; + $st->fields['question'] = $obj->question; + $st->fields['visible'] = $obj->visible; + $st->fields['excellent'] = $obj->excellent; + $st->fields['very_good'] = $obj->veryGood; + $st->fields['good'] = $obj->good; + $st->fields['satisfactory'] = $obj->satisfactory; + $st->fields['unsatisfactory'] = $obj->unsatisfactory; + $st->fields['date_created'] = $obj->dateCreated; + $st->fields['weightage'] = $obj->weightage; + + + $st->key = 'serial_no'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("evaluation_form"); + $st->fields['serial_no'] = $obj->serialNo; + $st->fields['question'] = $obj->question; + $st->fields['visible'] = $obj->visible; + $st->fields['excellent'] = $obj->excellent; + $st->fields['very_good'] = $obj->veryGood; + $st->fields['good'] = $obj->good; + $st->fields['satisfactory'] = $obj->satisfactory; + $st->fields['unsatisfactory'] = $obj->unsatisfactory; + $st->fields['date_created'] = $obj->dateCreated; + $st->fields['weightage'] = $obj->weightage; + + + $st->key = 'serial_no'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("evaluation_form","serial_no = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new EvaluationForm(); + $x->serialNo = $row['serial_no']; + $x->question = $row['question']; + $x->visible = $row['visible']; + $x->excellent = $row['excellent']; + $x->veryGood = $row['very_good']; + $x->good = $row['good']; + $x->satisfactory = $row['satisfactory']; + $x->unsatisfactory = $row['unsatisfactory']; + $x->dateCreated = $row['date_created']; + $x->weightage = $row['weightage']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class EvaluationForm extends EvaluationFormBase { + + + +} + + + +class EvaluationFormPeer extends EvaluationFormPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/EvaluationformFlag.php =================================================================== --- logicampus/trunk/src/logicreate/lib/EvaluationformFlag.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/EvaluationformFlag.php 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,236 @@ +<? + +class EvaluationformFlagBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.7'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $evalForm; + var $flag; + var $start; + var $end; + + var $__attributes = array( + 'evalForm'=>'varchar', + 'flag'=>'binary', + 'start'=>'datetime', + 'end'=>'datetime'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->; + } + + + function setPrimaryKey($val) { + $this-> = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(EvaluationformFlagPeer::doInsert($this,$dsn)); + } else { + EvaluationformFlagPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + $where = ''; + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "='".$key."'"; + } + $array = EvaluationformFlagPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = EvaluationformFlagPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + EvaluationformFlagPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class EvaluationformFlagPeerBase { + + var $tableName = 'evaluationform_flag'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("evaluationform_flag",$where); + $st->fields['eval_form'] = 'eval_form'; + $st->fields['flag'] = 'flag'; + $st->fields['start'] = 'start'; + $st->fields['end'] = 'end'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = EvaluationformFlagPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("evaluationform_flag"); + $st->fields['eval_form'] = $obj->evalForm; + $st->fields['flag'] = $obj->flag; + $st->fields['start'] = $obj->start; + $st->fields['end'] = $obj->end; + + + $st->key = ''; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("evaluationform_flag"); + $st->fields['eval_form'] = $obj->evalForm; + $st->fields['flag'] = $obj->flag; + $st->fields['start'] = $obj->start; + $st->fields['end'] = $obj->end; + + + $st->key = ''; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("evaluationform_flag"," = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new EvaluationformFlag(); + $x->evalForm = $row['eval_form']; + $x->flag = $row['flag']; + $x->start = $row['start']; + $x->end = $row['end']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class EvaluationformFlag extends EvaluationformFlagBase { + + + +} + + + +class EvaluationformFlagPeer extends EvaluationformFlagPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/StudentEvaluationForm.php =================================================================== --- logicampus/trunk/src/logicreate/lib/StudentEvaluationForm.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/StudentEvaluationForm.php 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,242 @@ +<? + +class StudentEvaluationFormBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.7'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $id; + var $studentId; + var $idClasses; + var $serialNo; + var $rank; + + var $__attributes = array( + 'id'=>'integer', + 'studentId'=>'integer', + 'idClasses'=>'integer', + 'serialNo'=>'integer', + 'rank'=>'integer'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->; + } + + + function setPrimaryKey($val) { + $this-> = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(StudentEvaluationFormPeer::doInsert($this,$dsn)); + } else { + StudentEvaluationFormPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + $where = ''; + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "='".$key."'"; + } + $array = StudentEvaluationFormPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = StudentEvaluationFormPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + StudentEvaluationFormPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class StudentEvaluationFormPeerBase { + + var $tableName = 'student_evaluation_form'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("student_evaluation_form",$where); + $st->fields['id'] = 'id'; + $st->fields['student_id'] = 'student_id'; + $st->fields['id_classes'] = 'id_classes'; + $st->fields['serial_no'] = 'serial_no'; + $st->fields['rank'] = 'rank'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = StudentEvaluationFormPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("student_evaluation_form"); + $st->fields['id'] = $obj->id; + $st->fields['student_id'] = $obj->studentId; + $st->fields['id_classes'] = $obj->idClasses; + $st->fields['serial_no'] = $obj->serialNo; + $st->fields['rank'] = $obj->rank; + + + $st->key = ''; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("student_evaluation_form"); + $st->fields['id'] = $obj->id; + $st->fields['student_id'] = $obj->studentId; + $st->fields['id_classes'] = $obj->idClasses; + $st->fields['serial_no'] = $obj->serialNo; + $st->fields['rank'] = $obj->rank; + + + $st->key = ''; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("student_evaluation_form"," = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new StudentEvaluationForm(); + $x->id = $row['id']; + $x->studentId = $row['student_id']; + $x->idClasses = $row['id_classes']; + $x->serialNo = $row['serial_no']; + $x->rank = $row['rank']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class StudentEvaluationForm extends StudentEvaluationFormBase { + + + +} + + + +class StudentEvaluationFormPeer extends StudentEvaluationFormPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/services/administration/createEvalForm.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/administration/createEvalForm.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/createEvalForm.lcp 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,183 @@ +<?php +/* + * Created on Oct 15, 2009 + */ + + +include_once(LIB_PATH.'rss/simplepie.php'); +//include_once(LIB_PATH.'lc_enrollment.php'); +//include_once(LIB_PATH.'lc_class.php'); + + +class createEvalForm extends AdminService +{ + + var $presentor = "htmlPresentation"; + var $cleanedArray = array(); # used for forms + var $authorizer = 'NoAuth'; + + // links + var $sectionTitle = 'Create Evaluation Form'; + var $navlinks = array( + 'Administration Home' => '' + ); + var $applinks = array( + 'Student Visible Dates' => 'studentVisibleDates/' + ); + + + function run($db,&$u,&$lc,&$t) + { + + + $this->sectionTitle = 'Create Evaluation Form'; + $this->inactivelinks = array( 'Create Evaluation Form' ); + $lc->templateName='createEvalForm'; + + $evalFlag=0; + $db->query("select flag from evaluationform_flag where eval_form='form1' and flag='1'"); + if($db->nextRecord()) + { + $evalFlag=$db->record['flag']; + } + + $questions=array(); + + $db->query("select * from evaluation_form"); + While($db->nextRecord()) + { + array_push($questions,$db->record); + + } + + $db->query("select sum(weightage) as sum from evaluation_form"); + if($db->nextRecord()) + { + $sum=$db->record['sum']; + } + if($sum == 100) + { + $t['flag']=1; + } + + $t['evalFlag']=$evalFlag; + $t['question']=$questions; + } + + function addQuestionRun($db,&$u,&$lc,&$t) + { + + $quest=$lc->postvars['question']; + $per=$lc->postvars['percentage']; + $fleeg=0; + + $serial=$lc->postvars['hiddenserial']; + + $db->query("select * from evaluation_form where serial_no='$serial'"); + if($db->nextRecord()) + { + $alreadyQuest=$db->record['weightage']; + $fleeg=1; + + } + + $db->query("select sum(weightage) as sum from evaluation_form"); + if($db->nextRecord()) + { + $sum=$db->record['sum']; + } + if($fleeg) + { + $sum=$sum-$alreadyQuest; + } + $sum=$sum+$per; + + + if($sum > 100) + { + $t['srno'] = $serial; + $t['tempQuest']=$quest; + $t['error']="The limit to 100% has been acceded!"; + $t['msg']="Please, re-enter percentage for the question."; + } + else + { + if($sum == 100) + { + $t['msg']="The limit to 100% has been achieved."; + $t['flag']=1; + } + + if($fleeg) + { + $db->query("delete from evaluation_form where serial_no='$serial'"); + + } + + $db->query("insert into evaluation_form (question,date_created,weightage)values('$quest',sysdate(),'$per')"); + $t['msg']="Added Successfully"; + + $serial=0; + } + + $this->run($db,&$u,&$lc,&$t); + } + + function updateRun($db,&$u,&$lc,&$t) + { + + $data=explode('.',$lc->getvars['data']); + $column=$data[2]; + if($data[1]) + { + $db->query("update evaluation_form set $data[2]='0' where serial_no='$data[0]'"); + } + else + { + $db->query("update evaluation_form set $data[2]='1' where serial_no='$data[0]'"); + } + $this->run($db,&$u,&$lc,&$t); + + } + + function finalRun($db,&$u,&$lc,&$t) + { + $db->query("update evaluationform_flag SET flag='1' where eval_form='form1'"); + + $t['msg']="Sucessfully Finalized."; + $this->run($db,&$u,&$lc,&$t); + } + + function deleteRun($db,&$u,&$lc,&$t) + { + $sno=$lc->getvars['id']; + + $db->query("delete from evaluation_form where serial_no='$sno'"); + $this->run($db,&$u,&$lc,&$t); + } + + + function editQuestionRun($db,&$u,&$lc,&$t) + { + $sno=$lc->getvars['id']; + + $db->query("select question,weightage,serial_no from evaluation_form where serial_no='$sno'"); + if($db->nextRecord()) + { + $quest=$db->record['question']; + $weight=$db->record['weightage']; + $sno=$db->record['serial_no']; + } + + $t['tempQuest']=$quest; + $t['weight']=$weight; + $t['srno']=$sno; + + $this->run($db,&$u,&$lc,&$t); + } + + + +} + +?> Added: logicampus/trunk/src/logicreate/services/administration/studentVisibleDates.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/administration/studentVisibleDates.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/studentVisibleDates.lcp 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,63 @@ +<?php +/* + * Created on Dec 1, 2009 + */ + + include_once(LIB_PATH.'rss/simplepie.php'); + + +class studentVisibleDates extends AdminService +{ + + var $presentor = "htmlPresentation"; + var $cleanedArray = array(); # used for forms + var $authorizer = 'NoAuth'; + + // links + var $sectionTitle = 'Student Visible Dates'; + var $navlinks = array( + 'Administration Home' => '' + ); + var $applinks = array( + 'Create Evaluation Form' => 'createEvalForm/' + ); + + + function run($db,&$u,&$lc,&$t) + { + + $this->sectionTitle = 'Student Visible Dates'; + $this->inactivelinks = array( 'Student Visible Dates' ); + $lc->templateName='studentVisibleDates'; + + $db->query("select DATE_FORMAT(start,'%M,%e,%Y')as sdate,DATE_FORMAT(end,'%M,%e,%Y') as edate from evaluationform_flag where flag='1' and eval_form='form1'"); + if($db->nextRecord()) + { + $start=$db->record['sdate']; + $end=$db->record['edate']; + } + + $sdate=explode(',',$start); + $edate=explode(',',$end); + + $t['sdate']=$sdate; + $t['edate']=$edate; + + } + + function dateRun($db,&$u,&$lc,&$t) + { + $dateStart=$lc->postvars['dateStart']['year']. '-'.$lc->postvars['dateStart']['month']. '-'. $lc->postvars['dateStart']['day']; + $dateEnd=$lc->postvars['dateEnd']['year']. '-'.$lc->postvars['dateEnd']['month']. '-'. $lc->postvars['dateEnd']['day']; + + $db->query("update evaluationform_flag set start='".addslashes($dateStart)."',end='".addslashes($dateEnd)."' where eval_form='form1' and flag='1'"); + + $t['msg']="Successfully Set."; + + $this->run($db,&$u,&$lc,&$t); + } + +} + + +?> Added: logicampus/trunk/src/logicreate/services/administration/teacherEvaluation.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/administration/teacherEvaluation.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/teacherEvaluation.lcp 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,183 @@ +<?php +/* + * Created on Dec 15, 2009 + * + */ + + +class teacherEvaluation extends AdminService +{ + + var $presentor = "htmlPresentation"; + var $cleanedArray = array(); # used for forms + var $authorizer = 'NoAuth'; + + // links + var $sectionTitle = 'Teacher Evaluation'; + var $navlinks = array('Administration Home' => ''); + //var $applinks = array('Student Visible Dates' => 'studentVisibleDates/'); + + + + function run($db,&$u,&$lc,&$t) + { + + $this->sectionTitle = 'Teacher Evaluation'; + $this->inactivelinks = array( 'Teacher Evaluation' ); + $lc->templateName='teacherEvaluation'; + + $semRecord=array(); + + $db->query("select * from semesters"); + while($db->nextRecord()) + { + array_push($semRecord,$db->record); + } + + + + $t['semRecord']=$semRecord; + + } + + function teacherRun($db,&$u,&$lc,&$t) + { + + $semesterId=$lc->postvars['semester']; + + $semesterEx=explode('.',$semesterId); + + $id=array(); + $names=array(); + $s=$semesterEx[0]; + $db->query("select c.*,concat(p.firstname,' ',p.lastname) as name from classes as c, profile as p " . + "where c.id_semesters='$s' and c.facultyId=p.username order by p.firstname"); + while($db->nextRecord()) + { + array_push($id,$db->record); + array_push($names,$db->record['name']); + } + + $t['semesterSel']=$semesterEx[1]." ".$semesterEx[2]; + $t['flog']=1; + $t['ids']=$id; + $t['names']=$names; + $t['semesterId']=$semesterId; + + + $this->run($db,&$u,&$lc,&$t); + } + + function recordRun($db,&$u,&$lc,&$t) + { + $flag=1; + + $rec=$lc->getvars['rec']; + $rec=explode('|',$rec); + $semRecord=array(); + + $db->query("select c.*,s.id_semesters, s.semesterTerm,s.semesterYear,concat(p.firstname,' ',p.lastname) as name " . + "from classes c,semesters s,profile p " . + "where s.id_semesters=c.id_semesters and p.username=c.facultyId" . + " and c.facultyId='".$rec[2]."' and c.id_courses='".$rec[1]."' and c.id_classes='".$rec[0]."'"); + + + if($db->nextRecord()) + { + $header=$db->record; + } + + $t['header']=$header; + $t['flag']=$flag; + + $this->evaluationRun($db,&$u,&$lc,&$t,$header[id_semesters],$header[id_classes]); + + $lc->postvars['semester'] = $rec[3]; + $this->teacherRun($db,&$u,&$lc,&$t); + + } + + function evaluationRun($db,&$u,&$lc,&$t,$id_semester,$id_classes) + { + + //getting the serial number of questions and their respective weightage + $evalForm=array(); + $countEval=0; + + $db->query("select * from evaluation_form"); + while($db->nextRecord()) + { + array_push($evalForm,$db->record); + $countEval++; + } + + $option=array(); + foreach($evalForm as $e) + { + if($e['excellent']) + $option[$e[serial_no]][count]++; + if($e['very_good']) + $option[$e[serial_no]][count]++; + if($e['good']) + $option[$e[serial_no]][count]++; + if($e['satisfactory']) + $option[$e[serial_no]][count]++; + if($e['unsatisfactory']) + $option[$e[serial_no]][count]++; + + } + + + //getting the data(ids of students) from student_evaluation_form + $totalStud=0; + $studIds=array(); + $db->query("select * from student_evaluation_form where id_classes='$id_classes' group by student_id"); + while($db->nextRecord()) + { + array_push( $studIds,$db->record); + $totalStud++; + } + + $score=0; + $rep=array(); + foreach($evalForm as $e) + { + + $score=0; + foreach($studIds as $id) + { + $db->query("select rank from student_evaluation_form " . + "where id_classes='$id_classes' and serial_no='".$e[serial_no]."' and student_id='".$id[student_id]."'"); + if($db->nextRecord()) + { + $score=$score+$db->record['rank']; + } + } + $rep[$e[serial_no]]=$score; + + } + + + $average=array(); + $i=0; + foreach($evalForm as $e) + { + $val=0; + $val=$e[weightage]/$option[$e[serial_no]][count]; + $average[$i]=($rep[$e[serial_no]] * $val)/($totalStud * $e[weightage]); + $i++; + } + + $t['average']=$average; + $t['fleeg']=1; + $t['flog']=1; + + } +} + + + +?> + + + Added: logicampus/trunk/src/logicreate/services/administration/templates/createEvalForm.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/createEvalForm.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/createEvalForm.html 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,189 @@ +<?=$t['sectionheader'];?> + +<?php if ( $t['msg'] ) { ?> + <p style="color:blue;"><?=$t['msg'];?></p> +<?php } ?> +<?php if ( $t['error'] ) { ?> + <p style="color:red;"><?=$t['error'];?></p> +<?php } ?> + + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> +<!-- + * Created on Oct 15, 2009 + --> + <head> + <title>createEvalForm</title> + <script language="JavaScript" type="text/javascript"> + + + function checkQuestion() + { + var quest=document.getElementById("question").value; + //alert("hello"+quest); + + if( quest == 0 ) + { + alert("Write in a question and then press submit button."); + return false; + } + else + { + var reply=confirm("Are you sure to submit the following questions?\n"+quest); + if(reply) + { + return true; + } + return false; + } + + } + + function confirmFinal() + { + var reply=confirm("Are you sure to finalise the questions?"); + if(reply) + { + return true; + } + return false; + } + + function check(e) + { + var key; + var keychar; + + if (window.event) + key = window.event.keyCode; + keychar = String.fromCharCode(key); + + if ((("0123456789").indexOf(keychar) > -1)) + return true; + else + return false; + } + + function deleteQuestion() + { + var reply=confirm("Are you sure to delete the question?"); + if(reply) + { + return true; + } + return false; + } + + + + </script> + + </head> + <body> + <? if($t['flag']== 0){?> + <form method="post" action="<?=appurl('administration/createEvalForm/event=addQuestion')?>" name="questForm" onSubmit="return checkQuestion();"> + <table> + <tr> + <!--<td><strong>Put your questions<strong></td>--> + </tr> + <tr><td> </td></tr> + <tr> + <td><strong>Question:<strong></td> + <td><textarea name="question" rows="4" cols="20" id="question"><?=$t['tempQuest']?></textarea></td> + <td>Please, enter question.</td> + </tr> + <tr> + <td><strong>Weightage:<strong></td> + <td><input type="text" name="percentage" value="<?=$t['weight']?>" onKeyPress="return check(event);"></td> + <td>Please, provide the percentage of this question. (Note: Overall percentage is 100%)</td> + </tr> + <tr><td> </td></tr> + <input type="hidden" name="hiddenserial" value="<?=$t['srno']?>"/> + <tr><td><input type="submit" value="Submit" /></td></tr> + <tr><td> </td></tr> + </table> + </form> + <?}?> + <?php + + $questions=$t['question']; + $i=1; + + ?> + + <hr> + <form action="<?= appurl('administration/createEvalForm/event=final')?>" method="post" name="viewForm"> + <table border=1> + + <tr> + <td><strong>Question No.</strong></td> + <td><strong>Question</strong></td> + <td><strong>Weight</strong></td> + <?if($t['evalFlag'] == 0){?> + <td><strong>Excellent</strong></td> + <td><strong>Very Good</strong></td> + <td><strong> Good </strong></td> + <td><strong>Satisfactory</strong></td> + <td><strong>Unatisfactory</strong></td> + <?}?> + <!--<td> </td>--> + <!--<td><strong>Visibility</strong></td>--> + </tr> + + <? + foreach($questions as $q) + { + print_r("<tr>"); + //print_r("<td>".$i."</td>"); + ?> + <td align="center"><?=$i?></td> + <input type="hidden" name="hiddensn<?=$i?>" value="<?=$q[serial_no]?>"/> + <!--<td><input type="text" name="qn<?=$i?>" value="<?=$q[question]?>" readonly></td>--> + <td><?=$q[question]?></td> + <!--<td align="center"><input type="text" name="weight<?=$i?>" value="<?=$q[weightage]?>" size="4" readonly"/></td>--> + <td><?=$q[weightage]?></td> + <?if($t['evalFlag'] == 0){?> + <td align="center"><a href="createEvalForm/event=update/data=<?=$q[serial_no].".".$q[excellent]."."."excellent"?>"><?if($q[excellent]){echo "delete";}else{echo "add";}?></a></td> + <td align="center"><a href="createEvalForm/event=update/data=<?=$q[serial_no].".".$q[very_good]."."."very_good"?>"><?if($q[very_good]){echo "delete";}else{echo "add";}?></a></td> + <td align="center"><a href="createEvalForm/event=update/data=<?=$q[serial_no].".".$q[good]."."."good"?>"><?if($q[good]){echo "delete";}else{echo "add";}?></a></td> + <td align="center"><a href="createEvalForm/event=update/data=<?=$q[serial_no].".".$q[satisfactory]."."."satisfactory"?>"><?if($q[satisfactory]){echo "delete";}else{echo "add";}?></a></td> + <td align="center"><a href="createEvalForm/event=update/data=<?=$q[serial_no].".".$q[unsatisfactory]."."."unsatisfactory"?>"><?if($q[unsatisfactory]){echo "delete";}else{echo "add";}?></a></td> + <td align="center"><a href="createEvalForm/event=editQuestion/id=<?=$q[serial_no]?>">edit</a> / <a href="createEvalForm/event=delete/id=<?=$q[serial_no]?>" onClick="return deleteQuestion();">delete</a></td> + <?}?> + <!-- <td align="center"><input type="checkbox" name="visibility[]" id="visibility" value="<?=$i?>" --><?//if($q[visible]){echo "checked";}?> + + <? print_r("</tr>"); + $i++; + $k++; + } + + ?> + + </table> + + <!--<table> + <tr><td> </td></tr> + <tr> + <td width="300"> <td> + <td><input type="submit" name="submitWeight" value="Submit"/></td> + </tr> + </table> --> + <table> + <tr><td> </td></tr> + <tr><td> </td></tr> + <tr> + <td> </td> + <td> </td> + <?if($t['flag'] != 0){?> + <td><input type="submit" name="finalized" value="Finalize and make it visible to students" onClick="return confirmFinal()"/></td> + <?}else{?> + <td><input type="submit" name="finalized" value="Finalize and make it visible to students" disabled/></td> + <?}?> + <td>Note: You can finalize only when, overall weightage, 100% is completely distributed.</td> + </tr> + + </table> + </form> + </body> + +</html> Added: logicampus/trunk/src/logicreate/services/administration/templates/studentVisibleDates.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/studentVisibleDates.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/studentVisibleDates.html 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,216 @@ +<?=$t['sectionheader'];?> + +<?php if ( $t['msg'] ) { ?> + <p style="color:blue;"><?=$t['msg'];?></p> +<?php } ?> +<?php if ( $t['error'] ) { ?> + <p style="color:red;"><?=$t['error'];?></p> +<?php } ?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> +<!-- + * Created on Dec 1, 2009 + --> + <head> + <title> </title> + </head> + <body> + <?php + $sdate=array(); + $edate=array(); + $sdate=$t['sdate']; + $edate=$t['edate']; + ?> + + <form action="<?=appurl('administration/studentVisibleDates/event=date')?>" method="post" name="dateForm"> + <table> + <tr><td colspan="2" valign="top" class="tabletitle">Visibility Dates</td></tr> + <tr><td colspan="2" valign="top" class="instructions">instructions: Enter the begining and ending date for the visibility of the form. +</td></tr> + + <tr><td valign="top" class="">Visibility Start Date</td><td valign="top" class=""> +<select name='dateStart[month]'> + <?if($sdate[0] == "January" ){?> + <option value="1" SELECTED>January</option> + <?}else{?> + <option value="1">January</option> + <?}if($sdate[0] == "February"){?> + <option value="2" SELECTED>February</option> + <?}else{?> + <option value="2">February</option> + <?}if($sdate[0] == "March"){?> + <option value="3" SELECTED>March</option> + <?}else{?> + <option value="3">March</option> + <?}if($sdate[0] == "April"){?> + <option value="4" SELECTED>April</option> + <?}else{?> + <option value="4">April</option> + <?}if($sdate[0] == "May"){?> + <option value="5" SELECTED>May</option> + <?}else{?> + <option value="5">May</option> + <?}if($sdate[0] == "June"){?> + <option value="6" SELECTED>June</option> + <?}else{?> + <option value="6">June</option> + <?}if($sdate[0] == "July"){?> + <option value="7" SELECTED>July</option> + <?}else{?> + <option value="7">July</option> + <?}if($sdate[0] == "August"){?> + <option value="8" SELECTED>August</option> + <?}else{?> + <option value="8">August</option> + <?}if($sdate[0] == "September"){?> + <option value="9" SELECTED>September</option> + <?}else{?> + <option value="9">September</option> + <?}if($sdate[0] == "October"){?> + <option value="10" SELECTED>October</option> + <?}else{?> + <option value="10">October</option> + <?}if($sdate[0] == "November"){?> + <option value="11" SELECTED>November</option> + <?}else{?> + <option value="11">November</option> + <?}if($sdate[0] == "December"){?> + <option value="12" SELECTED>December</option> + <?}else{?> + <option value="12">December</option> + <?}?> +</select> + +<select name='dateStart[day]'> +<?php + + for($i=1;$i<=31;$i++) + { + if($sdate[1] == $i) + { + print_r("<option value=".$i." SELECTED>".$i."</option>"); + } + else + { + print_r("<option value=".$i.">".$i."</option>"); + } + } +?> +</select> +<select name='dateStart[year]'> +<?php + + for($j=2009;$j<=2020;$j++) + { + if($sdate[2] == $j) + { + print_r("<option value=".$j." SELECTED>".$j."</option>"); + } + else + { + print_r("<option value=".$j.">".$j."</option>"); + } + } +?> +</select> + +</td> +</tr> + +<tr><td valign="top" class="">Visibility End Date</td><td valign="top" class=""> +<select name='dateEnd[month]'> + <?if($edate[0] == "January" ){?> + <option value="1" SELECTED>January</option> + <?}else{?> + <option value="1">January</option> + <?}if($edate[0] == "February"){?> + <option value="2" SELECTED>February</option> + <?}else{?> + <option value="2">February</option> + <?}if($edate[0] == "March"){?> + <option value="3" SELECTED>March</option> + <?}else{?> + <option value="3">March</option> + <?}if($edate[0] == "April"){?> + <option value="4" SELECTED>April</option> + <?}else{?> + <option value="4">April</option> + <?}if($edate[0] == "May"){?> + <option value="5" SELECTED>May</option> + <?}else{?> + <option value="5">May</option> + <?}if($edate[0] == "June"){?> + <option value="6" SELECTED>June</option> + <?}else{?> + <option value="6">June</option> + <?}if($edate[0] == "July"){?> + <option value="7" SELECTED>July</option> + <?}else{?> + <option value="7">July</option> + <?}if($edate[0] == "August"){?> + <option value="8" SELECTED>August</option> + <?}else{?> + <option value="8">August</option> + <?}if($edate[0] == "September"){?> + <option value="9" SELECTED>September</option> + <?}else{?> + <option value="9">September</option> + <?}if($edate[0] == "October"){?> + <option value="10" SELECTED>October</option> + <?}else{?> + <option value="10">October</option> + <?}if($edate[0] == "November"){?> + <option value="11" SELECTED>November</option> + <?}else{?> + <option value="11">November</option> + <?}if($edate[0] == "December"){?> + <option value="12" SELECTED>December</option> + <?}else{?> + <option value="12">December</option> + <?}?> +</select> +<select name='dateEnd[day]'> +<?php + + for($i=1;$i<=31;$i++) + { + if($edate[1] == $i) + { + print_r("<option value=".$i." SELECTED>".$i."</option>"); + } + else + { + print_r("<option value=".$i.">".$i."</option>"); + } + } +?> +</select> + +<select name='dateEnd[year]'> +<?php + + for($j=2009;$j<=2020;$j++) + { + if($edate[2] == $j) + { + print_r("<option value=".$j." SELECTED>".$j."</option>"); + } + else + { + print_r("<option value=".$j.">".$j."</option>"); + } + } +?> +</select> +</td> +</tr> +<tr><td> </td></tr> +<tr><td><input type="submit" name="submit" value="Submit"/></td></tr> + + </table> + </form> + </body> +</html> Added: logicampus/trunk/src/logicreate/services/administration/templates/teacherEvaluation.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/teacherEvaluation.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/teacherEvaluation.html 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,161 @@ +<?=$t['sectionheader'];?> + +<?php if ( $t['msg'] ) { ?> + <p style="color:blue;"><?=$t['msg'];?></p> +<?php } ?> +<?php if ( $t['error'] ) { ?> + <p style="color:red;"><?=$t['error'];?></p> +<?php } ?> + + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> +<!-- + * Created on Dec 15, 2009 + --> + <head> + <title>Teacher Evaluation</title> + </head> + <script language="JavaScript" type="text/javascript"> + + function reDirect(rec) + { + + window.location="../teacherEvaluation/event=record/rec="+rec; + + } + + </script> + + <body> + <?php + $semRecord=$t['semRecord']; + + ?> + <form action="<?= appurl('administration/teacherEvaluation/event=teacher')?>" method="post" name="formSemester"> + <table> + <tr> + <td><strong>View Evaluation :</strong></td> + <td><select name="semester"> + <?php + + foreach($semRecord as $sem) + { + + if($t['semesterSel']==$sem[semesterTerm]." ".$sem[semesterYear]){?> + + <option value="<?=$sem[id_semesters].".".$sem[semesterTerm].".".$sem[semesterYear]?>" Selected><?=$sem[semesterTerm]." ".$sem[semesterYear]?></option> + <?}else{?> + <option value="<?=$sem[id_semesters].".".$sem[semesterTerm].".".$sem[semesterYear]?>"><?=$sem[semesterTerm]." ".$sem[semesterYear]?></option> + <?} + }?> + </select></td> + </tr> + <tr><td> </td></tr> + <tr> + <td> </td> + <td><input type="submit" name="submit" value="Get List"/></td> + </tr> + </table> + </form> + + + <?php + $names=$t['names']; + $ids=$t['ids']; + $semId=$t['semesterId']; + $i=0; + + if($t['flog']){ + ?> + <hr> + <form action="<?=appurl('administration/teacherEvaluation/event=record')?>" method="post" name="formRecord"> + <table> + <tr> + <td><strong>Serial No.</strong></td> + <td><strong>Name</strong></td> + </tr> + <?php + $i=1; + foreach($names as $n) + { + print_r("<tr><td align=\"center\">".$i."</td>"); + print_r("<td>".$n."</td>"); + ?> + <td><input type="button" name="view" value="view" onClick="<?echo "reDirect('".$ids[$i-1][id_classes]."|".$ids[$i-1][id_courses]."|".$ids[$i-1][facultyId]."|".$semId."')";?>"/></td></tr> + <? + $i++; + }?> + </tr> + </table> + </form> + + + + <?php + } + $header=$t['header']; + + if ($t['flag']){ + ?> + + <hr> + <table> + <tr> + <td>Semester: <strong><?=$header[semestserTerm]." ".$header[semesterTear]?></strong></td> + <td width="850"> </td> + <td>Instructor Name: <strong><?=$header[name]?></strong></td> + </tr> + <tr> + <td>Course: <strong><?=$header[courseFamilyNumber]?></strong></td> + <td width="850"> </td> + <td>Section Number: <strong><?=$header[sectionNumbers]?></strong></td> + </tr> + <tr> + <td>Clsss Id: <strong><?=$header[id_classes]?></strong></td> + </tr> + </table> + + <?}?> + <br> + <?php + $average=$t['average']; + $overall=array(); + $i=1; + if($t['fleeg']){ + ?> + + <table> + <tr> + <td><strong>Questions</strong></td> + <td> </td> + <td><strong>Percentage</strong></td> + </tr> + <?php + foreach($average as $a) + { + ?> + <tr> + <td align="center">Q<?=$i?></strong></td> + <td align="center">----------------</td> + <? + $overall[$i-1]=($a * 100); + ?> + <td align="center"><?=round($overall[$i-1],2)?></td> + </tr> + <? $i++; + }?> + + <tr><td> </td></tr> + <tr> + <td><strong>Overall Percentage:<strong></td> + <td><strong><?= round(array_sum($overall)/($i-1),2)?>%</strong></td> + <tr> + + </table> + + <?}?> + </body> +</html> Added: logicampus/trunk/src/logicreate/services/classroom/evaluation.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/classroom/evaluation.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/classroom/evaluation.lcp 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,99 @@ +<?php +/* + * Created on Dec 4, 2009 + */ + + + class evaluation extends StudentService + { + + var $presentor='htmlPresentation'; + + var $sectionTitle = 'Evaluation'; + var $inactivelinks = array('Evaluation'); + + function run(&$db,&$u,&$lc,&$t) + { + $lc->templateName='evaluation'; + + $flag=0; + $today=date("Y-m-d",time()); + + $db->query("SELECT * FROM evaluationform_flag WHERE flag='1' AND eval_form='form1'" . + "AND (START<'".$today."' AND END>'".$today."') " . + "OR(START='".$today."' OR END='".$today."')"); + if($db->nextRecord()) + { + $flag=1; + } + + if($flag == 1) + { + + $classId=$u->activeClassTaken->id_classes; + $userId=$u->userId; + + $record=array(); + + $db->query("select * from student_evaluation_form where id_classes='$classId' and student_id='$userId'"); + while($db->nextRecord()) + { + array_push($record,$db->record); + } + + $quests=array(); + $db->query("select * from evaluation_form"); + while($db->nextRecord()) + { + array_push($quests,$db->record); + } + + $t['quests']=$quests; + $t['record']=$record; + $t['flag']=$flag; + + + } + else + { + $t['msg']="Sorry, the form can not be visible to you in the current dates."; + } + + } + + function evaluateRun(&$db,&$u,&$lc,&$t) + { + + $classId=$u->activeClassTaken->id_classes; + $userId=$u->userId; + + $totalQuest=$lc->postvars['hidden']; + + for($i=1;$i<=$totalQuest;$i++) + { + $value=$lc->postvars['quest'.$i]; + $value=explode('.',$value); + + $db->query("select * from student_evaluation_form " . + "where id_classes='$classId' and serial_no='$value[2]' and student_id='$userId'"); + if($db->nextRecord()) + { + + $db->query("update student_evaluation_form set rank='$value[0]' where id_classes='$classId' " . + "and student_id='$userId' and serial_no='$value[2]'"); + + } + else + { + $db->query("insert into student_evaluation_form (student_id,id_classes,serial_no,rank)" . + "values('$userId','$classId','$value[2]','$value[0]')"); + } + + } + + $t['msg']="Sucessfully saved."; + $this->run(&$db,&$u,&$lc,&$t); + } + } + +?> Added: logicampus/trunk/src/logicreate/services/classroom/templates/evaluation.html =================================================================== --- logicampus/trunk/src/logicreate/services/classroom/templates/evaluation.html (rev 0) +++ logicampus/trunk/src/logicreate/services/classroom/templates/evaluation.html 2010-02-26 10:58:34 UTC (rev 1310) @@ -0,0 +1,111 @@ +<?=$t['sectionheader'];?> + +<?php if ( $t['msg'] ) { ?> + <p style="color:blue;"><?=$t['msg'];?></p> +<?php } ?> +<?php if ( $t['error'] ) { ?> + <p style="color:red;"><?=$t['error'];?></p> +<?php } ?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> +<!-- + * Created on Dec 4, 2009 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates +--> + <head> + <title>evaluation form</title> + + <script language="JavaScript" type="text/javascript"> + function checkQuestion(i) + { + var k = 0; + for(k=1; k < i; k++) + { + var flag = false; + for (var l=0; l < 5; l++) + { + var ques = document.getElementById('quest'+k+l).checked; + if(ques) + { + flag = true; + break; + } + } + if(!flag) + { + alert("Select At Least One Choice From Each Question"); + return false; + } + + } + document.getElementById("form1").submit(); + } + + </script> + + </head> + <body> + <?php + $quests=$t['quests']; + $record=$t['record']; + ?> + + <form action="<?=appurl('classroom/evaluation/event=evaluate')?>" method="post" name="form1" id="form1"> + <?php if($t['flag'] == 1){?> + <table border='1'> + <tr> + <td><strong>Question No.</strong></td> + <td><strong>Question</strong></td> + <td><strong>Excellent</strong></td> + <td><strong>Very Good</strong></td> + <td><strong>Good</strong></td> + <td><strong>Satisfactory</strong></td> + <td><strong>Unsatisfactory</strong></td> + </tr> + + + <?php + $i=1; + foreach($quests as $q) + { + $j = 0; + ?> + <tr> + <td align="center"><?=$i?></td> + <td><?=$q[question]?></td> + <td align="center"><input type="radio" name="quest<?=$i?>" id = "quest<?=$i.$j?>" value="5.excellent.<?=$q[serial_no]?>" <?if($q[excellent]== 0){echo "DISABLED";} if($record[$i-1][rank] == 5){echo "CHECKED";}?>/></td> + <?$j++?> + <td align="center"><input type="radio" name="quest<?=$i?>" id = "quest<?=$i.$j?>" value="4.verygood.<?=$q[serial_no]?>" <?if($q[very_good]== 0){echo "DISABLED";}if($record[$i-1][rank] == 4){echo "CHECKED";}?>/></td> + <?$j++?> + <td align="center"><input type="radio" name="quest<?=$i?>" id = "quest<?=$i.$j?>" value="3.good.<?=$q[serial_no]?>" <?if($q[good]== 0){echo "DISABLED";}if($record[$i-1][rank] == 3){echo "CHECKED";}?>/></td> + <?$j++?> + <td align="center"><input type="radio" name="quest<?=$i?>" id = "quest<?=$i.$j?>" value="2.satisfactory.<?=$q[serial_no]?>" <?if($q[satisfactory]== 0){echo "DISABLED";}if($record[$i-1][rank] == 2){echo "CHECKED";}?>/></td> + <?$j++?> + <td align="center"><input type="radio" name="quest<?=$i?>" id = "quest<?=$i.$j?>" value="1.unsatisfactory.<?=$q[serial_no]?>" <?if($q[unsatisfactory]== 0){echo "DISABLED";}if($record[$i-1][rank] == 1){echo "CHECKED";}?>/></td> + </tr> + <? + $i++; + } + + ?> + + </table> + <table> + <input type="hidden" name="hidden" value="<?=$i-1?>"/> + <tr><td> </td></tr> + <tr> + <td> </td> + <td> </td> + <td><input type="button" name="submitBtn" value="Save" onClick = "return checkQuestion(<?=$i?>)"/></td> + </tr> + </table> + <?}?> + </form> + + </body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <if...@us...> - 2010-02-26 07:17:49
|
Revision: 1309 http://logicampus.svn.sourceforge.net/logicampus/?rev=1309&view=rev Author: iflaah Date: 2010-02-26 07:17:39 +0000 (Fri, 26 Feb 2010) Log Message: ----------- entires ordering Modified Paths: -------------- logicampus/trunk/src/logicreate/lib/ClassGradebook.php logicampus/trunk/src/logicreate/lib/ClassGradebookVal.php Property Changed: ---------------- logicampus/trunk/src/public_html/images/ logicampus/trunk/src/public_html/images/docs/ logicampus/trunk/src/public_html/images/mimetypes/ Modified: logicampus/trunk/src/logicreate/lib/ClassGradebook.php =================================================================== --- logicampus/trunk/src/logicreate/lib/ClassGradebook.php 2009-11-03 10:29:53 UTC (rev 1308) +++ logicampus/trunk/src/logicreate/lib/ClassGradebook.php 2010-02-26 07:17:39 UTC (rev 1309) @@ -347,15 +347,14 @@ $where .= ' and id_class_gradebook_categories="'.$this->filterCategory.'"'; if ( !$getUnpublished ) $where .= ' and publish_flag=1'; - + $where.=' order by rank'; $entries = ClassGradebookEntriesPeer::doSelect( $where ); - //natural sort the names $cnt = count($entries); for ( $i=0; $i<$cnt; $i++ ) { $sortTheEntries[$i] = $entries[$i]->gradebookCode; } - natsort($sortTheEntries); + //natsort($sortTheEntries); while ( list($ordinal,$id) = @each($sortTheEntries) ) { $this->entries[$entries[$ordinal]->idClassGradebookEntries] = $entries[$ordinal]; } @@ -484,8 +483,24 @@ } return $cats; } + + function loadCategoryListFlag($id_classes) + { + $sql = "SELECT * + from class_gradebook_categories + where id_classes='$id_classes' and flag='1'"; + $db = DB::getHandle(); + $db->RESULT_TYPE = MYSQL_ASSOC; + $db->query($sql); + $cats = array(); + while($db->nextRecord() ) { + $cats[$db->record['id_class_gradebook_categories']] = $db->record['label']; + } + return $cats; + } + /** * Merges the loaded vals and the loaded students based on * a number of criteria. @@ -494,7 +509,8 @@ * is responsible for a certain grade. This function will apply * appropriate vals to each student. */ - function setStudentVals() { + /*function setStudentVals() { + $now = time(); //print "<!-- SET STUDENT VALS START -->\n"; @@ -503,11 +519,21 @@ #print_r($this->vals); //print "--> \n"; + $classId = $this->idClasses; + + + + $categories_1=array(); + $categories_1=$this->loadCategoryListFlag($classId); + //print_r($categories_1); + + - foreach($this->vals as $valId=>$valObj) { + $entry = $this->entries[$valObj->idClassGradebookEntries]; + //print_r($entry); $j = $valObj->studentId; $student = $this->students[$j]; if ( strtolower(get_class($student)) != 'classgradebookstudent' ){ @@ -520,6 +546,7 @@ $this->students[$j]->vals[$entry->idClassGradebookEntries] = $valObj; continue; } + if (($entry->dateDue > 0 && $entry->dateDue < $now) || strlen($valObj->score) > 0 ) { //date due is passed, assign points or 0 to student // fixed - mgk 12/9/03 @@ -537,7 +564,11 @@ $this->students[$j]->possiblePoints += $entry->totalPoints; #$this->students[$valObj->username]->totalPointsEarned += $valObj->score; $this->students[$j]->totalPointsEarned += $valObj->score; + //print_r($valObj->score); + } + + //print_r($this->students[$j]->totalPointsEarned); } @@ -562,10 +593,103 @@ */ + // $this->dropGrades(); +// } + + + function setStudentVals() { + + $now = time(); + + $categories_1=array(); + //loading flaged categories + $categories_1=$this->loadCategoryListFlag($this->idClasses); + + $catIdFlag=array_keys($categories_1); + + $total=array(); + $flag=0; + $std=array(); + foreach($this->vals as $valId=>$valObj) + { + $entry = $this->entries[$valObj->idClassGradebookEntries]; + $j = $valObj->studentId; + $student = $this->students[$j]; + + + if ( strtolower(get_class($student)) != 'classgradebookstudent' ) + { + continue; + } + + $totalEarned=0; + $EntriesTotal=0; + + $earned=0; + $per=0; + $totalCatFlaged=0; + $entriesNotFlaged = 0; + + if (($entry->dateDue > 0 && $entry->dateDue < $now) || strlen($valObj->score) > 0) + { + for($d=0;$d<count($catIdFlag);$d++) + { + if($entry->idClassGradebookCategories == $catIdFlag[$d]) + { + $flag=1; + $this->students[$j]->possiblePoints += $entry->totalPoints; + if($valObj->flag == 1) + { + + $total[$j] += $entry->totalPoints; + $earned=$this->students[$j]->totalPointsEarned += $valObj->score; + + } + + if($valObj->flag == 0) + { + $entriesNotFlaged+=$entry->totalPoints; + } + + $EntriesTotal=$total[$j]+$entriesNotFlaged; + + } + else + { + $total_0[$j] += $valObj->score; + } + + } + $possiblePoints[$j] +=$entry->totalPoints; + $totalPointsEarned[$j] += $valObj->score; + } + + $this->students[$j]->vals[$entry->idClassGradebookEntries] = $valObj; + + if(in_array($valObj->studentId,$std) == 0) + { + array_push($std,$valObj->studentId); + } + } + + foreach($std as $s) + { + if($flag == 1) + { + $this->students[$s]->totalPointsEarned = (($this->students[$s]->totalPointsEarned / $total[$s]) * $this->students[$s]->possiblePoints)+$total_0[$s]; + } + else + { + $this->students[$s]->possiblePoints = $possiblePoints[$s]; + $this->students[$s]->totalPointsEarned = $totalPointsEarned[$s]; + } + } + + $this->dropGrades(); } + - /** * Load all val objects for this class id */ @@ -582,8 +706,9 @@ // mgk 2/8/04 // karen richardson student (and others) had data not showing up // due to this bug. - $valObj->username = strtolower($valObj->username); + $valObj->username = strtolower($valObj->username); $this->vals[$valObj->idClassGradebookVal] = $valObj; + } } @@ -903,7 +1028,7 @@ foreach ( $this->students as $username => $stuObj ) { if ( $stuObj->isWithdrawn() ) { continue; } - + $score = $this->students[$username]->totalPointsEarned; $poss = $this->students[$username]->possiblePoints; //print "<!-- ".$score. " / ". $poss. " -->\n"; Modified: logicampus/trunk/src/logicreate/lib/ClassGradebookVal.php =================================================================== --- logicampus/trunk/src/logicreate/lib/ClassGradebookVal.php 2009-11-03 10:29:53 UTC (rev 1308) +++ logicampus/trunk/src/logicreate/lib/ClassGradebookVal.php 2010-02-26 07:17:39 UTC (rev 1309) @@ -14,6 +14,7 @@ var $comments; var $dateCreated; var $dateModified; + var $flag; var $__attributes = array( 'idClassGradebookVal'=>'integer', @@ -23,7 +24,8 @@ 'score'=>'float', 'comments'=>'longvarchar', 'dateCreated'=>'integer', - 'dateModified'=>'integer'); + 'dateModified'=>'integer', + 'flag'=>'integer'); var $__nulls = array( 'score'=>'score', @@ -124,8 +126,8 @@ $st->fields['comments'] = 'comments'; $st->fields['date_created'] = 'date_created'; $st->fields['date_modified'] = 'date_modified'; - - + $st->fields['flag'] = 'flag'; + $array = array(); $db->executeQuery($st); while($db->nextRecord() ) { @@ -146,6 +148,7 @@ $st->fields['comments'] = $this->comments; $st->fields['date_created'] = $this->dateCreated; $st->fields['date_modified'] = $this->dateModified; + $st->fields['flag'] = $this->flag; $st->nulls['score'] = 'score'; $st->nulls['comments'] = 'comments'; @@ -172,6 +175,7 @@ $st->fields['comments'] = $obj->comments; $st->fields['date_created'] = $obj->dateCreated; $st->fields['date_modified'] = $obj->dateModified; + $st->fields['flag'] = $obj->flag; $st->nulls['score'] = 'score'; $st->nulls['comments'] = 'comments'; @@ -240,6 +244,7 @@ $x->comments = $row['comments']; $x->dateCreated = $row['date_created']; $x->dateModified = $row['date_modified']; + $x->flag = $row['flag']; $x->_new = false; return $x; Property changes on: logicampus/trunk/src/public_html/images ___________________________________________________________________ Added: svn:ignore + Thumbs.db Property changes on: logicampus/trunk/src/public_html/images/docs ___________________________________________________________________ Added: svn:ignore + Thumbs.db Property changes on: logicampus/trunk/src/public_html/images/mimetypes ___________________________________________________________________ Added: svn:ignore + Thumbs.db This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <if...@us...> - 2009-11-03 10:30:10
|
Revision: 1308 http://logicampus.svn.sourceforge.net/logicampus/?rev=1308&view=rev Author: iflaah Date: 2009-11-03 10:29:53 +0000 (Tue, 03 Nov 2009) Log Message: ----------- task id 2886996 , 2886919 Modified Paths: -------------- logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp logicampus/trunk/src/logicreate/services/gradebook/main.lcp logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html Added Paths: ----------- logicampus/trunk/src/logicreate/services/gradebook/nxPolicy.lcp logicampus/trunk/src/logicreate/services/gradebook/templates/nxPolicy.html Modified: logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp 2009-09-02 06:52:47 UTC (rev 1307) +++ logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp 2009-11-03 10:29:53 UTC (rev 1308) @@ -105,12 +105,12 @@ $rank2=$db->record['rank']; } - //** swapping the ranks + //* swapping the ranks $temp=$rank; $rank=$rank2; $rank2=$temp; - //**swapping the ranks in DB + //* swapping the ranks in DB $db->query("update class_gradebook_entries set rank='$rank' where id_class_gradebook_entries='$id_class_gradebook' and id_classes='$classId'"); $db->query("update class_gradebook_entries set rank='$rank2' where id_class_gradebook_entries='$id_class_gradebook_entries[$indexPrev]' and id_classes='$classId'"); Modified: logicampus/trunk/src/logicreate/services/gradebook/main.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/main.lcp 2009-09-02 06:52:47 UTC (rev 1307) +++ logicampus/trunk/src/logicreate/services/gradebook/main.lcp 2009-11-03 10:29:53 UTC (rev 1308) @@ -1,383 +1,386 @@ -<? -/** - * The main view for the gradebook. By default the - * gradebook will display a roster of all students - * on the left and columns will represent - * assessments. - * - */ - -include_once(LIB_PATH."gradeBookObj.php"); -include_once(LIB_PATH."LC_html.php"); - -include_once(LIB_PATH.'Assessment.php'); -include_once(LIB_PATH.'ClassGradebook.php'); -include_once(LIB_PATH.'ClassGradebookVal.php'); -include_once(LIB_PATH.'ClassGradebookEntries.php'); -include_once(LIB_PATH.'ClassGradebookCategories.php'); - - - -class gradebook extends FacultyOnlyService { - - var $presentor='htmlPresentation'; - - // links - var $sectionTitle = 'Gradebook'; - var $navlinks = array ( - 'Classroom Overview' => '%classmgr/display/', - 'Announcements'=>'%classmgr/announcements/', - 'Assessment Manager' => '%assessments/', - 'Assignments' => '%classmgr/assignmentManage/', - 'Content' => '%classmgr/lessonContent/', - 'FAQ' => '%classmgr/faq/', - 'File Resource Manager' => '%classdoclib/', - 'Gradebook' => '%gradebook/', - 'Lessons' => '%classmgr/lessonManager/', - 'Objectives' => '%classmgr/lessonObjectives/', - 'Webliography' => '%classmgr/lessonWebliography/' - ); - var $applinks = array( - 'Gradebook Home' => '', - 'List Entries' => 'entry/', - 'Add Entry' => 'entry/event=add/', - 'Rank Entries' => 'arrangement/', - 'View Grades by Student' => 'gradesbystudent/', - 'Build Printable Report' => 'report/', - 'Gradebook Setup' => 'main/event=controlPanel/' - ); - - var $inactivelinks = array('Gradebook'); - /** - * Displays the spreadsheet view of the gradebook. This is the - * default view. - * - * Input data: course ID - * Output data: display spreadsheet view - */ - function run(&$db,&$u,&$lc,&$t) { - $lc->templateName='main_main'; -//auto-comment $lc->templateStyle = 'private'; - $this->inactivelinks[] = 'Gradebook Home'; - - if ( $lc->postvars['filteractive'] ) { - $filter['filteractive'] = addslashes(trim($lc->postvars['filteractive'])); - } else { - $filter['filteractive'] = 'Active'; - } - if ( intval($lc->postvars['filtersection']) > 0 ) { - $filter['filtersection'] = (int)$lc->postvars['filtersection']; - } - - $filter['filterletter'] = addslashes(trim($lc->postvars['filterletter'])); - $filter['filtercat'] = addslashes(trim($lc->postvars['filtercat'])); - - $u->sessionvars['filter'] = $filter; - $t = array_merge( $t, $filter ); - - // Load all gradebook categories - // for the filter drop downs - $t['gbCats'] = ClassGradebook::loadCategoryList($u->activeClassTaught->id_classes); - $t['gbCats'][0] = 'All Categories'; - - // Load all student section numbers - // for the filter drop downs - $t['sectionNumbers'] = explode("\n",$u->activeClassTaught->sectionNumbers); - array_unshift($t['sectionNumbers'],'All Sections'); - - // get the semester name - $db->queryOne('select semesterTerm, semesterYear from semesters - where id_semesters='.$u->activeClassTaught->id_semesters); - $t['semester'] = $db->record['semesterTerm'].' '.$db->record['semesterYear']; - - // stupid hack to get a feedback message - if ($u->sessionvars['message']) { - $t['message'] = $u->sessionvars['message']; - unset($u->sessionvars['message']); - } - } - - - /** - * Displays the control panel for the gradebook - * this is an interface to other things like import, export and prefs - * - * Input data: class ID - * Output data: display static template - */ - function controlPanelRun(&$db,&$u,&$lc,&$t) { - - $this->inactivelinks[] = 'Gradebook Setup'; - $lc->templateName='main_controlpanel'; - - $this->sectionTitle = 'Gradebook Setup'; - - if ($u->sessionvars['message']) { - $t['message'] = $u->sessionvars['message']; - unset($u->sessionvars['message']); - } - - } - - - /** - * Shows the table that sits in the iframe - * iframe should be scrollable in 800x600 but also fully - * visible. No browser scrolling. Repeat student names column - * every (X) columns - * - * chop off student names at 23 characters, add nowrap - * Input data: class ID - * Output data: display static template - */ - function IFrameRun(&$db,&$u,&$lc,&$t) { - - $lc->templateName='main_iframe'; - $this->presentor = 'EmptyPresentation'; -//auto-comment $lc->templateStyle = 'private'; - - // repeat student names every ? columns - $printNamesEvery = 8; - $printHeadersEvery = 13; - $droppedStudentRowColor = '#ffa6a6'; - - // Get the filters from the session - $filter = $u->sessionvars['filter']; - - // pull in gradebook preferences - $gradebook = ClassGradebook::load( array( - 'id_classes' => $u->activeClassTaught->id_classes, - ) ); - - // apply filters - switch ( $filter['filteractive'] ) { - case 'Active': $gradebook->filterActive = 1; break; - case 'Dropped': $gradebook->filterActive = 0; break; - } - if ( $filter['filterletter'] && $filter['filterletter'] != 'All' ) - $gradebook->filterLastname = $filter['filterletter']; - if ( $filter['filtercat'] ) - $gradebook->filterCategory = $filter['filtercat']; - if ( $filter['filtersection'] ) - $gradebook->filterSection = $filter['filtersection']; - - - // these four methods are necassary for getting a GB overview table - $gradebook->loadCategories(); - $gradebook->getEntries(); - $gradebook->getStudents(); - $gradebook->loadVals(); - - // FIX THIS SO STUDENTS DO NOT DISAPPEAR -if (count($gradebook->students)%$printHeadersEvery ==0) { - $printHeadersEvery +=1; -} - if ( count($gradebook->students) == 0 ) - { - $t['table'] = 'There are no students in your class. You must have students to view the gradebook.'; - return; - } - - //associate vals and students based on a number of criteria - // (dropped, due date ...) - $gradebook->setStudentVals(); - - - $gradebook->calculateEntryWeights(); - $gradebook->calculateWeightedAverages(); - $gradebook->calculatePercentScores(); - - $counter = $printNamesEvery; // this will count down in the code - // $table is an array of arrays representing the content for all cells, including - // blank ones and repeating names. - $table = array(); - $counter--; - - - //ADD CLOUMN HEADERS TO THE GRADEBOOK TABLE - // we need to repeat this every $printHeadersEvery times - if ( $gradebook->calculationType == 1 ) { - $columnFooter = array( 'Weighted %' ); - } else { - $columnFooter = array( 'Total Points' ); - } - $columnHeaders = array(); - - reset($gradebook->entries); - while ( list($entid, $entry) = @each($gradebook->entries) ) { - - $columnHeaders[] = '<a target="_parent" href="'. - modurl('assessment/event=editAsmt/id='.$entid). - '">'.$entry->gradebookCode.'</a>'; - $counter--; - if ( $counter == 0 ) { - $columnHeaders[] = ' '; - } - - //ADD CLOUMN FOOTERS TO THE GRADEBOOK TABLE - // Push on totals for each entry - if ( $gradebook->calculationType == 1 ) { - $columnFooter[] = $entry->weightedPercent; - if ( $counter == 0 ) { - $columnFooter[] = 'Weighted %'; - } - } else { - $columnFooter[] = $entry->totalPoints; - if ( $counter == 0 ) { - $columnFooter[] = 'Total Points'; - } - } - if ( $counter == 0 ) { - $counter = $printNamesEvery; // reset counter - } - } - - //FINISH the header and footer arrays - if ( $gradebook->calculationType == 1 ) { - $columnFooter[] = ' '; // for the "total" column - } else { - $columnFooter[] = '<b>'.$gradebook->possiblePoints.'</b>'; // for the "total" column - } - - $columnHeaders[] = 'Total'; - - - // Get each student grades while finishing up the table data - reset($gradebook->students); - while ( list($username,$stud) = @each($gradebook->students) ) { - - $row = array(); // array of cells to be pushed onto table[] - - - // build the student's row. start with their name. - $counter = $printNamesEvery; - $row[] = '<a target="_parent" href="'.modurl('entry/event=showGrdbyStu/user='.$stud->username).'">'.$stud->lastname.', '.$stud->firstname.'</a>'; - $counter--; - - reset($gradebook->entries); - while ( list($entid,$entry) = @each($gradebook->entries) ) { - // index.php/assessments/grade/event=view/studentid=adam/id=5 - //use proper decimal places, none for whole integers, one place for fractions - if ( isset($stud->vals[$entid]->score) ) { - if ( intval($stud->vals[$entid]->score) == $stud->vals[$entid]->score ) { - $stud->vals[$entid]->score = (int)$stud->vals[$entid]->score; - } else { - $stud->vals[$entid]->score = sprintf('%.1f',$stud->vals[$entid]->score); - } - } - -#echo $entid; -#echo "<HR>"; -#debug($stud->vals); - //print the score to the row - if ( !isset($stud->vals[$entid]->score) && !$entry->publishFlag ) { - $text = '<i>???-*</i>'; - } else if ( !isset($stud->vals[$entid]->score) && $entry->publishFlag ) { - $text = '???'; - } else if ( isset($stud->vals[$entid]->score) && !$entry->publishFlag ) { - $text = '<i>'.$stud->vals[$entid]->score.'-*</i>'; - } else { - //if the score is "failing" make the font red - // david wissore, 10-22-2003 - - if ( $entry->totalPoints == 0 ) { - $text = $stud->vals[$entid]->score.' / EC'; - } else { - $pct = sprintf('%.2f',$stud->vals[$entid]->score / $entry->totalPoints * 100); - $text = $stud->vals[$entid]->score.' / '.$pct.'%'; - } - - //this needs to be different for percentage classes, - // the get letter grade is good for the final letter grade - // but not for each entry because they are all points based - // no matter what - if ( $gradebook->calculationType == 1 ) { -//print "<!-- $letter ".$stud->vals[$entid]->score." ".$entry->totalPoints ." -->\n"; - $letter = $gradebook->getLetterGrade( - ($stud->vals[$entid]->score/$entry->totalPoints )*100 - ,$entry->totalPoints); - } else { - $letter = $gradebook->getLetterGrade($stud->vals[$entid]->score,$entry->totalPoints); - } - if ( $letter == 'F' ) { - $text = "<font color=red>$text</font>"; - } - - if ( $stud->vals[$entid]->disqualified ) { - $text = 'd '.$text.''; - } - - } - -/* - if ( $entry->assessmentId ) { - $row[] = '<a target="PARENT" href="'.appurl('assessments/grade/event=view/studentid=' - .$username.'/id='.$entry->assessmentId).'">'.$text.'</a>'; - } else { -*/ - //edit single should work for both assessments and assignments - $row[] = popup( modurl('entry/').'event=editSingle/entid=' - .$entid.'/user='.$username, 200, 400, $text ); - - $counter--; - if ( $counter == 0 ) { - # $row[] = '<a target="_parent" href="'.modurl('entry/event=showGrdbyStu/user=' - # .$stud->username).'">'.$stud->lastname.', '.$stud->firstname.'</a>'; - $row[] = $stud->lastname.', '.$stud->firstname; - $counter = $printNamesEvery; // reset counter - } - } - -/** -* -I am putting in a hack here that basically says this -If you have 0 points. You are probably not THAT dumb -to get 0 points and have taken a test/quiz.. so we -won't show any grade - -note: i'm usinga terany if block becuase its inline. -*/ - // push on the total points - if ( $stud->isWithdrawn() ) { - $currRow = 'Withdrawn'; - } else { - if ( $gradebook->calculationType == 1 ) { - $currRow = $stud->weightedAverage.'% '; - if (($stud->possiblePoints) ) { - $currRow .= '/ '.$gradebook->getLetterGrade($stud->weightedAverage,$stud->possiblePoints); - } - } else { - $currRow = $stud->totalPointsEarned.' / ' - .sprintf( "%0.2f", $stud->totalPointsEarned / $stud->possiblePoints * 100).'% '; - if (($stud->possiblePoints) ) { - $currRow .= '/ '.$gradebook->getLetterGrade($stud->totalPointsEarned,$stud->possiblePoints); - } - } - } - $row[] = $currRow; - unset($currRow); - - if ( !$stud->active ) { - $row['inactive'] = true; - } - - $table[] = $row; - } - - $t['table'] = $table; - $t['columnHeaders'] = $columnHeaders; - $t['columnFooter'] = $columnFooter; - $t['printHeadersEvery'] = $printHeadersEvery; -// unset($table); -// unset($columnFooter); -// unset($columnHeaders); - - // stupid hack to get a feedback message - if ($u->sessionvars['message']) { - $t['message'] = $u->sessionvars['message']; - unset($u->sessionvars['message']); - } - } -} - -?> +<? +/** + * The main view for the gradebook. By default the + * gradebook will display a roster of all students + * on the left and columns will represent + * assessments. + * + */ + +include_once(LIB_PATH."gradeBookObj.php"); +include_once(LIB_PATH."LC_html.php"); + +include_once(LIB_PATH.'Assessment.php'); +include_once(LIB_PATH.'ClassGradebook.php'); +include_once(LIB_PATH.'ClassGradebookVal.php'); +include_once(LIB_PATH.'ClassGradebookEntries.php'); +include_once(LIB_PATH.'ClassGradebookCategories.php'); + + + +class gradebook extends FacultyOnlyService { + + var $presentor='htmlPresentation'; + + // links + var $sectionTitle = 'Gradebook'; + var $navlinks = array ( + 'Classroom Overview' => '%classmgr/display/', + 'Announcements'=>'%classmgr/announcements/', + 'Assessment Manager' => '%assessments/', + 'Assignments' => '%classmgr/assignmentManage/', + 'Content' => '%classmgr/lessonContent/', + 'FAQ' => '%classmgr/faq/', + 'File Resource Manager' => '%classdoclib/', + 'Gradebook' => '%gradebook/', + 'Lessons' => '%classmgr/lessonManager/', + 'Objectives' => '%classmgr/lessonObjectives/', + 'Webliography' => '%classmgr/lessonWebliography/' + ); + var $applinks = array( + 'Gradebook Home' => '', + 'List Entries' => 'entry/', + 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', + 'View Grades by Student' => 'gradesbystudent/', + 'N-X Policy' => 'nxPolicy/', + 'Build Printable Report' => 'report/', + 'Gradebook Setup' => 'main/event=controlPanel/' + ); + + var $inactivelinks = array('Gradebook'); + /** + * Displays the spreadsheet view of the gradebook. This is the + * default view. + * + * Input data: course ID + * Output data: display spreadsheet view + */ + function run(&$db,&$u,&$lc,&$t) { + $lc->templateName='main_main'; +//auto-comment $lc->templateStyle = 'private'; + $this->inactivelinks[] = 'Gradebook Home'; + + if ( $lc->postvars['filteractive'] ) { + $filter['filteractive'] = addslashes(trim($lc->postvars['filteractive'])); + } else { + $filter['filteractive'] = 'Active'; + } + if ( intval($lc->postvars['filtersection']) > 0 ) { + $filter['filtersection'] = (int)$lc->postvars['filtersection']; + } + + $filter['filterletter'] = addslashes(trim($lc->postvars['filterletter'])); + $filter['filtercat'] = addslashes(trim($lc->postvars['filtercat'])); + + $u->sessionvars['filter'] = $filter; + $t = array_merge( $t, $filter ); + + // Load all gradebook categories + // for the filter drop downs + $t['gbCats'] = ClassGradebook::loadCategoryList($u->activeClassTaught->id_classes); + $t['gbCats'][0] = 'All Categories'; + + // Load all student section numbers + // for the filter drop downs + $t['sectionNumbers'] = explode("\n",$u->activeClassTaught->sectionNumbers); + array_unshift($t['sectionNumbers'],'All Sections'); + + // get the semester name + $db->queryOne('select semesterTerm, semesterYear from semesters + where id_semesters='.$u->activeClassTaught->id_semesters); + $t['semester'] = $db->record['semesterTerm'].' '.$db->record['semesterYear']; + + // stupid hack to get a feedback message + if ($u->sessionvars['message']) { + $t['message'] = $u->sessionvars['message']; + unset($u->sessionvars['message']); + } + } + + + /** + * Displays the control panel for the gradebook + * this is an interface to other things like import, export and prefs + * + * Input data: class ID + * Output data: display static template + */ + function controlPanelRun(&$db,&$u,&$lc,&$t) { + + $this->inactivelinks[] = 'Gradebook Setup'; + $lc->templateName='main_controlpanel'; + + $this->sectionTitle = 'Gradebook Setup'; + + if ($u->sessionvars['message']) { + $t['message'] = $u->sessionvars['message']; + unset($u->sessionvars['message']); + } + + } + + + /** + * Shows the table that sits in the iframe + * iframe should be scrollable in 800x600 but also fully + * visible. No browser scrolling. Repeat student names column + * every (X) columns + * + * chop off student names at 23 characters, add nowrap + * Input data: class ID + * Output data: display static template + */ + function IFrameRun(&$db,&$u,&$lc,&$t) { + + $lc->templateName='main_iframe'; + $this->presentor = 'EmptyPresentation'; +//auto-comment $lc->templateStyle = 'private'; + + // repeat student names every ? columns + $printNamesEvery = 12; + $printHeadersEvery = 13; + $droppedStudentRowColor = '#ffa6a6'; + + // Get the filters from the session + $filter = $u->sessionvars['filter']; + + // pull in gradebook preferences + $gradebook = ClassGradebook::load( array( + 'id_classes' => $u->activeClassTaught->id_classes, + ) ); + + // apply filters + switch ( $filter['filteractive'] ) { + case 'Active': $gradebook->filterActive = 1; break; + case 'Dropped': $gradebook->filterActive = 0; break; + } + if ( $filter['filterletter'] && $filter['filterletter'] != 'All' ) + $gradebook->filterLastname = $filter['filterletter']; + if ( $filter['filtercat'] ) + $gradebook->filterCategory = $filter['filtercat']; + if ( $filter['filtersection'] ) + $gradebook->filterSection = $filter['filtersection']; + + + // these four methods are necassary for getting a GB overview table + $gradebook->loadCategories(); + $gradebook->getEntries(); + $gradebook->getStudents(); + $gradebook->loadVals(); + + // FIX THIS SO STUDENTS DO NOT DISAPPEAR +if (count($gradebook->students)%$printHeadersEvery ==0) { + $printHeadersEvery +=1; +} + if ( count($gradebook->students) == 0 ) + { + $t['table'] = 'There are no students in your class. You must have students to view the gradebook.'; + return; + } + + //associate vals and students based on a number of criteria + // (dropped, due date ...) + $gradebook->setStudentVals(); + + $gradebook->calculateEntryWeights(); + $gradebook->calculateWeightedAverages(); + $gradebook->calculatePercentScores(); + + $counter = $printNamesEvery; // this will count down in the code + // $table is an array of arrays representing the content for all cells, including + // blank ones and repeating names. + $table = array(); + $counter--; + + + //ADD CLOUMN HEADERS TO THE GRADEBOOK TABLE + // we need to repeat this every $printHeadersEvery times + if ( $gradebook->calculationType == 1 ) { + $columnFooter = array( 'Weighted %' ); + } else { + $columnFooter = array( 'Total Points' ); + } + $columnHeaders = array(); + + reset($gradebook->entries); + while ( list($entid, $entry) = @each($gradebook->entries) ) { + + $columnHeaders[] = '<a target="_parent" href="'. + modurl('assessment/event=editAsmt/id='.$entid). + '">'.$entry->gradebookCode.'</a>'; + $counter--; + if ( $counter == 0 ) { + $columnHeaders[] = ' '; + } + + //ADD CLOUMN FOOTERS TO THE GRADEBOOK TABLE + // Push on totals for each entry + if ( $gradebook->calculationType == 1 ) { + $columnFooter[] = $entry->weightedPercent; + if ( $counter == 0 ) { + $columnFooter[] = 'Weighted %'; + } + } else { + $columnFooter[] = $entry->totalPoints; + if ( $counter == 0 ) { + $columnFooter[] = 'Total Points'; + } + } + if ( $counter == 0 ) { + $counter = $printNamesEvery; // reset counter + } + } + + //FINISH the header and footer arrays + if ( $gradebook->calculationType == 1 ) { + $columnFooter[] = ' '; // for the "total" column + } else { + $columnFooter[] = '<b>'.$gradebook->possiblePoints.'</b>'; // for the "total" column + } + + $columnHeaders[] = 'Total'; + + // Get each student grades while finishing up the table data + reset($gradebook->students); + while ( list($username,$stud) = @each($gradebook->students) ) { + + $row = array(); // array of cells to be pushed onto table[] + + // build the student's row. start with their name. + $counter = $printNamesEvery; + $row[] = '<a target="_parent" href="'.modurl('entry/event=showGrdbyStu/user='.$stud->username).'">'.$stud->lastname.', '.$stud->firstname.'</a>'; + $counter--; + + reset($gradebook->entries); + while ( list($entid,$entry) = @each($gradebook->entries) ) { + // index.php/assessments/grade/event=view/studentid=adam/id=5 + //use proper decimal places, none for whole integers, one place for fractions + if ( isset($stud->vals[$entid]->score) ) { + if ( intval($stud->vals[$entid]->score) == $stud->vals[$entid]->score ) { + $stud->vals[$entid]->score = (int)$stud->vals[$entid]->score; + } else { + $stud->vals[$entid]->score = sprintf('%.1f',$stud->vals[$entid]->score); + } + } + +#echo $entid; +#echo "<HR>"; +#debug($stud->vals); + //print the score to the row + if ( !isset($stud->vals[$entid]->score) && !$entry->publishFlag ) { + $text = '<i>???-*</i>'; + } else if ( !isset($stud->vals[$entid]->score) && $entry->publishFlag ) { + $text = '???'; + } else if ( isset($stud->vals[$entid]->score) && !$entry->publishFlag ) { + $text = '<i>'.$stud->vals[$entid]->score.'-*</i>'; + } else { + //if the score is "failing" make the font red + // david wissore, 10-22-2003 + + if ( $entry->totalPoints == 0 ) { + $text = $stud->vals[$entid]->score.' / EC'; + } else { + $pct = sprintf('%.2f',$stud->vals[$entid]->score / $entry->totalPoints * 100); + $text = $stud->vals[$entid]->score.' / '.$pct.'%'; + if($stud->vals[$entid]->flag ==1 ) + $text="<div style='background:#FAAAAF'>".$text."</div>"; + } + + //this needs to be different for percentage classes, + // the get letter grade is good for the final letter grade + // but not for each entry because they are all points based + // no matter what + if ( $gradebook->calculationType == 1 ) { +//print "<!-- $letter ".$stud->vals[$entid]->score." ".$entry->totalPoints ." -->\n"; + $letter = $gradebook->getLetterGrade( + ($stud->vals[$entid]->score/$entry->totalPoints )*100 + ,$entry->totalPoints); + } else { + $letter = $gradebook->getLetterGrade($stud->vals[$entid]->score,$entry->totalPoints); + } + if ( $letter == 'F' ) { + $text = "<font color=red>$text</font>"; + } + + if ( $stud->vals[$entid]->disqualified ) { + $text = 'd '.$text.''; + } + + } + +/* + if ( $entry->assessmentId ) { + $row[] = '<a target="PARENT" href="'.appurl('assessments/grade/event=view/studentid=' + .$username.'/id='.$entry->assessmentId).'">'.$text.'</a>'; + } else { +*/ + //edit single should work for both assessments and assignments + $row[] = popup( modurl('entry/').'event=editSingle/entid=' + .$entid.'/user='.$username, 200, 400, $text ); + + $counter--; + if ( $counter == 0 ) { + # $row[] = '<a target="_parent" href="'.modurl('entry/event=showGrdbyStu/user=' + # .$stud->username).'">'.$stud->lastname.', '.$stud->firstname.'</a>'; + $row[] = $stud->lastname.', '.$stud->firstname; + $counter = $printNamesEvery; // reset counter + } + } + +/** +* +I am putting in a hack here that basically says this +If you have 0 points. You are probably not THAT dumb +to get 0 points and have taken a test/quiz.. so we +won't show any grade + +note: i'm usinga terany if block becuase its inline. +*/ + // push on the total points + + if ( $stud->isWithdrawn() ) { + $currRow = 'Withdrawn'; + } else { + if ( $gradebook->calculationType == 1 ) { + $currRow = $stud->weightedAverage.'% '; + if (($stud->possiblePoints) ) { + //print_r(); + $currRow .= '/ '.$gradebook->getLetterGrade($stud->weightedAverage,$stud->possiblePoints); + } + } else { + $currRow = $stud->totalPointsEarned.' / ' + .sprintf( "%0.2f", $stud->totalPointsEarned / $stud->possiblePoints * 100).'% '; + if (($stud->possiblePoints) ) { + $currRow .= '/ '.$gradebook->getLetterGrade($stud->totalPointsEarned,$stud->possiblePoints); + } + } + } + $row[] = $currRow; + unset($currRow); + + if ( !$stud->active ) { + $row['inactive'] = true; + } + + $table[] = $row; + + } + + $t['table'] = $table; + $t['columnHeaders'] = $columnHeaders; + $t['columnFooter'] = $columnFooter; + $t['printHeadersEvery'] = $printHeadersEvery; +// unset($table); +// unset($columnFooter); +// unset($columnHeaders); + + // stupid hack to get a feedback message + if ($u->sessionvars['message']) { + $t['message'] = $u->sessionvars['message']; + unset($u->sessionvars['message']); + } + } +} + +?> Added: logicampus/trunk/src/logicreate/services/gradebook/nxPolicy.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/nxPolicy.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/gradebook/nxPolicy.lcp 2009-11-03 10:29:53 UTC (rev 1308) @@ -0,0 +1,322 @@ +<?php +/* + * Created on Aug 31, 2009 + * + */ + +include_once(LIB_PATH.'SiteForms.php'); +include_once(LIB_PATH.'gradeBookObj.php'); +include_once(LIB_PATH.'ClassGradebookCategories.php'); +include_once(LIB_PATH.'ClassGradebook.php'); +include_once(LIB_PATH.'ClassGradebookEntries.php'); +include_once(LIB_PATH.'ClassGradebookVal.php'); + +class nxPolicy extends FacultyService +{ + + var $presentor='htmlPresentation'; + var $permissionError = '<h3>Permission Error</h3> + Either the entry you were trying to access is not + a valid entry or you do not have access to edit that + grade book + entry. We suggest going back to the main classroom + manager page and trying again. If you continue to get + this error feel free to contact the help desk.'; + var $dataError = '<h3>Problem saving your information</h3> + There was a problem saving your informatino to the + database. We suggest trying again. If you get this + message consistently, please contact the site administrator.'; + + // links + var $sectionTitle = 'N-X Policy'; + var $navlinks = array ( + 'Classroom Manager' => '%classmgr/display/', + 'Calendar' => '%classmgr/cal/', + 'Assignments' => '%classmgr/assignmentManage/', + 'Contact Students' => '%classmgr/contactStudents/', + 'Assessments' => '%assessments', + ); + + var $applinks = array( + 'Gradebook Home' => '', + 'List Categories' => 'category/', + 'Add category' => 'category/event=add/', + 'List Entries' => 'entry/', + 'Rank Entries' => 'arrangement/', + 'Add Entry' => 'entry/event=add/', + 'View Grades by Student' => 'gradesbystudent/', + 'N-X Policy' => 'n-xPolicy/', + 'Build Printable Report' => 'report/' + ); + var $inactivelinks = array('N-X Policy'); + + var $outerFlag=0; + + function run(&$db,&$u,&$lc,&$t) + { + $lc->templateName='nxPolicy'; + //$lc->templateStyle = 'private'; + $this->sectionTitle = 'N-X Policy'; + + $cat=array(); + $gradebookCat = new ClassGradebook(); + $gradebookCat->idClasses = $u->activeClassTaught->id_classes; + $cat=$gradebookCat->loadCategoryList($u->activeClassTaught->id_classes); + + $this->outerFlag=0; + $t['categories']=$cat; + $t['flag']=0; + + } + + function afterAssesmentRun(&$db,&$u,&$lc,&$t) + { + $u->entId = $lc->getvars['entid']; + + $classId=$u->activeClassTaught->id_classes; + $flag=0; + + $db->query("SELECT * FROM class_gradebook_categories cat,class_gradebook_entries ent WHERE cat.id_classes=ent.id_classes " . + "AND cat.id_classes='$classId' AND cat.flag='1' AND ent.id_class_gradebook_entries='$u->entId'"); + + if($db->nextRecord()) + { + $cat_id=$db->record['id_class_gradebook_categories']; + $flag=1; + } + + if($flag == 1) + { + $db->query("select id_student from class_student_sections where id_classes='$classId'"); + if($db->nextRecord()) + { + $usr=$db->record['id_student']; + } + //to check either the policy has been already applied against id_category or not + $db->query("select count(ce.id_class_gradebook_entries) + from class_gradebook_entries ce,class_gradebook_val cv + where ce.id_class_gradebook_entries=cv.id_class_gradebook_entries + and ce.id_classes='$classId' and cv.username='$usr' " . + "and ce.id_class_gradebook_categories='$cat_id'". + "and cv.flag='1'"); + + if($db->nextRecord()) + { + $c=$db->record['count(ce.id_class_gradebook_entries)']; + } + + $this->outerFlag=1; + + $this->applyFinal(&$db,&$u,&$lc,&$t,$c,$cat_id); + } + if($flag == 0) + { + //$t['url'] = modurl('main/event=iframe/id_classes='.$u->activeClassTaught->id_classes."/windowStatus=10"); + $t['url'] = modurl('main/event=iframe/id_classes='.$u->activeClassTaught->id_classes); + } + } + + + function entriesRun(&$db,&$u,&$lc,&$t) + { + $category=$lc->postvars['category']; + $c = 0; + $flag=0; + $fleeg=1; + $cat=array(); + $gradebookCat = new ClassGradebook(); + $gradebookCat->idClasses = $u->activeClassTaught->id_classes; + $cat=$gradebookCat->loadCategoryList($u->activeClassTaught->id_classes); + $id_class_gradebook_categories=array_search($category,$cat); + + $db->query("select count(id_class_gradebook_entries) from class_gradebook_entries " . + "where id_classes='$gradebookCat->idClasses' and id_class_gradebook_categories='$id_class_gradebook_categories'"); + + while($db->nextRecord()) + { + $count=$db->record['count(id_class_gradebook_entries)']; + } + + if($count == 1) + { + $flag=1; + $t['flag']=$flag; + $t['message']="There is only one entry in it."; + + } + else + { + if($count > 1) + { + + $db->query("select student_id from class_enrollment where class_id='$gradebookCat->idClasses'"); + if($db->nextRecord()) + { + $usr=$db->record['student_id']; + } + //to check either the policy has already been applied against id_category or not + $db->query("select count(ce.id_class_gradebook_entries) + from class_gradebook_entries ce,class_gradebook_val cv + where ce.id_class_gradebook_entries=cv.id_class_gradebook_entries + and ce.id_classes='$gradebookCat->idClasses' and cv.student_id='$usr' " . + "and ce.id_class_gradebook_categories='$id_class_gradebook_categories'". + "and cv.flag='1'"); + + if($db->nextRecord()) + { + $c=$db->record['count(ce.id_class_gradebook_entries)']; + } + + $flag=0; + $t['flag']=$flag; + $fleeg=1; + $t['fleeg']=$fleeg; + $t['cat']=$category; + $t['count']=$count; + $t['old']=$c; + $t['categories']=$cat; + + unset($category); + empty($category); + } + else + { + $flag=1; + $t['flag']=$flag; + $t['error']="There is no entry in it."; + + } + } + + $this->run(&$db,&$u,&$lc,&$t); + } + + function applyRun(&$db,&$u,&$lc,&$t) + { + + $count=$lc->postvars['count']; + $totalcount=$lc->postvars['totalcount']; + $category=$lc->postvars['hidden']; + + $p=$totalcount/2; + if($count > $p) + { + $t['error']="Number should not be greater than".$p; + $this->run(&$db,&$u,&$lc,&$t); + } + + $cat=array(); + $percentage=array(); + $gradebookCat = new ClassGradebook(); + $gradebookCat->idClasses = $u->activeClassTaught->id_classes; + $cat=$gradebookCat->loadCategoryList($u->activeClassTaught->id_classes); + $id_class_gradebook_categories=array_search($category,$cat); + + $this->applyFinal(&$db,&$u,&$lc,&$t,$count,$id_class_gradebook_categories); + + $this->run(&$db,&$u,&$lc,&$t); + } + + function applyFinal(&$db,&$u,&$lc,&$t,$count,$id_cat) + { + $classId = $u->activeClassTaught->id_classes; + $id_entries = array(); + $tPoints = array(); + $username = array(); + + if($count == 0) + { + $db->query("update class_gradebook_categories set flag='0' where id_classes='$classId'" . + "and id_class_gradebook_categories='$id_cat'"); + } + + if($count != 0) + { + $db->query("update class_gradebook_categories set flag='1' where id_classes='$classId'" . + "and id_class_gradebook_categories='$id_cat'"); + } + + $db->query("select id_class_gradebook_entries,total_points from class_gradebook_entries where id_classes='$classId' " . + "and id_class_gradebook_categories='$id_cat' and publish_flag='1'"); + + while($db->nextRecord()) + { + array_push($id_entries,$db->record['id_class_gradebook_entries']); + array_push($tPoints,$db->record['total_points']); + } + + $db->query("select student_id from class_enrollment where class_id='$classId'"); + + while($db->nextRecord()) + { + array_push($username,$db->record['student_id']); + } + + $score=array(); + $c=count($username); + for($k=0;$k<=$c;) + { + //getting scores of all the entries against each student + $i=0; + foreach($id_entries as $ide) + { + $tp=$tPoints[$i]; + $user=$username[$k]; + + $db->query("select ((score/$tp)*100) as Score from class_gradebook_val where id_classes='$classId' and student_id='$user'". + "and id_class_gradebook_entries='$ide'"); + if($db->nextRecord()) + { + $score[$ide]=$db->record['Score']; + + } + $i++; + } + + arsort($score); + + $this->update(&$db,&$u,&$lc,&$t,$count,$score,$user); + $t['message']="Successfully applied"; + + $k++; + } + + if($this->outerFlag == 1) + { + $t['url'] = modurl('main/event=iframe/id_classes='.$u->activeClassTaught->id_classes); + $this->presentor="redirectPresentation"; + } + else + { + $t['message']="Successfully applied"; + $this->run(&$db,&$u,&$lc,&$t); + } + + } + + function update(&$db,&$u,&$lc,&$t,$count,$score,$user) + { + $classId = $u->activeClassTaught->id_classes; + $id=array_keys($score); + $k=0; + for($i=0;$i<$count;$i++) + { + $k++; + $db->query("update class_gradebook_val set flag='1' " . + "where id_classes='$classId' and student_id='$user' and id_class_gradebook_entries='$id[$i]'"); + + } + //$k=$k-1; + for(;$k<count($score);$k++) + { + $db->query("update class_gradebook_val set flag='0' " . + "where id_classes='$classId' and student_id='$user' and id_class_gradebook_entries='$id[$k]'"); + + } + + + } + +} +?> + Modified: logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html 2009-09-02 06:52:47 UTC (rev 1307) +++ logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html 2009-11-03 10:29:53 UTC (rev 1308) @@ -4,7 +4,7 @@ <html> <head> -<title>ranking</title> +<title>Rank Entries</title> </head> <body> <table> Added: logicampus/trunk/src/logicreate/services/gradebook/templates/nxPolicy.html =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/templates/nxPolicy.html (rev 0) +++ logicampus/trunk/src/logicreate/services/gradebook/templates/nxPolicy.html 2009-11-03 10:29:53 UTC (rev 1308) @@ -0,0 +1,103 @@ +<?=$t['sectionheader'];?> +<?if($t['message']){ ?><span style="color:blue"><?=$t['message'];?></span><?}?> +<?if($t['error']){ ?><span style="color:red"><?=$t['error'];?></span><?}?> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> + + <head> + <title>n-x policy</title> + <script language="JavaScript" type="text/javascript"> + function check() + { + var tc=document.applyForm.totalcount.value; + var c=document.applyForm.count.value; + var p=tc/2; + if(c > p) + { + alert("The count should be lesser or equal to the half of the total."); + return false; + } + else + { + document.applyForm.action="<?php echo appurl('/gradebook/nxPolicy/event=apply');?>"; + } + } + + function decicheck(e) + { + var key; + var keychar; + + if (window.event) + key = window.event.keyCode; + keychar = String.fromCharCode(key); + + if ((("0123456789abcefgimstABCEFGIMST").indexOf(keychar) > -1)) + return true; + else + return false; + } + </script> + </head> + <body> + <form name="catForm" action="<?echo appurl('/gradebook/nxPolicy/event=entries')?>" method="post"> + <table> + <tr> + <td><strong>Categories</strong></td> + <td> + <select name="category"> + <option value="-Select Here-">-Select Here-</option> + <?php + $cat=$t['categories']; + print_r($cat); + $ct=$t['cat']; + $floog=0; + echo $msg; + foreach($cat as $c) + { + if($c==$ct) + { + print_r('<option selected value="'.$ct.'">'.$ct.'</option>'); + $floog=1; + + } + else + { + print_r('<option value="'.$c.'">'.$c.'</option>'); + } + } + + ?> + </select></td> + <td><input type="submit" name="submit" value="Search"/></td> + </table> + </form> + <? + $tcount=$t['count']; + + ?> + <form name="applyForm" method="post" > + <table> + <tr><? if ($t['flag']== 0 && $t['fleeg']== 1) {?> + <td>Policy to apply on</td> + <td><input type="text" name="count" size="5" value="<?=$t['old']?>" onKeyPress="return decicheck(event)"/></td> + <td>/ <input type="text" name="totalcount" value="<?echo $tcount?>" size="5" readonly/></td> + </tr> + <tr> + <td><?// print_r("<br>".$msg);?></td> + </tr> + <tr> + <td><input type="submit" name="applySubmit" value="Apply" onClick="return check()"/></td> + <td><input type="hidden" name="hidden" value="<? echo $ct; ?>"/></td> + </tr> + <?}?> + + </table> + </form> + + </body> +</html> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <if...@us...> - 2009-09-02 06:53:04
|
Revision: 1307 http://logicampus.svn.sourceforge.net/logicampus/?rev=1307&view=rev Author: iflaah Date: 2009-09-02 06:52:47 +0000 (Wed, 02 Sep 2009) Log Message: ----------- Modified Paths: -------------- logicampus/trunk/src/logicreate/services/gradebook/entry.lcp logicampus/trunk/src/logicreate/services/gradebook/gradesbystudent.lcp logicampus/trunk/src/logicreate/services/gradebook/main.lcp logicampus/trunk/src/logicreate/services/gradebook/report.lcp logicampus/trunk/src/logicreate/services/gradebook/student.lcp logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html logicampus/trunk/src/public_html/install/schema_27.php Modified: logicampus/trunk/src/logicreate/services/gradebook/entry.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/entry.lcp 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/logicreate/services/gradebook/entry.lcp 2009-09-02 06:52:47 UTC (rev 1307) @@ -39,6 +39,7 @@ 'Gradebook Home' => '', 'List Entries' => 'entry/', 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', 'View Grades by Student' => 'gradesbystudent/', 'Build Printable Report' => 'report/', 'Gradebook Setup' => 'main/event=controlPanel/' Modified: logicampus/trunk/src/logicreate/services/gradebook/gradesbystudent.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/gradesbystudent.lcp 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/logicreate/services/gradebook/gradesbystudent.lcp 2009-09-02 06:52:47 UTC (rev 1307) @@ -25,6 +25,7 @@ 'Gradebook Home' => '', 'List Entries' => 'entry/', 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', 'View Grades by Student' => 'gradesbystudent/', 'Build Printable Report' => 'report/', 'Gradebook Setup' => 'main/event=controlPanel/' Modified: logicampus/trunk/src/logicreate/services/gradebook/main.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/main.lcp 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/logicreate/services/gradebook/main.lcp 2009-09-02 06:52:47 UTC (rev 1307) @@ -41,6 +41,7 @@ 'Gradebook Home' => '', 'List Entries' => 'entry/', 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', 'View Grades by Student' => 'gradesbystudent/', 'Build Printable Report' => 'report/', 'Gradebook Setup' => 'main/event=controlPanel/' Modified: logicampus/trunk/src/logicreate/services/gradebook/report.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/report.lcp 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/logicreate/services/gradebook/report.lcp 2009-09-02 06:52:47 UTC (rev 1307) @@ -30,6 +30,7 @@ 'Gradebook Home' => '', 'List Entries' => 'entry/', 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', 'View Grades by Student' => 'gradesbystudent/', 'Build Printable Report' => 'report/', 'Gradebook Setup' => 'main/event=controlPanel/' Modified: logicampus/trunk/src/logicreate/services/gradebook/student.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/student.lcp 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/logicreate/services/gradebook/student.lcp 2009-09-02 06:52:47 UTC (rev 1307) @@ -36,6 +36,7 @@ 'Gradebook Home' => '', 'List Entries' => 'entry/', 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', 'Gradebook Setup' => 'main/event=controlPanel/' ); Modified: logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html 2009-09-02 06:52:47 UTC (rev 1307) @@ -16,20 +16,25 @@ $length=$t['length']; $i=0; foreach($title as $ti) - { + { + ?> - print_r('<tr>'); - print_r('<td width="150"><strong>'.$ti.'</strong></td>'); - print_r('<td>'); + <tr> + <td width="150"><strong><?=$ti?></strong></td> + <td> + <? if($i > 0) { - print_r ('<a href="'.appurl('gradebook/arrangement/event=up/id=').$i.'"><img src='.IMAGES_URL.'up.gif border="0"></a>'); - } - print_r('</td>'); - print_r('<td>'); + print_r ('<a href="'.appurl('gradebook/arrangement/event=up/id=').$i.'"><img src='.IMAGES_URL.'up_arrow.gif border="0"></a>'); + } + ?> + + </td> + <td> + <? if($i < ($length-1)) { - print_r('<a href="'.appurl('gradebook/arrangement/event=down/id=').$i.'"><img src='.IMAGES_URL.'down.gif border="0"></a>'); + print_r('<a href="'.appurl('gradebook/arrangement/event=down/id=').$i.'"><img src='.IMAGES_URL.'down_arrow.gif border="0"></a>'); } print_r('</td>'); print_r('</tr>'); Modified: logicampus/trunk/src/public_html/install/schema_27.php =================================================================== --- logicampus/trunk/src/public_html/install/schema_27.php 2009-08-24 07:56:30 UTC (rev 1306) +++ logicampus/trunk/src/public_html/install/schema_27.php 2009-09-02 06:52:47 UTC (rev 1307) @@ -41,6 +41,7 @@ `publish_flag` tinyint (1) NOT NULL, `notes` text, `class_lesson_sequence_id` integer (11) NOT NULL, + 'rank' integer (10) NOT NULL, PRIMARY KEY (id_class_gradebook_entries) ) campusdelimeter; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-08-24 07:56:37
|
Revision: 1306 http://logicampus.svn.sourceforge.net/logicampus/?rev=1306&view=rev Author: faheemkhan Date: 2009-08-24 07:56:30 +0000 (Mon, 24 Aug 2009) Log Message: ----------- Property Changed: ---------------- logicampus/trunk/ Property changes on: logicampus/trunk ___________________________________________________________________ Added: svn:ignore + src.rar This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-08-20 04:26:40
|
Revision: 1305 http://logicampus.svn.sourceforge.net/logicampus/?rev=1305&view=rev Author: faheemkhan Date: 2009-08-20 04:26:32 +0000 (Thu, 20 Aug 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html Added: logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/gradebook/arrangement.lcp 2009-08-20 04:26:32 UTC (rev 1305) @@ -0,0 +1,175 @@ +<?php + +include_once(LIB_PATH.'SiteForms.php'); +include_once(LIB_PATH.'gradeBookObj.php'); +include_once(LIB_PATH.'ClassGradebookEntries.php'); +include_once(LIB_PATH.'ClassGradebookVal.php'); + +class arrangement extends FacultyService +{ + + var $presentor='htmlPresentation'; + var $permissionError = '<h3>Permission Error</h3> + Either the entry you were trying to access is not + a valid entry or you do not have access to edit that + grade book + entry. We suggest going back to the main classroom + manager page and trying again. If you continue to get + this error feel free to contact the help desk.'; + var $dataError = '<h3>Problem saving your information</h3> + There was a problem saving your informatino to the + database. We suggest trying again. If you get this + message consistently, please contact the site administrator.'; + + // links + var $sectionTitle = 'Entry'; + var $navlinks = array ( + 'Classroom Manager' => '%classmgr/display/', + 'Calendar' => '%classmgr/cal/', + 'Assignments' => '%classmgr/assignmentManage/', + 'Contact Students' => '%classmgr/contactStudents/', + 'Assessments' => '%assessments', + ); + + var $applinks = array( + 'Gradebook Home' => '', + 'List Entries' => 'entry/', + 'Add Entry' => 'entry/event=add/', + 'Rank Entries' => 'arrangement/', + 'View Grades by Student' => 'gradesbystudent/', + 'Build Printable Report' => 'report/', + 'Gradebook Setup' => 'main/event=controlPanel/' + ); + + var $inactivelinks = array('Rank Entries'); + # Holds cleaned postvar data + var $data = array(); + + function run(&$db,&$u,&$lc,&$t) + { + + $lc->templateName='arrangement'; + $this->sectionTitle = 'Gradebook Ranking'; + + $classId = $u->activeClassTaught->id_classes; + + $title=array(); + + $db->query("select title from class_gradebook_entries where id_classes='$classId' order by rank"); + + while($db->nextRecord()) + { + array_push($title,$db->record['title']); + } + $t['length']=count($title); + $t['title']=$title; + + } + + function upRun(&$db,&$u,&$lc,&$t) + { + $id=$lc->getvars['id']; + $classId = $u->activeClassTaught->id_classes; + + $id_class_gradebook_entries=array(); + + $db->query("select id_class_gradebook_entries from class_gradebook_entries where id_classes='$classId' order by rank"); + + while($db->nextRecord()) + { + array_push($id_class_gradebook_entries,$db->record['id_class_gradebook_entries']); + } + $id_class_gradebook=$id_class_gradebook_entries[$id]; + + $rank=array(); + $db->query("select rank from class_gradebook_entries where id_classes='$classId' and id_class_gradebook_entries='$id_class_gradebook' order by rank"); + while($db->nextRecord()) + { + $rank=$db->record['rank']; + } + + $temp = array(); + $db->query("select rank from class_gradebook_entries where id_classes='$classId' order by rank"); + while($db->nextRecord()) + { + array_push($temp,$db->record['rank']); + } + + $index=array_keys($temp,$rank,true); + + $indexPrev=$index[0]-1; + + $db->query("select rank from class_gradebook_entries where id_classes='$classId' and id_class_gradebook_entries='$id_class_gradebook_entries[$indexPrev]' order by rank"); + if($db->nextRecord()) + { + $rank2=$db->record['rank']; + } + + //** swapping the ranks + $temp=$rank; + $rank=$rank2; + $rank2=$temp; + + //**swapping the ranks in DB + $db->query("update class_gradebook_entries set rank='$rank' where id_class_gradebook_entries='$id_class_gradebook' and id_classes='$classId'"); + $db->query("update class_gradebook_entries set rank='$rank2' where id_class_gradebook_entries='$id_class_gradebook_entries[$indexPrev]' and id_classes='$classId'"); + + $this->run(&$db,&$u,&$lc,&$t); + + } + + function downRun(&$db,&$u,&$lc,&$t) + { + $id=$lc->getvars['id']; + $classId = $u->activeClassTaught->id_classes; + + $id_class_gradebook_entries=array(); + + $db->query("select id_class_gradebook_entries from class_gradebook_entries where id_classes='$classId' order by rank"); + + while($db->nextRecord()) + { + array_push($id_class_gradebook_entries,$db->record['id_class_gradebook_entries']); + } + $id_class_gradebook=$id_class_gradebook_entries[$id]; + + $rank=array(); + $db->query("select rank from class_gradebook_entries where id_classes='$classId' and id_class_gradebook_entries='$id_class_gradebook' order by rank"); + while($db->nextRecord()) + { + $rank=$db->record['rank']; + } + + + $temp = array(); + $db->query("select rank from class_gradebook_entries where id_classes='$classId' order by rank"); + while($db->nextRecord()) + { + array_push($temp,$db->record['rank']); + } + + $index=array_keys($temp,$rank,true); + + $indexNext=$index[0]+1; + + $db->query("select rank from class_gradebook_entries where id_classes='$classId' and id_class_gradebook_entries='$id_class_gradebook_entries[$indexNext]' order by rank"); + if($db->nextRecord()) + { + $rank2=$db->record['rank']; + } + + //** swapping the ranks + $temp=$rank; + $rank=$rank2; + $rank2=$temp; + + //**swapping the ranks in DB + $db->query("update class_gradebook_entries set rank='$rank' where id_class_gradebook_entries='$id_class_gradebook' and id_classes='$classId'"); + $db->query("update class_gradebook_entries set rank='$rank2' where id_class_gradebook_entries='$id_class_gradebook_entries[$indexNext]' and id_classes='$classId'"); + + $this->run(&$db,&$u,&$lc,&$t); + + } + +} +?> Added: logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html =================================================================== --- logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html (rev 0) +++ logicampus/trunk/src/logicreate/services/gradebook/templates/arrangement.html 2009-08-20 04:26:32 UTC (rev 1305) @@ -0,0 +1,42 @@ +<?=$t['sectionheader'];?> +<?if($t['message']){ ?><span style="color:blue"><?=$t['message'];?></span><?}?> +<?if($t['error']){ ?><span style="color:red"><?=$t['error'];?></span><?}?> + +<html> +<head> +<title>ranking</title> +</head> +<body> +<table> + <tr><td><strong><font size="+1">Entities</font></strong></td></tr> + <tr><td> </td></tr> + <? + $entries=$t['entries']; + $title=$t['title']; + $length=$t['length']; + $i=0; + foreach($title as $ti) + { + + print_r('<tr>'); + print_r('<td width="150"><strong>'.$ti.'</strong></td>'); + print_r('<td>'); + if($i > 0) + { + print_r ('<a href="'.appurl('gradebook/arrangement/event=up/id=').$i.'"><img src='.IMAGES_URL.'up.gif border="0"></a>'); + } + print_r('</td>'); + print_r('<td>'); + if($i < ($length-1)) + { + print_r('<a href="'.appurl('gradebook/arrangement/event=down/id=').$i.'"><img src='.IMAGES_URL.'down.gif border="0"></a>'); + } + print_r('</td>'); + print_r('</tr>'); + $i++; + } + ?> + +</table> +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-08-05 10:50:08
|
Revision: 1304 http://logicampus.svn.sourceforge.net/logicampus/?rev=1304&view=rev Author: faheemkhan Date: 2009-08-05 10:50:00 +0000 (Wed, 05 Aug 2009) Log Message: ----------- Transcript feature addition Modified Paths: -------------- logicampus/trunk/src/logicreate/services/administration/templates/main_main.html Added Paths: ----------- logicampus/trunk/src/logicreate/services/administration/getTranscriptTemplate.lcp logicampus/trunk/src/logicreate/services/administration/templates/generateStudentTranscript.html logicampus/trunk/src/logicreate/services/administration/templates/getTranscriptTemplate.html logicampus/trunk/src/logicreate/services/administration/templates/showTranscriptTemplate.html logicampus/trunk/src/logicreate/services/administration/templates/transcript.html logicampus/trunk/src/logicreate/services/administration/transcript.lcp Added: logicampus/trunk/src/logicreate/services/administration/getTranscriptTemplate.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/administration/getTranscriptTemplate.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/getTranscriptTemplate.lcp 2009-08-05 10:50:00 UTC (rev 1304) @@ -0,0 +1,186 @@ + <? + /* + * MODULENAME + * created MODULEDATE + * + */ + include_once(LIB_PATH.'PBDO/TranscriptTemplate.php'); + include_once(LIB_PATH.'datagrid.php'); + include_once(LIB_PATH."LC_html.php"); + include_once(LIB_PATH.'semesterObj.php'); + include_once(LIB_PATH.'SiteForms.php'); + + class getTranscriptTemplate extends AdminService + { + var $presentor = "htmlPresentation"; + //var $authorizer = 'ServiceMapAuth'; + var $navlinks = array( + 'Administration Home' => '', + ); + + function run($db,&$u,&$lc,&$t) + { + $lc->templateName = 'getTranscriptTemplate'; + + $db->query("select * from transcript_template"); + $db->nextRecord(); + //echo $db->record['headerLine1']; + //echo $db->record['headerLine2']; + + $t['text1'] = $db->record['headerLine1']; + $t['text2'] = $db->record['headerLine2']; + $t['text3'] = $db->record['footerLine1']; + $t['text4'] = $db->record['footerLine2']; + $t['imgLocation'] = $db->record['imageLocation']; + + + + } + + + function showTranscriptRun($db,&$u,&$lc,&$t){ + + //$lc->templateName = "displayTranscript"; + //$lc->templateStyle = 'private'; + + $id_classes = array(); + $username = $lc->username; + + //echo "HELLO"; + + $content = file_get_contents( $lc->uploads['file']['tmp_name'] ) ; + + $text1 = $lc->postvars['text1']; + $text2 = $lc->postvars['text2']; + $footer1 = $lc->postvars['text3']; + $footer2 = $lc->postvars['text4']; + + + + //strrpos()Finds the position of the last occurrence of a string inside another string (case-sensitive) + /* + echo "Upload: " . $_FILES["file"]["name"] . "<br />"; + echo "Type: " . $_FILES["file"]["type"] . "<br />"; + echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; + echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; + + // $newName = time(); + */ + $dotIndex = strrpos($_FILES["file"]["name"],"."); + $myFileName = substr($_FILES["file"]["name"],0,$dotIndex); + //$myFileName = $myFileName.$newName; + $myFileExt = substr($_FILES["file"]["name"],$dotIndex,strlen($_FILES["file"]["name"])); + + $path = "images/".$_FILES['file']['name']; + + if (move_uploaded_file($_FILES['file']['tmp_name'], "$path")) { + // print "Received {$_FILES['file']['name']} - its size is {$_FILES['file']['size']}"; + } else { + // print "Upload failed!"; + } + + + /* $file=fopen("TranscriptLogo.jpg","w"); + fwrite($file,$content); + fclose($file); + */ + $db2=DB::getHandle(); + $db->query("select * from transcript_template "); + if($db->nextRecord()){ + $db2->query("update transcript_template set headerLine1 = '$text1' , headerLine2 = '$text2', imageLocation = '$myFileName$myFileExt', footerLine1 = '$footer1', footerLine2 = '$footer2'"); + + $t['msg'] = "Record saved SuccessFully"; + } + else{ + $db2->query("insert into transcript_template values('$text1','$text2','$myFileName$myFileExt','$footer1','$footer2')"); + + $t['msg'] = "Record saved SuccessFully"; + + } + $this->run($db,&$u,&$lc,&$t); + return ; + + + /* + if (file_exists(IMAGES_URL. $_FILES["file"]["name"])) + { + echo $_FILES["file"]["name"] . " already exists. "; + } + else + { + move_uploaded_file($_FILES["file"]["tmp_name"], + IMAGES_URL . $_FILES["file"]["name"]); + echo "Stored in: " . IMAGES_URL. $_FILES["file"]["name"]; + } + */ + + + //} + //else + + // } + + + /* + echo $lc->uploads['fileLocation']; + echo $lc->uploads['fileLocation']['tmp_name'] ; + + $file=fopen("TranscriptLogo.jpg","w"); + fwrite($file,$content); + fclose($file); + + //$db->query("insert into transcript_template values('$text1','$text2','".addslashes($content)."')"); + + $db->query("select logoLocation from transcript_template"); + $db->nextRecord(); + + $t['image'] = $db->record['logoLocation']; + */ + }// end of function + + + function displayTranscriptRun($db,&$u,&$lc,&$t){ + + $lc->templateName = "displayTranscript"; + $lc->templateStyle = 'private'; + //echo "In display Transcript func"; + //header('Content-Type: image/jpeg'); + // header('Content-length: '. $db->record['logoLocation']); + + $db->query("select header1,logoLocation from transcript_template"); + $db->nextRecord(); + + echo $db->record['header1'] ; + echo $db->record['logoLocation'] ; + + + + $t['image'] = $db->record['logoLocation']; + + } + + function displayImageRun($db,&$u,&$lc,&$t){ + + //$lc->templateName = "displayTranscript"; + //$lc->templateStyle = 'private'; + + $id_classes = array(); + $username = $lc->username; + $db->query("select logoLocation from transcript_template"); + $db->nextRecord(); + + header('Content-Type: image/jpeg'); + header('Content-length: '. $db->record['logoLocation']); + echo $db->record['logoLocation']; + flush(); + ob_end_flush(); + exit(); + + + + $t['image'] = $db->record['logoLocation']; + + } + + }// end of class + ?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/services/administration/templates/generateStudentTranscript.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/generateStudentTranscript.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/generateStudentTranscript.html 2009-08-05 10:50:00 UTC (rev 1304) @@ -0,0 +1,27 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Generate Student Transcript</title> +</head> + +<body> + +<form action="<?=appurl('administration/Transcript/')?>" method="post"> +<table> + <tr> + <td>Enter Student Username: </td> + <td><input type="text" id="studentId" name="studentId"> </td> + </tr> + <tr> + <td> </td> + <td><input type="submit" value="Proceed" > </td> + </tr> + +</table> + +</form> + +</body> +</html> Added: logicampus/trunk/src/logicreate/services/administration/templates/getTranscriptTemplate.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/getTranscriptTemplate.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/getTranscriptTemplate.html 2009-08-05 10:50:00 UTC (rev 1304) @@ -0,0 +1,105 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<?=$t['sectionheader'];?> + +<? +if ($t['msg'] != '') { ?> + <br><span style="color: blue;"><?=$t['msg'];?></span> <br><br><? } ?> + +<? +if ($t['err'] == '') { ?> + +<? } else { ?> + <br><span style="color: red;"><?=$t['err'];?></span><br><br><? } ?> + + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> +<!-- + * Created on Jun 16, 2009 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates +--> + <head> + <title>getTranscript </title> + <style type="text/css"> +<!-- +.style1 {color: #FFFFFF} +--> + </style> + </head> +<script type="text/javascript" language="javascript"> +function func(){ + alert("HELLO"); + alert(document.getElementById('fileLocation').src); + +} +</script> + <body> + +<form method="post" action="<?=appurl('administration/getTranscriptTemplate/event=showTranscript')?>" enctype="multipart/form-data"> +<table width="100%"> +<tr bgcolor="#7785FD"> + <td colspan="2"><span class="style1">Define Header: </span></td> + </tr> +<tr> +<td width="30%">Header Text 1: </td> +<td width="70%"><input name="text1" type="text" value="<?= $t['text1']?>" ></td> +</tr> +<tr> + <td> </td> + <td> e.g . Punjab University College Of Information Technology </td> +</tr> +<tr> +<td width="30%">Header Text 2: </td> +<td width="70%"><input name="text2" type="text" value="<?= $t['text2']?>"></td> +</tr> +<tr> + <td> </td> + <td>e.g. The University Of Punjab</td> +</tr> +<tr bgcolor="#7785FD"> + <td colspan="2"><span class="style1">Select your Company Logo: </span></td> + </tr> +<tr> +<td width="30%">Locate the Logo Position: </td> +<td width="70%"><input name="file" type="file" value="" size="" id="file" > </td> +</tr> + +<tr> + <td> </td> + <td>e.g. Your Company Logo </td> +</tr> +<tr bgcolor="#7785FD"> + <td colspan="2"><span class="style1">Define Footer: </span></td> + </tr> +<tr> +<td width="30%">Footer Line 1: </td> +<td width="70%"><input name="text3" type="text" value="<?= $t['text3']?>"/> +</td> +</tr> +<tr> + <td> </td> + <td>e.g. Shahrahe Quaid-e-Azam Allama Iqbal Campus ( Old Campus ) Lahore </td> +</tr> +<tr> +<td width="30%">Footer Line 2: </td> +<td width="70%"><input name="text4" type="text" value="<?= $t['text4']?>"></td> +</tr> + +<tr> + <td></td> + <td>e.g. Contact # +92-111-923-923</td> +</tr> +<tr> +<td></td> +<td><input name="button1" value="Save" type="submit" /></td> + +</tr> +</table> + +</form> + + </body> +</html> Modified: logicampus/trunk/src/logicreate/services/administration/templates/main_main.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/main_main.html 2009-07-29 13:43:42 UTC (rev 1303) +++ logicampus/trunk/src/logicreate/services/administration/templates/main_main.html 2009-08-05 10:50:00 UTC (rev 1304) @@ -120,7 +120,9 @@ <a href="<?=APP_URL?>examschedule">Exam Scheduling</a> | <a href="<?=APP_URL?>seminarorientation/">Seminar and Orientation Scheduling</a> | <a href="<?=APP_URL?>textbookmgr">Textbook Manager</a> | - <a href="<?=APP_URL?>remotetest">Remote Test Administration</a> + <a href="<?=APP_URL?>remotetest">Remote Test Administration</a> | + <a href="<?=APP_URL?>administration/getTranscriptTemplate/">Define Transcript Template</a> | + <a href="<?=APP_URL?>administration/transcript/event=generateStudentTranscript/">View Transcript</a> </td> </tr> Added: logicampus/trunk/src/logicreate/services/administration/templates/showTranscriptTemplate.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/showTranscriptTemplate.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/showTranscriptTemplate.html 2009-08-05 10:50:00 UTC (rev 1304) @@ -0,0 +1,33 @@ +<?=$t['sectionheader'];?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US"> +<!-- + * Created on Jun 16, 2009 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates +--> + <head> + <title> </title> + </head> + <body> + <form> + <!--<input name="" type="image" src="<?= $t['image']; ?>" />--> + <img src="<?= $t['image']; ?> " /> + <table width="100%"> + <table width="50%"> <tr><td></td></tr></table> + + <tr> + <td> </td> + </tr> + <tr> + <td><!-- <? echo $t['image'];?> --> </td> + + </tr> + </table> + + </form> + </body> +</html> Added: logicampus/trunk/src/logicreate/services/administration/templates/transcript.html =================================================================== --- logicampus/trunk/src/logicreate/services/administration/templates/transcript.html (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/templates/transcript.html 2009-08-05 10:50:00 UTC (rev 1304) @@ -0,0 +1,120 @@ + +<!-- + * Created on Jun 18, 2009 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates + +--> + +<? if ($t['presentation'] == "Yes") {} else{?> + +<? echo $t['sectionheader']; }?> + + + + <head> + <title> </title> + </head> + <body> + <? + + $semesterList = $t['semesterList']; + $resultCourses = $t['resultCourses']; + $semesterClasses = $t['semesterClasses']; + $semesterList = $t['semesterList']; + $semesterTermList = $t['semesterTermList']; + $courseIdList = $t['courseIdList']; + $courseNameList = $t['courseNameList']; + $courseNumberList = $t['courseNumberList']; + ?> + <form> + <div align="center"> + + <table> + <tr> + <td> + + </td> + </tr> + + </table> + + <table width="50%" border="0"> + <tr> + <td width="50"><img src="<?php echo IMAGES_URL.$t['imgLocation']; ?>" width="200%" height="150%" /></td> + + <td rowspan="2" align="center" ><b><? echo $t['text1']; ?></b> + <br/> + <b> <? echo $t['text2']; ?></b></td> + </table> + <table width="50%"> + <tr> + <tr> + <td align="right"> </td> + <td> </td> + <td align="right">Dated : </td> + <td><? echo date("d M, Y");?> </td> + + </tr> <td width align="right"> First Name : </td> + <td> <? echo $t['firstName']; ?> </td> + <td align="right">Last Name : </td> + <td > <? echo $t['lastName']; ?> </td> + </tr> + + + + </table> + + <table width="50%" border="1"> + <? + foreach($semesterList as $sl){ + ?> + <tr bgcolor="#7785FD" style="color:#FFFFFF; background-color:#7785FD "> + <td colspan="3" > Semester + <? echo $semesterTermList[$sl]; ?> </td> + </tr> + + <tr> + <td width="22%"><b>Course Number </b></td> + <td width="43%"><b>Course Name</b></td> + <td width="35%"><b>Marks Obtained</b></td> + + </tr> + + <? foreach($semesterClasses[$sl] as $sc){ + ?> + <tr> + + <td> <? echo $courseNumberList[$courseIdList[$sc]]; ?> </td> + <td> <? echo $courseNameList[$courseIdList[$sc]]; ?> </td> + <td> <? echo $resultCourses[$sc]; ?>%</td> + + </tr> + <? } ?> + + <? } ?> +</table> + +<table border="1" width="50%"> + <tr> + <td align="center"><? echo $t['text3']; ?> + <br/> <? echo $t['text4']; ?> </td> + </tr> +</table> +<br/> +<br/> +<br/> +<table width="50%"> + <tr> + <td align="left">Issuing Authority : _____________________________</td> + + </tr> +</table> + + +<input type="hidden" name="studentId" id="studentId" value="<?= $t['studentId']; ?>"> +</div> +</form> + </body> +</html> Added: logicampus/trunk/src/logicreate/services/administration/transcript.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/administration/transcript.lcp (rev 0) +++ logicampus/trunk/src/logicreate/services/administration/transcript.lcp 2009-08-05 10:50:00 UTC (rev 1304) @@ -0,0 +1,171 @@ +<?php +/* + * Created on Jun 18, 2009 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates + */ +include_once(LIB_PATH.'datagrid.php'); +include_once(LIB_PATH."LC_html.php"); +include_once(LIB_PATH.'semesterObj.php'); +include_once(LIB_PATH.'SiteForms.php'); + +class transcript extends AdminService { + +var $presentor = "htmlPresentation"; + //var $authorizer = 'ServiceMapAuth'; + var $a_semester_code = array(); + var $a_semester = array(); + + // Links + var $sectionTitle = 'Semster Manager'; + var $navlinks = array( + 'Administration Home' => '', + ); + var $applinks = array( + 'Printer Friendly' => 'Printer Friendly/' + ); + + /* + * Semester terms is used to get the literal meaning of each code. + * If you wish to add additional semester terms to the system, you + * MUST add them to this array. For example, if you wanted to add + * Summer1 and Summer2, add them here first + */ + + var $semesterTerms = array("SU"=>"Summer", "SP"=>"Spring", "FA"=>"Fall", "WI"=>"Winter" + ,'S1'=> 'Summer I', 'S2'=>'Summer II', 'WM'=>'Winter Mini', 'FM'=>'Fall Mini', 'PM'=>'Spring Mini', 'SM'=>'Summer Mini' + ); + + + function run($db,&$u,&$lc,&$t) + { + + $lc->templateName = 'transcript'; + $student_id = $lc->postvars['studentId']; + + if ( $lc->getvars['print'] ) { + $this->presentor = 'emptyPresentation'; + //$this->presentor = 'htmlPresentation'; + $t['presentation'] = "Yes"; + $student_id = $lc->getvars['id']; + }else{ + $this->applinks['Printer Friendly'] = 'transcript/print=yes/id='.$student_id; + } + + $db->query("select * from transcript_template"); + $db->nextRecord(); + + $t['text1'] = $db->record['headerLine1']; + $t['text2'] = $db->record['headerLine2']; + $t['text3'] = $db->record['footerLine1']; + $t['text4'] = $db->record['footerLine2']; + $t['imgLocation'] = $db->record['imageLocation']; + + $classIDList = array();//to hold the list of classes taken by the student + $courseIdList = array();// to hold the courseIds against the classes student have taken + $semesterList = array();// will hold the number of semesters student have taken so far + $semesterTermList = array();// will hold the particular name of the semester + $semesterClasses = array(array());// will hold the record of each class in a particular semester + + $db->query("select distinct semester_id from class_enrollment where student_id = $student_id"); + while($db->nextRecord()) + { + array_push($semesterList ,$db->record['semester_id']); + } + + $t['semesterList'] = $semesterList ; + + $classMarks = array(); + foreach ($semesterList as $sl ) + { + $db->query("select semesterTerm, dateCensus from semesters where id_semesters = $sl"); + $db->nextRecord(); + $semesterTermList[$sl] = $db->record['semesterTerm'].' '.substr($db->record['dateCensus'],0,4); + } + + $t['semesterTermList'] = $semesterTermList; + + foreach ($semesterList as $sl ) + { + $db->query("select class_id from class_enrollment where semester_id = $sl and student_id = $student_id "); + $i=0;// iterator to push id_classes in each semester from index 0. + while ($db->nextRecord()) + { + $semesterClasses[$sl][$i] = $db->record['class_id'] ; + $i++; + } + } + + $t['semesterList'] = $semesterList; + $t['semesterClasses'] = $semesterClasses; + + /** + * getting the grades scored by the student from the previous classes + * */ + foreach($semesterList as $c ){ + foreach($semesterClasses[$c] as $r){ + $db->query("select (sum(score)/tot.total)*100 as score from class_gradebook_val, (SELECT sum(total_points) AS total FROM class_gradebook_entries WHERE id_classes = '$r' ) AS tot" . + " where id_classes = $r and student_id =$student_id "); + $db->nextRecord(); + $resultCourses[$r] = sprintf("%0.2f",$db->record['score']); + } + } + $t['resultCourses'] = $resultCourses; + + + /** + * + * getting the name of the courses on the bases of class id + * + * i have put the courseIdList on the bases of the classIds + * + * */ + foreach($semesterList as $sl ){ + foreach($semesterClasses[$sl] as $sc){ + + $db->query("select distinct id_courses from classes where id_classes = $sc "); + $db->nextRecord(); + + $courseIdList[$sc] = $db->record['id_courses']; + } + } + $t['courseIdList'] = $courseIdList; + + foreach($semesterList as $sl ){ + foreach($semesterClasses[$sl] as $sc){ + + $db->query("select distinct courseName, courseNumber from courses where id_courses = $courseIdList[$sc]"); + $db->nextRecord(); + + $courseNameList[$courseIdList[$sc]] = $db->record['courseName']; + $courseNumberList[$courseIdList[$sc]] = $db->record['courseNumber']; + + } + } + + $t['courseNameList'] = $courseNameList; + $t['courseNumberList'] = $courseNumberList; + $t['classIDList'] = $classIDList; + $t['classMarks'] = $classMarks; + + + + $db->query("select firstname , lastname from profile where username = '$student_id'"); + $db->nextRecord(); + $firstName = $db->record['firstname']; + $lastName = $db->record['lastname']; + + $t['firstName'] = $firstName ; + $t['lastName'] = $lastName ; + + }// end of main function + + +function generateStudentTranscriptRun($db,&$u,&$lc,&$t) +{ + $lc->templateName = 'generateStudentTranscript'; +} +}// end of class + +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-07-29 13:43:52
|
Revision: 1303 http://logicampus.svn.sourceforge.net/logicampus/?rev=1303&view=rev Author: faheemkhan Date: 2009-07-29 13:43:42 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Submission of Task 158171 Modified Paths: -------------- logicampus/trunk/src/logicreate/services/lobrepo/add.lcp logicampus/trunk/src/logicreate/services/lobrepo/edit.lcp logicampus/trunk/src/logicreate/services/lobrepo/import.lcp logicampus/trunk/src/logicreate/services/lobrepo/myobj.lcp logicampus/trunk/src/logicreate/services/lobrepo/templates/add_doc.html logicampus/trunk/src/logicreate/services/lobrepo/templates/edit_meta.html Added Paths: ----------- logicampus/trunk/src/logicreate/services/lobrepo/templates/add_audio.html Modified: logicampus/trunk/src/logicreate/services/lobrepo/add.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/add.lcp 2009-07-29 13:41:24 UTC (rev 1302) +++ logicampus/trunk/src/logicreate/services/lobrepo/add.lcp 2009-07-29 13:43:42 UTC (rev 1303) @@ -35,7 +35,7 @@ $t['lob'] = new LC_Lob_Content(); - $ext = addslashes($lc->getvars['m']); + $ext = addslashes($lc->getvars['m']); $mimetype = Lc_Lob_Util::getMimeForSubtype($lc->getvars['t'],$ext); switch($lc->getvars['t']) { case 'html': @@ -68,11 +68,13 @@ } - function uploadToLob(&$lob,&$lc,$upName) { + function uploadToLob(&$lob,&$lc,$upName,$u) { + $mime_type=$lc->postvars['mimeype']; $lob->set('lobContent', $lc->postvars['txText']); $lob->set('lobTitle', $lc->postvars['txTitle']); - + $lob->set('lobFilename', urlencode( $lc->uploads[$upName]['name'] ) ); + $lob->set('lobBinary', file_get_contents( $lc->uploads[$upName]['tmp_name'] ) ); $lob->set('lobContent', $lc->postvars['txText']); $lob->set('lobSubType',$lc->postvars['lob_sub_type']); @@ -82,7 +84,8 @@ $n, (strrpos($n, '.') - strlen($n) +1) ); - + + $spl= urlencode( $lc->uploads[$upName]['name'] ); $ext = strtolower($ext); $m = Lc_Lob::getMimeForSubtype($lc->postvars['lob_sub_type'],$ext); $lob->set('lobMime', $m); @@ -91,6 +94,8 @@ $lob->set('lobUrltitle', LC_Lob::createLinkText($lob->get('lobTitle'),$ext) ); + + } Modified: logicampus/trunk/src/logicreate/services/lobrepo/edit.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/edit.lcp 2009-07-29 13:41:24 UTC (rev 1302) +++ logicampus/trunk/src/logicreate/services/lobrepo/edit.lcp 2009-07-29 13:43:42 UTC (rev 1303) @@ -27,7 +27,7 @@ function run(&$db,&$u,&$lc,&$t) { $lobId = addslashes(trim($lc->getvars['c'])); $lc->templateName = 'edit_main'; - + $lob = new Lc_Lob_Content($lobId); $t['lob'] = $lob; @@ -83,8 +83,9 @@ function saveRun(&$db,&$u,&$lc,&$t) { $id = intval($lc->postvars['lob_id']); $lob = new Lc_Lob_Content($id); - + if ($lc->postvars['lob_sub_type'] == 'document') { + $lob->setFile( $lc->uploads['content']['tmp_name'], $lc->uploads['content']['name']); @@ -149,7 +150,7 @@ // exit(); $u->addSessionMessage('Successfully saved <i>"'.htmlentities($lob->get('lobTitle'),ENT_QUOTES, 'UTF-8').'"</i>.'); - + //$u->addSessionMessage('Successfully saved <i>"'.htmlentities($lc->uploads['content']['name'])."-".htmlentities($lc->uploads['content']['tmp_name']).'"</i>.'); $this->presentor = 'redirectPresentation'; $t['url'] = appurl('lobrepo/edit/event=meta/id='.$id); } @@ -162,6 +163,7 @@ $lobId = intval($lc->getvars['id']); $lc->templateName = 'edit_meta'; $lob = new Lc_Lob_Content($lobId); + $t['lob'] = $lob; $t['licenses'] = $this->getLicenseArray(); } @@ -199,8 +201,10 @@ $lobObj = LobRepoEntry::load($lobId); $lobObj->lobNotes = $lc->postvars['lob_notes']; $lobObj->save(); - + $class_id=intval($lc->postvars['lob_notes']); + $this->presentor = 'redirectPresentation'; + $t['url'] = appurl('lobrepo/myobj/'); } Modified: logicampus/trunk/src/logicreate/services/lobrepo/import.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/import.lcp 2009-07-29 13:41:24 UTC (rev 1302) +++ logicampus/trunk/src/logicreate/services/lobrepo/import.lcp 2009-07-29 13:43:42 UTC (rev 1303) @@ -10,7 +10,7 @@ include_once(LIB_PATH.'PBDO/LobTest.php'); include_once(LIB_PATH.'lob/lc_lob.php'); - +include_once(LIB_PATH.'xmlparser.php'); /** * Learning Object Repository */ @@ -30,100 +30,683 @@ $lc->templateName='import_main'; } - - function handleUploadRun(&$db,&$u,&$lc,&$t) { + function handleUploadRun(&$db,&$u,&$lc,&$t) + { if ($lc->uploads['lobxml']['error']) { - die('upload error'); + $this->presentor = 'errorMessage'; + $t['message'] = "There was a problem with the upload."; + return false; } - //debug($lc->uploads); - $tempdir = $this->tempdir('/tmp', 'campus'); - $this->tempdir = $tempdir; - //debug($tempdir); - - //$za = zip_open($lc->uploads['lobxml']['tmp_name']); - //debug($za); - - exec('unzip -d '. $tempdir.' '.$lc->uploads['lobxml']['tmp_name'] ); - -// exit(); - + + //$tempdir="c:/windows/temp"; + + //$this->tempdir = $tempdir; + + + + //$target_path=explode(".",$lc->uploads['lobxml']['tmp_name']); + //$target_pathing=$target_path[0].".zip"; + //move_uploaded_file($lc->uploads['lobxml']['tmp_name'],$target_pathing); + $file = $lc->uploads['lobxml']['tmp_name']; + //$file = substr($file, 0, strlen($file)-4); + //$file .= '.zip'; + exec('mkdir '.$file.'_dir;'); + $this->tempdir = $file['tmp_name'].'_dir'; + $tempdir = $this->tempdir; + $this->unzipper($file,$tempdir); + echo $tempdir; + $doc = new DomDocument('1.0', 'UTF-8'); $doc->substituteEntities=false; $doc->resolveExternals=false; $doc->preserveWhiteSpace=true; $doc->validateOnParse=false; + if (!$doc->load( $tempdir."/learningobjects.xml") ) { - echo "can't open xml file."; + $this->presentor = 'errorMessage'; + $t['message'] ="This file does not seem to be a proper backup file. (cannot find learningobjects.xml)"; + //$this->cleanupDir($tempdir); return false; } $root = $doc->childNodes; //get the "lobcol" node - $collectionNode = $root->item(0); + $collectionNode = $root->item(1); $lobNodes = $collectionNode->getElementsByTagnameNS('http://logicampus.sourceforge.net/2006/learning_object','obj'); - for ($xidx = 0; $xidx < $lobNodes->length; $xidx++) { - $node = $lobNodes->item($xidx); - if ($node->nodeType == XML_TEXT_NODE) { - continue; + $xml_contents = file_get_contents($tempdir."/learningobjects.xml"); + $xmlObj = new xmlparser($xml_contents); + $root_node =& $xmlObj->getRoot(); + foreach($root_node->children as $classdata_node) + { + + + if ($classdata_node->tag == 'lob:obj') + { + // execute classroom restore + + $this->lobobj_node($u,$db,$classdata_node); + + } else + { + + // what other tag could it be? if anything else, we won't process. we have one responsability.. to restore CLASSROOM node } - $lobSub = null; - $lobObj = $this->makeRepoNode($node); - $lobMetaObj = $this->processLobMeta($node); - $lobUserObj = new LobUserLink(); - - if ($lobObj === null) { -echo "skipping node .. ".$node->tagName."...<br/>\n"; - continue; /*die('null object'); continue;*/ - } - if ($lobObj->lobType == 'content') { - $lobSub = $this->makeContentNode($node); - } - if ($lobObj->lobType == 'activity') { - $lobSub = $this->makeActivityNode($node); - } - - -// echo "saving ".$xidx." lob ... <br/>\n"; - // debug($lobObj->lobTitle); - $lobObj->save(); - - if ( is_object($lobSub) ) { - $lobSub->set('lobRepoEntryId',$lobObj->getPrimaryKey()); - $lobSub->save(); -// echo $xidx." is a *CONTENT* lob ... <br/>\n"; -// echo substr($lobSub->lobText,0,1000)."<br/>\n"; - } -//* - $lobMetaObj->set('lobRepoEntryId',$lobObj->getPrimaryKey()); - $lobMetaObj->save(); - - $lobUserObj->set('lobRepoEntryId',$lobObj->getPrimaryKey()); - $lobUserObj->set('userId',$u->userId); - $lobUserObj->set('isOwner','1'); - $lobUserObj->save(); -//*/ - + $this->presentor = 'redirectPresentation'; + $t['url'] = appurl('classmgr'); } - - - $u->addSessionMessage('Successfully added content.'); - -// debug( htmlentities( file_get_contents( $tempdir.'/learningobjects.xml') ) ); - - - unlink($tempdir.'/learningobjects.xml'); - rmdir($tempdir); - - $this->presentor = 'redirectPresentation'; - $t['url'] = appurl('lobrepo/myobj'); + + $this->run(&$db,&$u,&$lc,&$t); + return; } - - /** + /** * return a lob content sub-object */ + + function test_child($u,$db,$node) + { + + $class=$u->activeClassTaught->id_classes; + $userId=$u->userId; + $lob_guid=$node->attrs['guid']; + + $child=$node->children[0]; + $lob_type=$child->value; + + $child=$node->children[1]; + $lob_subtype=$child->value; + + $child=$node->children[2]; + $lob_mime=$child->value; + + $child=$node->children[3]; + $lob_title=$child->value; + + $child=$node->children[4]; + $lob_description=$child->value; + + $child=$node->children[5]; + $lob_copystyle=$child->value; + + $child=$node->children[6]; + $lob_testqst=$child->value; + if($lob_testqst=' ') + { + $lob_testqst=' '; + } + $child=$node->children[7]; + $lob_qstchoices=$child->value; + $lob_qstchoices=addslashes($lob_qstchoices); + $child=$node->children[8]; + $lob_qsttype=$child->value; + + $child=$node->children[9]; + $lob_qstpoints=$child->value; + + $child=$node->children[10]; + $lob_numretry=$child->value; + + $child=$node->children[11]; + $lob_ispractice=$child->value; + + $child=$node->children[12]; + $lob_image=$child->value; + + $child=$node->children[13]; + + $lifecyle=$child; + $child=$lifecyle->children[0]; + $lob_createdon=$child->value; + $child=$lifecyle->children[1]; + $lob_version=$child->value; + + $updatedtime=date("U"); + $lob_repo_entry_id=0; + $lob_class_repo_id=0; + $lob_test_id=0; + + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $db->query("update lob_repo_entry set lob_title='$lob_title', lob_type='$lob_type', lob_sub_type='$lob_subtype', lob_mime='$lob_mime', lob_description='$lob_description',lob_version='$lob_version' where lob_guid='$lob_guid' "); + }else + { + $db->query("insert into lob_repo_entry(lob_guid,lob_title,lob_type,lob_sub_type,lob_mime,lob_description,lob_version) values('$lob_guid','$lob_title','$lob_type','$lob_subtype','$lob_mime','$lob_description','$lob_version')"); + } + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $lob_repo_entry_id=$db->record['lob_repo_entry_id']; + } + $db->query("select * from lob_class_repo where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $db->query("update lob_class_repo set lob_title='$lob_title', lob_type='$lob_type', lob_sub_type='$lob_subtype', lob_mime='$lob_mime', lob_description='$lob_description',lob_version='$lob_version',lob_copy_style='$lob_copystyle' where lob_guid='$lob_guid' "); + }else + { + $db->query("insert into lob_class_repo(class_id,lob_repo_entry_id,lob_guid,lob_title,lob_type,lob_sub_type,lob_mime,lob_description,lob_version,lob_copy_style) values($class,$lob_repo_entry_id,'$lob_guid','$lob_title','$lob_type','$lob_subtype','$lob_mime','$lob_description','$lob_version','$lob_copystyle')"); + } + + $db->query("select * from lob_class_repo where lob_guid='$lob_guid' and lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $lob_class_repo_id=$db->record['lob_class_repo_id']; + } + + + + $db->query("select * from lob_test where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + + }else + { + $db->query("insert into lob_test(lob_repo_entry_id) values($lob_repo_entry_id)"); + } + + $db->query("select * from lob_test where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $lob_test_id=$db->record['lob_test_id']; + } + $db->query("select * from lob_class_test where lob_class_repo_id=$lob_class_repo_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_test set num_retry=$lob_numretry, is_practice=$lob_ispractice where lob_class_repo_id=$lob_class_repo_id"); + }else + { + + $db->query("insert into lob_class_test(lob_class_repo_id,num_retry,is_practice) values($lob_class_repo_id,$lob_numretry,$lob_ispractice)"); + } + + + $db->query("select * from lob_test_qst where lob_test_id=$lob_test_id"); + if($db->nextRecord()) + { + + $db->query("update lob_test_qst set qst_text='$lob_testqst', qst_choices='$lob_qstchoices', question_type_id=$lob_qsttype, image_content_id='$image' where lob_test_id=$lob_test_id" ); + + }else + { + $db->query("insert into lob_test_qst(lob_test_id,qst_text,qst_choices,question_type_id,image_content_id) values($lob_test_id,'$lobtestqst','$lob_qstchoices','$lob_qsttype','$image')"); + } + $db->query("select * from lob_user_link where lob_repo_entry_id=$lob_repo_entry_id and user_id=$userId"); + if($db->nextRecord()) + { + + }else + { + $db->query("insert into lob_user_link(lob_repo_entry_id,user_id) values($lob_repo_entry_id,$userId)"); + } + $this->saveMetadata($db,$lob_repo_entry_id,$lob_class_repo_id,'','','','','','',$lob_createdon,$updatedtime); + + } + + function activity_child($u,$db,$node) + { + + + $class=$u->activeClassTaught->id_classes; + $userId=$u->userId; + $lob_guid=$node->attrs['guid']; + + $child=$node->children[0]; + $lob_type=$child->value; + + $child=$node->children[1]; + $lob_sub_type=$child->value; + + $child=$node->children[2]; + $lob_actualsub_type=$child->value; + + $child=$node->children[3]; + $lob_mime=$child->value; + + $child=$node->children[4]; + $lob_title=$child->value; + + $child=$node->children[5]; + $lob_description=$child->value; + + $child=$node->children[6]; + $lob_urltitle=$child->value; + echo $lob_urltitle."urltitle-"; + $child=$node->children[7]; + $lob_copystyle=$child->value; + + $child=$node->children[8]; + $lob_notes=$child->value; + echo $lob_notes."notes-"; + $child=$node->children[9]; + $lifecyle=$child; + + $child=$lifecyle->children[0]; + $lob_createdon=$child->value; + + $child=$lifecyle->children[1]; + $lob_version=$child->value; + echo $lob_version."version-"; + $updatedtime=date("U"); + $lob_repo_entry_id=0; + $lob_class_repo_id=0; + $reponse_type=0; + + if($lob_sub_type=='assignment') + { + + $reponse_type=1; + }else if($lob_sub_type=='activity') + { + $reponse_type=5; + }else + { + $reponse_type=6; + } + + + + + + + + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + echo "update lob_repo_entry set lob_title='$lob_title',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime',lob_urltitle='$lob_urltitle',lob_notes='$lob_notes',lob_description='$lob_description',lob_version=$lob_version where lob_guid='$lob_guid'"."-->"; + $db->query("update lob_repo_entry set lob_title='$lob_title',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime',lob_urltitle='$lob_urltitle',lob_notes='$lob_notes',lob_description='$lob_description',lob_version=$lob_version where lob_guid='$lob_guid'"); + + }else + { + $db->query("insert into lob_repo_entry(lob_guid,lob_title,lob_type,lob_sub_type,lob_mime,lob_urltitle,lob_notes,lob_description,lob_version) values('$lob_guid','$lob_title','$lob_type','$lob_sub_type','$lob_mime','$lob_url','$lob_notes','$lob_description','$lob_version')"); + } + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $lob_repo_entry_id=$db->record['lob_repo_entry_id']; + + } + + $db->query("select * from lob_class_repo where class_id=$class and lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_repo set lob_guid='$lob_guid',lob_title='$lob_title',lob_urltitle='$lob_url',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime', lob_version=$lob_version,lob_copy_style='$lob_copystyle' where class_id=$class and lob_repo_entry_id=$lob_repo_entry_id"); + + }else + { + $db->query("insert into lob_class_repo(class_id,lob_repo_entry_id,lob_guid,lob_title,lob_urltitle,lob_type,lob_sub_type,lob_mime,lob_version,lob_copy_style) values($class,$lob_repo_entry_id,'$lob_guid','$lob_title','$lob_url','$lob_type','$lob_sub_type','$lob_mime',$lob_version,'$lob_copystyle')"); + + } + + $db->query("select * from lob_class_repo where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $lob_class_repo_id=$db->record['lob_class_repo_id']; + } + + $db->query("select * from lob_class_activity where lob_class_repo_id=$lob_class_repo_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_activity set response_type_id=$reponse_type where lob_class_repo_id=$lob_class_repo_id "); + }else + { + + $db->query("insert into lob_class_activity(lob_class_repo_id,response_type_id) values($lob_class_repo_id,$reponse_type)"); + } + $db->query("select * from lob_activity where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_activity set response_type_id=$reponse_type where lob_class_repo_id=$lob_class_repo_id "); + }else + { + + $db->query("insert into lob_activity(lob_repo_entry_id,response_type_id) values($lob_repo_entry_id,$reponse_type)"); + } + $db->query("select * from lob_user_link where lob_repo_entry_id=$lob_repo_entry_id and user_id=$userId"); + if($db->nextRecord()) + { + + }else + { + $db->query("insert into lob_user_link(lob_repo_entry_id,user_id) values($lob_repo_entry_id,$userId)"); + } + $this->saveMetadata($db,$lob_repo_entry_id,$lob_class_repo_id,'','','','','','',$lob_createdon,$updatedtime); + + + } + + function document_child($u,$db,$node) + { + $class=$u->activeClassTaught->id_classes; + $userId=$u->userId; + $lob_guid=$node->attrs['guid']; + + $child=$node->children[0]; + $lob_type=$child->value; + + $child=$node->children[1]; + $lob_sub_type=$child->value; + + $child=$node->children[2]; + $lob_mime=$child->value; + + $child=$node->children[3]; + $lob_title=$child->value; + + $child=$node->children[4]; + $lob_url=$child->value; + + $child=$node->children[5]; + $lob_filename=$child->value; + + + + $lob_filename; + + $document_file=file_get_contents($this->tempdir.'/content/'.trim($lob_filename)); + $document_file=addslashes($document_file); + + + $child=$node->children[6]; + $lob_description=$child->value; + + $child=$node->children[7]; + $lob_caption=$child->value; + + $child=$node->children[8]; + $lob_notes=$child->value; + + $child=$node->children[9]; + $lifecyle=$child; + + $child=$node->children[10]; + $metadata=$child; + + + $child=$lifecyle->children[0]; + + $lob_createdon=$child->value; + + $child=$lifecyle->children[1]; + + $lob_version=$child->value; + + + $lob_repo_entry_id=0; + $lob_class_repo_id=0; + + + $child=($metadata->children[0]); + $meta_subject=$child->value; + + $child=$metadata->children[1]; + $meta_subjectDisc=$child->value; + + $child=$metadata->children[2]; + $meta_author=$child->value; + + $child=$metadata->children[3]; + $meta_source=$child->value; + $child=$metadata->children[4]; + + $meta_copyright=$child->value; + + $child=$metadata->children[5]; + $meta_license=$child->value; + $updatedtime=date("U"); + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + + $db->query("update lob_repo_entry set lob_title='$lob_title',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime',lob_urltitle='$lob_url',lob_notes='$lob_notes',lob_description='$lob_description',lob_version=$lob_version where lob_guid='$lob_guid'"); + + }else + { + $db->query("insert into lob_repo_entry(lob_guid,lob_title,lob_type,lob_sub_type,lob_mime,lob_urltitle,lob_notes,lob_description,lob_version) values('$lob_guid','$lob_title','$lob_type','$lob_sub_type','$lob_mime','$lob_url','$lob_notes','$lob_description','$lob_version')"); + } + + + //getting lob_guid of latest lob from lob_repo_entry + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $lob_repo_entry_id=$db->record['lob_repo_entry_id']; + + } + //lob_user_link + $db->query("select * from lob_user_link where lob_repo_entry_id=$lob_repo_entry_id and user_id=$userId"); + if($db->nextRecord()) + { + + }else + { + $db->query("insert into lob_user_link(lob_repo_entry_id,user_id) values($lob_repo_entry_id,$userId)"); + } + //setting data in lob_metadata + + + $db->query("select * from lob_metadata where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_metadata set created_on='$lob_createdon' where lob_repo_entry_id='$lob_repo_entry_id'"); + + }else + { + $db->query("insert into lob_metadata(lob_repo_entry_id,created_on) values($lob_repo_entry_id,$lob_createdon)"); + } + $db->query("select * from lob_content where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_content set lob_binary='$document_file',lob_caption='$lob_caption',lob_filename='$lob_filename' where lob_repo_entry_id='$lob_repo_entry_id'"); + }else + { + $db->query("insert into lob_content(lob_binary,lob_repo_entry_id,lob_caption,lob_filename) values('$document_file',$lob_repo_entry_id,'$lob_caption','$lob_filename')"); + } + + //setting data in lob_class_repo + $db->query("select * from lob_class_repo where class_id=$class and lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_repo set lob_guid='$lob_guid',lob_title='$lob_title',lob_urltitle='$lob_url',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime', lob_version=$lob_version where class_id=$class and lob_repo_entry_id=$lob_repo_entry_id"); + + }else + { + $db->query("insert into lob_class_repo(class_id,lob_repo_entry_id,lob_guid,lob_title,lob_urltitle,lob_type,lob_sub_type,lob_mime,lob_version) values($class,$lob_repo_entry_id,'$lob_guid','$lob_title','$lob_url','$lob_type','$lob_sub_type','$lob_mime',$lob_version)"); + } + + $db->query("select * from lob_class_repo where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $lob_class_repo_id=$db->record['lob_class_repo_id']; + } + //setting data in lob_class_content + $db->query("select * from lob_class_content where lob_class_repo_id=$lob_class_repo_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_content set lob_binary='$document_file', lob_filename='$lob_filename', lob_caption='$lob_caption' where lob_class_repo_id='$lob_class_repo_id'"); + }else + { + $db->query("insert into lob_class_content(lob_class_repo_id,lob_binary,lob_filename,lob_caption) values($lob_class_repo_id,'$document_file','$lob_filename','$lob_caption')"); + } + //Entered data in tables + + $this->saveMetadata($db,$lob_repo_entry_id,$lob_class_repo_id,$meta_subject,$meta_subjectDisc,$meta_author,$meta_source,$meta_copyright,$meta_license,$lob_createdon,$updatedtime); + + } + + function text_child($u,$db,$node) + { + $class=$u->activeClassTaught->id_classes; + $userId=$u->userId; + + $lob_guid=$node->attrs['guid']; + //echo $lob_guid; + $child=$node->children[0]; + $lob_type=$child->value; + //echo $lob_type; + $child=$node->children[1]; + $lob_sub_type=$child->value; + //echo $lob_sub_type; + $child=$node->children[2]; + $lob_mime=$child->value; + //echo $lob_mime; + $child=$node->children[3]; + $lob_title=$child->value; + //echo $lob_title; + $child=$node->children[4]; + $lob_url=$child->value; + //echo $lob_url; + $child=$node->children[5]; + $lob_text=$child->value; + //echo $lob_text; + $child=$node->children[6]; + + $lob_notes=$child->value; + //echo $lob_meta; + + $child=$node->children[7]; + $lifecyle=$child; + $child=$node->children[8]; + + $metadata=$child; + $child=$lifecyle->children[0]; + + $lob_createdon=$child->value; + //echo $lob_createdon; + $child=$lifecyle->children[1]; + $lob_version=$child->value; + //echo $lob_version; + $lob_repo_entry_id=0; + $lob_class_repo_id=0; + + + $child=($metadata->children[0]); + $meta_subject=$child->value; + + $child=$metadata->children[1]; + $meta_subjectDisc=$child->value; + $child=$metadata->children[2]; + $meta_author=$child->value; + + $child=$metadata->children[3]; + $meta_source=$child->value; + $child=$metadata->children[4]; + + $meta_copyright=$child->value; + + $child=$metadata->children[5]; + $meta_license=$child->value; + $updatedtime=date("U"); + //Entering data in tables + + //Entering text into lob_repo_entry + + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $db->query("update lob_repo_entry set lob_title='$lob_title',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime',lob_urltitle='$lob_url',lob_version=$lob_version, lob_notes='$lob_notes' where lob_guid='$lob_guid'"); + $lob_repo_entry_id=$db->record['lob_repo_entry_id']; + }else + { + $db->query("insert into lob_repo_entry(lob_guid,lob_title,lob_type,lob_sub_type,lob_mime,lob_urltitle,lob_version,lob_notes) values('$lob_guid','$lob_title','$lob_type','$lob_sub_type','$lob_mime','$lob_url','$lob_version','$lob_notes')"); + } + + //getting lob_guid of latest lob from lob_repo_entry + $db->query("select * from lob_repo_entry where lob_guid='$lob_guid'"); + if($db->nextRecord()) + { + $lob_repo_entry_id=$db->record['lob_repo_entry_id']; + + } + //lob_user_link + $db->query("select * from lob_user_link where lob_repo_entry_id=$lob_repo_entry_id and user_id=$userId"); + if($db->nextRecord()) + { + + }else + { + $db->query("insert into lob_user_link(lob_repo_entry_id,user_id) values($lob_repo_entry_id,$userId)"); + } + //setting data in lob_metadata + $db->query("select * from lob_metadata where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_metadata set created_on='$lob_createdon' where lob_repo_entry_id='$lob_repo_entry_id'"); + + }else + { + $db->query("insert into lob_metadata(lob_repo_entry_id,created_on) values($lob_repo_entry_id,$lob_createdon)"); + } + $db->query("select * from lob_content where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_content set lob_text='$lob_text' where lob_repo_entry_id='$lob_repo_entry_id'"); + }else + { + $db->query("insert into lob_content(lob_text,lob_repo_entry_id) values('$lob_text',$lob_repo_entry_id)"); + } + + //setting data in lob_class_repo + $db->query("select * from lob_class_repo where class_id=$class and lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_repo set lob_guid='$lob_guid',lob_title='$lob_title',lob_urltitle='$lob_url',lob_type='$lob_type',lob_sub_type='$lob_sub_type',lob_mime='$lob_mime',lob_version=$lob_version where class_id=$class and lob_repo_entry_id=$lob_repo_entry_id"); + $lob_class_repo_id=$db->record['lob_class_repo_id']; + }else + { + $db->query("insert into lob_class_repo(class_id,lob_repo_entry_id,lob_guid,lob_title,lob_urltitle,lob_type,lob_sub_type,lob_mime,lob_version) values($class,$lob_repo_entry_id,'$lob_guid','$lob_title','$lob_url','$lob_type','$lob_sub_type','$lob_mime',$lob_version)"); + } + + $db->query("select * from lob_class_repo where lob_repo_entry_id=$lob_repo_entry_id"); + if($db->nextRecord()) + { + $lob_class_repo_id=$db->record['lob_class_repo_id']; + } + //setting data in lob_class_content + $db->query("select * from lob_class_content where lob_class_repo_id=$lob_class_repo_id"); + if($db->nextRecord()) + { + $db->query("update lob_class_content set lob_text='$lob_text' where lob_class_repo_id='$lob_class_repo_id' "); + }else + { + $db->query("insert into lob_class_content(lob_class_repo_id,lob_text) values($lob_class_repo_id,'$lob_text')"); + } + //Entered data in tables + + $this->saveMetadata($db,$lob_repo_entry_id,$lob_class_repo_id,$meta_subject,$meta_subjectDisc,$meta_author,$meta_source,$meta_copyright,$meta_license,$lob_createdon,$updatedtime); + + + } + function lobobj_node($u,$db,$node) + { + + + $child0=$node->children[0]; + $child1=$node->children[1]; + + + if($child0->value=='content'&& $child1->value=='text') + { + $this->text_child($u,$db,$node); + }else if($child0->value=='content'&& $child1->value!='text') + { + $this->document_child($u,$db,$node); + }else if($child0->value=='activity') + { + $this->activity_child($u,$db,$node); + }else if($child0->value=='test' && $child1->value=='test') + { + $this->test_child($u,$db,$node); + } + + + + + } + + + function makeContentNode($n) { $result = $n->getElementsByTagname('content'); $textContent = $result->item(0); @@ -338,10 +921,62 @@ if (substr($dir, -1) != '/') $dir .= '/'; do { - $path = $dir.$prefix.mt_rand(0, 9999999); + //$path = $dir.$prefix.mt_rand(0, 9999999); + $path = $dir.$prefix; } while (!mkdir($path, $mode)); return $path; } + function getAttribute($name){ + foreach($this->attributes() as $key=>$val){ + if($key == $name){ + return (string)$val; + }// end if + }// end foreach + }// end function + + function saveMetadata($db,$lob_repo_entry_id,$lob_class_repo_id,$meta_subject,$meta_subjectDisc,$meta_author,$meta_source,$meta_copyright,$meta_license,$lob_createdon,$updatedon) + { + + $id=$lob_repo_entry_id; + + + $db->query("select * from lob_metadata where lob_repo_entry_id=$id"); + if($db->nextRecord()) + { + $db->query("update lob_metadata set subject='$meta_subject',subdisc='$meta_subjectDisc',author='$meta_author',source='$meta_source',copyright='$meta_copyright',license='$meta_license',updated_on='$updatedon',created_on='$lob_createdon' where lob_repo_entry_id=$id"); + }else + { + $db->query("insert into lob_metadata(lob_repo_entry_id,subject,subdisc,author,source,copyright,license,updated_on,created_on) values($id,'$meta_subject','$meta_subjectDisc','$meta_author','$meta_source','$meta_copyright','$meta_license','$updatedon','$lob_createdon')"); + } + + + $db->query("select * from lob_class_metadata where lob_class_repo_id=$lob_class_repo_id"); + if($db->nextRecord()) + { + + $db->query("update lob_class_metadata set subject='$meta_subject',subdisc='$meta_subjectDisc',author='$meta_author',source='$meta_source',copyright='$meta_copyright',license='$meta_license', created_on='$lob_createdon',updated_on='$updatedon' where lob_class_repo_id=$lob_class_repo_id"); + }else + { + $db->query("insert into lob_class_metadata(lob_class_repo_id,subject,subdisc,author,source,copyright,license,created_on,updated_on) values($lob_class_repo_id,'$meta_subject','$meta_subjectDisc','$meta_author','$meta_source','$meta_copyright','$meta_license','$lob_createdon',$updatedon)"); + } + + + + } + + function unzipper($file,$add) + { $zip = new ZipArchive; + $res = $zip->open($file); + if ($res === TRUE) { + + $zip->extractTo($add); + $zip->close(); + } else { + + } + + + } } ?> Modified: logicampus/trunk/src/logicreate/services/lobrepo/myobj.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/myobj.lcp 2009-07-29 13:41:24 UTC (rev 1302) +++ logicampus/trunk/src/logicreate/services/lobrepo/myobj.lcp 2009-07-29 13:43:42 UTC (rev 1303) @@ -29,7 +29,7 @@ */ function run(&$db,&$u,&$lc,&$t) { $lc->templateName='myobj_main'; - + //$lobs = LobContentPeer::doSelect(); //get total count for paged tables. @@ -47,7 +47,9 @@ $pageIdx = intval($lc->getvars['p']); - if ($pageIdx ==0 ) {$pageIdx =1;} + if ($pageIdx ==0 ) {$pageIdx =1; + + } $lobItems = array(); @@ -84,7 +86,7 @@ $dm->ignoreColumn('lobRepoEntryId'); $table = new LC_TablePaged($dm); - $table->url = appurl('lobrepo').'/myobj/p=%d'; + $table->url = appurl('lobrepo').'/myobj/p=%d/idme='.$u->idme; $table->maxRows = $totalCount; $table->rowsPerPage = $limitCount = 30; $table->currentPage = $pageIdx; @@ -128,12 +130,14 @@ $c = (int)$lc->getvars['c']; $l = (int)$lc->getvars['l']; - + + //FIXME check for garbage entries in lob_class_metadata:lob_class_repo_id when calling useInClass $lob = new Lc_Lob($l); $lob->useInClass($c, 'notify'); + //debug($lob,1); -/* + $sql = "SELECT lob_repo_entry_id FROM lob_user_link WHERE lob_repo_entry_id = ".$l." @@ -142,14 +146,17 @@ //FIXME check for db errors $db->nextRecord(); $lobId = $db->record['lob_repo_entry_id']; + + + echo "Lob Repo"; + + //$lobClass = new LobClassRepo(); + //$lobClass->set('lobRepoEntryId' ,$lobId); + //$lobClass->set('classId' ,$c); + //$lobClass->save(); - $lobClass = new LobClassRepo(); - $lobClass->set('lobRepoEntryId' ,$lobId); - $lobClass->set('classId' ,$c); - $lobClass->save(); -*/ $u->addSessionMessage('Object linked to your class.'); - + //$this->run(); $this->presentor = 'redirectPresentation'; $t['url'] = appurl('lobrepo/myobj'); } Added: logicampus/trunk/src/logicreate/services/lobrepo/templates/add_audio.html =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/templates/add_audio.html (rev 0) +++ logicampus/trunk/src/logicreate/services/lobrepo/templates/add_audio.html 2009-07-29 13:43:42 UTC (rev 1303) @@ -0,0 +1,39 @@ +<h4>Content File</h4> +<a href="<?=appurl('lobrepo/');?>">Learning Objects Home</a> +• +<a href="<?=appurl('lobrepo/myobj');?>">My Learning Objects</a> +• +<a href="<?=appurl('lobrepo/import');?>">Import Learning Objects</a> +• +<a href="<?=appurl('lobrepo/add');?>">Add Learning Objects</a> + +<hr/> + + <form action="<?=appurl('lobrepo/edit/event=save');?>" method="POST" enctype="multipart/form-data"> +<table width="100%" border="0" cellspacing="2" cellpadding="2"> + <tr><td valign="top" class="">*Enter content title.</td> + <td valign="top" class=""><input type="text" id="txTitle" name="txTitle" value="<?=htmlentities($t['lob']->get('lobTitle'));?>" size="50" maxlength="255"></td> + </tr> + + <tr><td valign="top" class="">*Upload Your File</td><td valign="top" class=""> + <!---<input type="file" size="50" type="file" id="document" name="document" value="" size="">--> + <input type="file" id="content" name="content" value="" size=""> + </td></tr> + <tr><td valign="top" class="">Enter a Description</td><td valign="top" class=""> + <textarea name="description" cols="80" rows="10"><?=htmlentities($t['lob']->get('lobDescription'));?></textarea> + </td></tr> + <tr><td valign="top" class="">MIME type</td><td valign="top" class=""> + <?=$t['mimetype'];?> + </td></tr> + + <tr><td colspan="2" valign="top" class=""> </td></tr> + <tr><td valign="top" class=""></td><td valign="top" class=""><input type="submit" id="smbt_button" name="smbt_button" value="Save Content"></td></tr> +</table> + +<input type="hidden" name="event" value="save"> +<input type="hidden" name="mimetype" value="<?=$t['mimetype'];?>"> +<input type="hidden" name="lob_type" value="content"> +<input type="hidden" name="lob_sub_type" value="document"> +<input type="hidden" name="lob_id" value="<?=$t['lob']->get('lobRepoEntryId');?>"> + +</form> Modified: logicampus/trunk/src/logicreate/services/lobrepo/templates/add_doc.html =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/templates/add_doc.html 2009-07-29 13:41:24 UTC (rev 1302) +++ logicampus/trunk/src/logicreate/services/lobrepo/templates/add_doc.html 2009-07-29 13:43:42 UTC (rev 1303) @@ -1,38 +1,39 @@ -<h4>Content File</h4> -<a href="<?=appurl('lobrepo/');?>">Learning Objects Home</a> -• -<a href="<?=appurl('lobrepo/myobj');?>">My Learning Objects</a> -• -<a href="<?=appurl('lobrepo/import');?>">Import Learning Objects</a> -• -<a href="<?=appurl('lobrepo/add');?>">Add Learning Objects</a> - -<hr/> - - <form action="<?=appurl('lobrepo/edit/event=save');?>" method="POST" enctype="multipart/form-data"> -<table width="100%" border="0" cellspacing="2" cellpadding="2"> - <tr><td valign="top" class="">*Enter content title.</td> - <td valign="top" class=""><input type="text" id="txTitle" name="txTitle" value="<?=htmlentities($t['lob']->get('lobTitle'));?>" size="50" maxlength="255"></td> - </tr> - - <tr><td valign="top" class="">*Upload Your File</td><td valign="top" class=""> - <input size="50" type="file" id="document" name="document" value="" size=""> - </td></tr> - <tr><td valign="top" class="">Enter a Description</td><td valign="top" class=""> - <textarea name="description" cols="80" rows="10"><?=htmlentities($t['lob']->get('lobDescription'));?></textarea> - </td></tr> - <tr><td valign="top" class="">MIME type</td><td valign="top" class=""> - <?=$t['mimetype'];?> - </td></tr> - - <tr><td colspan="2" valign="top" class=""> </td></tr> - <tr><td valign="top" class=""></td><td valign="top" class=""><input type="submit" id="smbt_button" name="smbt_button" value="Save Content"></td></tr> -</table> - -<input type="hidden" name="event" value="save"> -<input type="hidden" name="mimetype" value="<?=$t['mimetype'];?>"> -<input type="hidden" name="lob_type" value="content"> -<input type="hidden" name="lob_sub_type" value="document"> -<input type="hidden" name="lob_id" value="<?=$t['lob']->get('lobRepoEntryId');?>"> - -</form> +<h4>Content File</h4> +<a href="<?=appurl('lobrepo/');?>">Learning Objects Home</a> +• +<a href="<?=appurl('lobrepo/myobj');?>">My Learning Objects</a> +• +<a href="<?=appurl('lobrepo/import');?>">Import Learning Objects</a> +• +<a href="<?=appurl('lobrepo/add');?>">Add Learning Objects</a> + +<hr/> + + <form action="<?=appurl('lobrepo/edit/event=save');?>" method="POST" enctype="multipart/form-data"> +<table width="100%" border="0" cellspacing="2" cellpadding="2"> + <tr><td valign="top" class="">*Enter content title.</td> + <td valign="top" class=""><input type="text" id="txTitle" name="txTitle" value="<?=htmlentities($t['lob']->get('lobTitle'));?>" size="50" maxlength="255"></td> + </tr> + + <tr><td valign="top" class="">*Upload Your File</td><td valign="top" class=""> + <!---<input type="file" size="50" type="file" id="document" name="document" value="" size="">--> + <input type="file" id="content" name="content" value="" size=""> + </td></tr> + <tr><td valign="top" class="">Enter a Description</td><td valign="top" class=""> + <textarea name="description" cols="80" rows="10"><?=htmlentities($t['lob']->get('lobDescription'));?></textarea> + </td></tr> + <tr><td valign="top" class="">MIME type</td><td valign="top" class=""> + <?=$t['mimetype'];?> + </td></tr> + + <tr><td colspan="2" valign="top" class=""> </td></tr> + <tr><td valign="top" class=""></td><td valign="top" class=""><input type="submit" id="smbt_button" name="smbt_button" value="Save Content"></td></tr> +</table> + +<input type="hidden" name="event" value="save"> +<input type="hidden" name="mimetype" value="<?=$t['mimetype'];?>"> +<input type="hidden" name="lob_type" value="content"> +<input type="hidden" name="lob_sub_type" value="document"> +<input type="hidden" name="lob_id" value="<?=$t['lob']->get('lobRepoEntryId');?>"> + +</form> Modified: logicampus/trunk/src/logicreate/services/lobrepo/templates/edit_meta.html =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/templates/edit_meta.html 2009-07-29 13:41:24 UTC (rev 1302) +++ logicampus/trunk/src/logicreate/services/lobrepo/templates/edit_meta.html 2009-07-29 13:43:42 UTC (rev 1303) @@ -1,73 +1,74 @@ -<?php $lob = $t['lob'];?> -<h4>Edit Learning Objects</h4> - -<a href="<?=appurl('lobrepo/');?>">Learning Objects Home</a> -• -<a href="<?=appurl('lobrepo/myobj');?>">My Learning Objects</a> -• -<a href="<?=appurl('lobrepo/import');?>">Import Learning Objects</a> -• -<a href="<?=appurl('lobrepo/add');?>">Add Learning Objects</a> - -<hr/> - -<h2><?= $lob->get('lobTitle');?></h2> -<form method="POST" action="<?=appurl('lobrepo/edit/event=saveMeta/id='.$lob->getRepoId());?>"> - - -<table border="0" width="600"> - <tr> - <td valign="top" width="300" colspan="2"> - <div style="width:300px"> - <fieldset> - <legend>Status</legend> - - <ul> - <li>Private: <?=$lob->isPrivate();?></li> - <li>Version: <?=$lob->getVersion();?></li> - <li>Last update on: <?= $lob->getEditedOn();?></li> - <li>Date created: <?= $lob->getCreatedOn();?></li> - </ul> - </fieldset> - </div> - </td> - </tr> - - <tr> - <td valign="top" class="">Subject</td> - <td valign="top" class=""><input type="text" id="md_subj" name="md_subj" value="<?=htmlentities($t['lob']->getMeta('subject'));?>" size="50" maxlength=""></td> - </tr> - <tr> - <td valign="top" class="">Sub-Discipline</td> - <td valign="top" class=""><input type="text" id="md_subdisc" name="md_subdisc" value="<?=htmlentities($t['lob']->getMeta('subdisc'));?>" size="50" maxlength=""></td> - </tr> - <tr> - <td valign="top" class="">Author</td> - <td valign="top" class=""><input type="text" id="md_author" name="md_author" value="<?=htmlentities($t['lob']->getMeta('author'));?>" size="50" maxlength=""></td> - </tr> - <tr> - <td valign="top" class="">Source</td> - <td valign="top" class=""><input type="text" id="md_source" name="md_source" value="<?=htmlentities($t['lob']->getMeta('source'));?>" size="50" maxlength=""></td> - </tr> - - <tr> - <td valign="top" class="">Copyright Year</td> - <td valign="top" class=""><input type="text" id="md_copyright" name="md_copyright" value="<?=htmlentities($t['lob']->getMeta('copyright'));?>" size="24" maxlength=""></td> - </tr> - <tr> - <td valign="top" class="">License</td> - <td valign="top" class=""><select id="md_license" name="md_license"> - <?php - echo makeOptions($t['licenses'], htmlentities($t['lob']->getMeta('license'))); - ?></select> - </td> - </tr> - <tr> - <td valign="top" class=""></td> - <td valign="top" class=""><input type="submit" id="sbmt_button" name="sbmt_button" value="Save Meta-Data"></td> - </tr> - - -</table> -</form> - +<?php $lob = $t['lob'];?> +<h4>Edit Learning Objects</h4> + +<a href="<?=appurl('lobrepo/');?>">Learning Objects Home</a> +• +<a href="<?=appurl('lobrepo/myobj');?>">My Learning Objects</a> +• +<a href="<?=appurl('lobrepo/import');?>">Import Learning Objects</a> +• +<a href="<?=appurl('lobrepo/add');?>">Add Learning Objects</a> + +<hr/> + +<h2><?= $lob->get('lobTitle');?></h2> + +<form method="POST" action="<?=appurl('lobrepo/edit/event=saveMeta/id='.$lob->getRepoId());?>"> + + +<table border="0" width="600"> + <tr> + <td valign="top" width="300" colspan="2"> + <div style="width:300px"> + <fieldset> + <legend>Status</legend> + + <ul> + <li>Private: <?=$lob->isPrivate();?></li> + <li>Version: <?=$lob->getVersion();?></li> + <li>Last update on: <?= $lob->getEditedOn();?></li> + <li>Date created: <?= $lob->getCreatedOn();?></li> + </ul> + </fieldset> + </div> + </td> + </tr> + + <tr> + <td valign="top" class="">Subject</td> + <td valign="top" class=""><input type="text" id="md_subj" name="md_subj" value="<?=htmlentities($t['lob']->getMeta('subject'));?>" size="50" maxlength=""></td> + </tr> + <tr> + <td valign="top" class="">Sub-Discipline</td> + <td valign="top" class=""><input type="text" id="md_subdisc" name="md_subdisc" value="<?=htmlentities($t['lob']->getMeta('subdisc'));?>" size="50" maxlength=""></td> + </tr> + <tr> + <td valign="top" class="">Author</td> + <td valign="top" class=""><input type="text" id="md_author" name="md_author" value="<?=htmlentities($t['lob']->getMeta('author'));?>" size="50" maxlength=""></td> + </tr> + <tr> + <td valign="top" class="">Source</td> + <td valign="top" class=""><input type="text" id="md_source" name="md_source" value="<?=htmlentities($t['lob']->getMeta('source'));?>" size="50" maxlength=""></td> + </tr> + + <tr> + <td valign="top" class="">Copyright Year</td> + <td valign="top" class=""><input type="text" id="md_copyright" name="md_copyright" value="<?=htmlentities($t['lob']->getMeta('copyright'));?>" size="24" maxlength=""></td> + </tr> + <tr> + <td valign="top" class="">License</td> + <td valign="top" class=""><select id="md_license" name="md_license"> + <?php + echo makeOptions($t['licenses'], htmlentities($t['lob']->getMeta('license'))); + ?></select> + </td> + </tr> + <tr> + <td valign="top" class=""></td> + <td valign="top" class=""><input type="submit" id="sbmt_button" name="sbmt_button" value="Save Meta-Data"></td> + </tr> + + +</table> +</form> + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-07-29 13:41:32
|
Revision: 1302 http://logicampus.svn.sourceforge.net/logicampus/?rev=1302&view=rev Author: faheemkhan Date: 2009-07-29 13:41:24 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Submission of Task 158171 Modified Paths: -------------- logicampus/trunk/src/logicreate/services/classmgr/restoreBackup.lcp Modified: logicampus/trunk/src/logicreate/services/classmgr/restoreBackup.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/classmgr/restoreBackup.lcp 2009-07-29 13:40:22 UTC (rev 1301) +++ logicampus/trunk/src/logicreate/services/classmgr/restoreBackup.lcp 2009-07-29 13:41:24 UTC (rev 1302) @@ -48,12 +48,8 @@ $tempdir = $this->tempdir('/tmp', 'campus'); $this->tempdir = $tempdir; -//debug($tempdir); -//exit(); - //$za = zip_open($lc->uploads['lobxml']['tmp_name']); - //debug($za); - + exec('unzip -d '. $tempdir.' '.$lc->uploads['lobxml']['tmp_name'] ); $doc = new DomDocument('1.0', 'UTF-8'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-07-29 13:40:34
|
Revision: 1301 http://logicampus.svn.sourceforge.net/logicampus/?rev=1301&view=rev Author: faheemkhan Date: 2009-07-29 13:40:22 +0000 (Wed, 29 Jul 2009) Log Message: ----------- Submission of Task 158171 Modified Paths: -------------- logicampus/trunk/src/logicreate/services/classmgr/exportContent.lcp Modified: logicampus/trunk/src/logicreate/services/classmgr/exportContent.lcp =================================================================== --- logicampus/trunk/src/logicreate/services/classmgr/exportContent.lcp 2009-03-06 07:32:34 UTC (rev 1300) +++ logicampus/trunk/src/logicreate/services/classmgr/exportContent.lcp 2009-07-29 13:40:22 UTC (rev 1301) @@ -49,6 +49,7 @@ * Let's try to create a zip file with the XML and externalize all content from * classdoclib */ + //---------------> function downloadRun($db, &$u, &$lc, &$t) { $this->obj_zip = new LcZipFile(); // $this->obj_zip->add_dir('interactions/'); @@ -136,10 +137,11 @@ $doclobs = $this->get_document_files(); foreach ($doclobs as $xmlnode) { + $root->children[] = $xmlnode; } unset($doclobs); - + //do homework (interactions) // $xmlObj = new xmlparser('<lobcol></lobcol>'); // $root =& $xmlObj->getRoot(); @@ -157,15 +159,15 @@ } unset($tstlobs); - +/* $lesslobs = $this->get_lesson_nodes(); foreach ($lesslobs as $xmlnode) { $root->children[] = $xmlnode; } unset($lesslobs); +*/ - // print_r($lobs);exit(); //$root->children =& $classroom_nodes; @@ -213,30 +215,38 @@ echo $wiky; exit; } + //------------------> - /** * return an array of arrays that represent document lobs */ function get_document_files() { $lob_nodes = array(); $sql = ' - SELECT A.*,B.*,C.* + SELECT A.*,B.*,C.*,D.* FROM lob_class_repo as A + LEFT JOIN lob_repo_entry AS D ON D.lob_repo_entry_id=A.lob_repo_entry_id LEFT JOIN lob_class_content AS B ON A.lob_class_repo_id = B.lob_class_repo_id LEFT JOIN lob_class_metadata AS C ON C.lob_class_repo_id = A.lob_class_repo_id WHERE A.class_id='.$this->classId.' - AND (lob_sub_type = "document" OR lob_sub_type = "image") '; + AND (A.lob_sub_type = "document" OR A.lob_sub_type = "image") '; $db = DB::getHandle(); $db->query($sql); $db->RESULT_TYPE = MYSQL_ASSOC; - + /*$temp_filename=0; + $temp_binary=0; + */ while ($db->nextRecord()) { if (trim($db->record['lob_filename']) == ''){ + // __FIXME__ make the filename safe for saving. // change quotes? change dots? change spaces? - $db->record['lob_filename'] = $db->record['lob_title']; + + + //$db->record['lob_filename'] = $db->record['lob_title']; + //$db->record['lob_binary']=$db->record['lob_text']; + } @@ -249,25 +259,35 @@ , 'content/'.str_replace('/','_',strip_tags($db->record['lob_filename'])) ); + + - $type_node = new xml_node('lob:type',null,null,'content'); //subtype list($type,$submime) = explode('/', $db->record['lob_mime']); $sub_type_node = new xml_node('lob:subtype',array('mime'=>$db->record['lob_mime']),null); $mim_type_node = new xml_node('lob:mime',null,null, $db->record['lob_mime']); - + echo $db->record['lob_mime']; + if ($type == 'image') { $sub_type_node->value = 'image'; } else { $sub_type_node->value = 'document'; + } + $lob_caption_node = new xml_node('lob:caption',null,null,$db->record['lob_caption']); + $lob_caption_node->cdata = true; $lob_title_node = new xml_node('lob:title',null,null,$db->record['lob_title']); + $lob_title_node->cdata = true; $lob_url = new xml_node('lob:urltitle',null,null,$db->record['lob_urltitle']); + $lob_url->cdata = true; + $lob_notes = new xml_node('lob:notes',null,null,$db->record['lob_notes']); + $lob_url->cdata = true; + $lob_file_node = new xml_node('lob:filename',null,null,$db->record['lob_filename']); $lob_file_node->cdata = true; - + $lob_desc_node = new xml_node('lob:description',null,null,$db->record['lob_description']); $lob_desc_node->cdata = true; @@ -276,22 +296,27 @@ $xml_child_nodes[] = $type_node; $xml_child_nodes[] = $sub_type_node; $xml_child_nodes[] = $mim_type_node; + + + $xml_child_nodes[] = $lob_title_node; + $xml_child_nodes[] = $lob_url; $xml_child_nodes[] = $lob_file_node; $xml_child_nodes[] = $lob_desc_node; - $xml_child_nodes[] = $lob_url; - + $xml_child_nodes[]=$lob_caption_node; + $xml_child_nodes[]=$lob_notes; //lifecycle $createdon = $db->record['created_on']; $lifecycleArray = array( - 'lob:version'=>$db->record['version'], + 'lob:version'=>$db->record['lob_version'], 'lob:createdon'=>$createdon, 'createdon_dateformat'=>'unix' ); + - $xml_child_nodes[] = $this->makeLifecycleNode($lifecycleArray); - + + //metadata $metadataArray = array( 'lob:author'=>$db->record['author'], @@ -299,6 +324,7 @@ 'lob:subdisc'=>$db->record['subdisc'], 'subject_abbr'=>'true', 'subdisc_abbr'=>'false', + 'lob:source'=>$db->record['source'], 'lob:copyright'=>$db->record['copyright'], 'lob:license'=>$db->record['license'] ); @@ -322,12 +348,13 @@ function get_content_nodes() { $xml_child_nodes = array(); $sql = ' - SELECT A.*, B.*, C.* + SELECT A.*, B.*, C.*,D.* FROM lob_class_repo A LEFT JOIN lob_class_content AS B ON A.lob_class_repo_id = B.lob_class_repo_id LEFT JOIN lob_class_metadata AS C ON B.lob_class_repo_id = C.lob_class_repo_id + INNER JOIN lob_repo_entry AS D ON D.lob_repo_entry_id=A.lob_repo_entry_id WHERE A.class_id='.$this->classId.' AND A.lob_type = "content" AND A.lob_sub_type != "document" @@ -342,9 +369,17 @@ while ($db->nextRecord()) { $type_node = new xml_node('lob:type',null,null,'content'); $sub_type_node = new xml_node('lob:subtype',null,null,$db->record['lob_sub_type']); + $mim_type_node = new xml_node('lob:mime',null,null, $db->record['lob_mime']); $lob_title_node = new xml_node('lob:title',null,null,$db->record['lob_title']); $lob_title_node->cdata = true; + //done + + $lob_notes = new xml_node('lob:notes',null,null,$db->record['lob_notes']); + $lob_notes->cdata = true; + $lob_url = new xml_node('lob:urltitle',null,null,$db->record['lob_urltitle']); + $lob_url->cdata = true; + //done $lob_content_node = new xml_node('lob:content',null,null,$db->record['lob_text']); $lob_content_node->cdata = true; @@ -352,9 +387,11 @@ $xml_child_nodes[] = $type_node; $xml_child_nodes[] = $sub_type_node; $xml_child_nodes[] = $mim_type_node; + $xml_child_nodes[] = $lob_title_node; + $xml_child_nodes[]=$lob_url; $xml_child_nodes[] = $lob_content_node; - + $xml_child_nodes[]=$lob_notes; //lifecycle $lifecycleArray = array( 'lob:version'=>'1.0', @@ -370,6 +407,7 @@ 'lob:subdisc'=>$db->record['subdisc'], 'subject_abbr'=>'true', 'subdisc_abbr'=>'false', + 'lob:source'=>$db->record['source'], 'lob:copyright'=>$db->record['copyright'], 'lob:license'=>$db->record['license'] ); @@ -400,14 +438,16 @@ //if you select C.* and there's no record for the metadata // the lob_repo_id will be overwritten with a blank, // Same thing can happen for table B. + $sql = ' SELECT A.*, B.*, C.subject, C.subdisc, C.author, C.copyright, C.license, C.user_version - ,C.status, C.updated_on, C.created_on + ,C.status, C.updated_on, C.created_on,D.* FROM lob_class_repo as A LEFT JOIN lob_class_activity AS B ON A.lob_class_repo_id = B.lob_class_repo_id LEFT JOIN lob_class_metadata AS C ON A.lob_class_repo_id = C.lob_class_repo_id + INNER JOIN lob_repo_entry AS D ON D.lob_repo_entry_id=A.lob_repo_entry_id WHERE A.class_id='.$this->classId.' AND A.lob_type ="activity"'; @@ -423,13 +463,14 @@ exit(); // */ while ($db->nextRecord()) { - $type_node = new xml_node('lob:type',null,null,'interaction'); + $type_node = new xml_node('lob:type',null,null,$db->record['lob_type']); //subtype - list($type,$submime) = explode('/', $db->record['lob_mime']); - $sub_type_node = new xml_node('lob:subtype',null,null); + //list($type,$submime) = explode('/', $db->record['lob_mime']); + $sub_type_node = new xml_node('lob:subtype',null,null,$db->record['lob_sub_type']); + $actual_sub_type_node = new xml_node('lob:actualsubtype',null,null,$db->record['lob_sub_type']); $mim_type_node = new xml_node('lob:mime',null,null, $db->record['lob_mime']); - $resp_node = new xml_node('logicampus:response',null,null); - + $resp_node = new xml_node('logicampus:response',null,null,$db->record['lob_notes']); + $notes_node = new xml_node('lob:notes',null,null,$db->record['lob_notes']); /* 1=>"Upload a file", 2=>"Text response", @@ -479,23 +520,32 @@ $lob_title_node = new xml_node('lob:title',null,null,$db->record['lob_title']); $lob_title_node->cdata = true; - + + $lob_urltitle_node = new xml_node('lob:urltitle',null,null,$db->record['lob_urltitle']); + $lob_urltitle_node->cdata = true; + + $lob_copystyle_node = new xml_node('lob:copystyle',null,null,$db->record['lob_copy_style']); + $lob_copystyle_node->cdata = true; + $lob_desc_node = new xml_node('lob:description',null,null,$db->record['lob_description']); $lob_desc_node->cdata = true; $xml_child_nodes = array(); $xml_child_nodes[] = $type_node; $xml_child_nodes[] = $sub_type_node; + $xml_child_nodes[] = $actual_sub_type_node; $xml_child_nodes[] = $mim_type_node; - $xml_child_nodes[] = $resp_node; + $xml_child_nodes[] = $lob_title_node; $xml_child_nodes[] = $lob_desc_node; - + $xml_child_nodes[] =$lob_urltitle_node; + $xml_child_nodes[] =$lob_copystyle_node; + $xml_child_nodes[] = $notes_node; //lifecycle $createdon = $db->record['created_on']; $lifecycleArray = array( - 'lob:version'=>$db->record['version'], + 'lob:version'=>$db->record['lob_version'], 'lob:createdon'=>time(), 'createdon_dateformat'=>'unix' ); @@ -685,43 +735,93 @@ * return an array of arrays that represent document lobs */ function get_test_nodes() { + + $db = DB::getHandle(); + $db->RESULT_TYPE = MYSQL_ASSOC; $lob_nodes = array(); - $sql = ' - SELECT A.* - FROM assessment as A - WHERE A.class_id='.$this->classId; - - $db = DB::getHandle(); + $sql = " + SELECT A.*, B.*,C.* ,D.*,E.* + FROM lob_class_repo as A + LEFT JOIN lob_test AS B + ON B.lob_repo_entry_id = A.lob_repo_entry_id + LEFT JOIN lob_test_qst AS C + ON C.lob_test_id = B.lob_test_id + LEFT JOIN lob_class_metadata AS D ON D.lob_class_repo_id=A.lob_class_repo_id + LEFT JOIN lob_class_test AS E on A.lob_class_repo_id=E.lob_class_repo_id + WHERE A.class_id=".$this->classId.' + AND A.lob_type = "test" + AND A.lob_sub_type = "test" + + '; + + $db->query($sql); - $db->RESULT_TYPE = MYSQL_ASSOC; + $testRecs = array(); while ($db->nextRecord()) { - $testRecs[] = $db->record; - } - foreach ($testRecs as $tstidx => $testRec) { - $type_node = new xml_node('type',null,null,'assessment'); + + $type_node = new xml_node('type',null,null,$db->record['lob_type']); + + //subtype + //list($type,$submime) = explode('/', $db->record['lob_mime']); + $sub_type_node = new xml_node('lob:subtype',null,null,$db->record['lob_sub_type']); + + $mim_type_node = new xml_node('lob:mime',null,null, $db->record['lob_mime']); + + + + - $xml_child_nodes = array(); - - $lob_title_node = new xml_node('lob:title',null,null,$testRec['display_name']); + $lob_title_node = new xml_node('lob:title',null,null,$db->record['lob_title']); $lob_title_node->cdata = true; - $lob_desc_node = new xml_node('lob:description',null,null,$testRec['description']); + $lob_desc_node = new xml_node('lob:description',null,null,$db->record['lob_description']); $lob_desc_node->cdata = true; - $lob_instr_node = new xml_node('instructions',null,null,$testRec['instructions']); - $lob_desc_node->cdata = true; - - + $lob_copystyle_node = new xml_node('lob:copystyle',null,null,$db->record['lob_copy_style']); + $lob_copystyle_node->cdata = true; + + $lob_qsttext_node = new xml_node('lob:qsttext',null,null,$db->record['qst_text']); + $lob_qsttext_node->cdata = true; + + $lob_qstchoice_node = new xml_node('lob:qstchoices',null,null,$db->record['qst_choices']); + $lob_qstchoice_node->cdata = true; + + + $lob_qsttype_node = new xml_node('lob:questiontype',null,null,$db->record['question_type_id']); + $lob_qsttype_node->cdata = true; + + $lob_qstpoints_node = new xml_node('lob:questionpoints',null,null,$db->record['qst_points']); + $lob_qstpoints_node->cdata = true; + + $lob_numretry_node = new xml_node('lob:numretry',null,null,$db->record['num_retry']); + $lob_numretry_node->cdata = true; + + $lob_ispractice_node = new xml_node('lob:ispractice',null,null,$db->record['is_practice']); + $lob_ispractice_node->cdata = true; + + $lob_image_node = new xml_node('lob:image',null,null,$db->record['image_content_id']); + $lob_image_node->cdata = true; + + $xml_child_nodes = array(); $xml_child_nodes[] = $type_node; + $xml_child_nodes[] = $sub_type_node; + $xml_child_nodes[] = $mim_type_node; + $xml_child_nodes[] = $lob_title_node; $xml_child_nodes[] = $lob_desc_node; - $xml_child_nodes[] = $lob_instr_node; + $xml_child_nodes[] = $lob_copystyle_node; + $xml_child_nodes[] =$lob_qsttext_node; + $xml_child_nodes[] =$lob_qstchoice_node; + $xml_child_nodes[] =$lob_qsttype_node; + $xml_child_nodes[] =$lob_qstpoints_node; + $xml_child_nodes[] =$lob_numretry_node; + $xml_child_nodes[] =$lob_ispractice_node; + $xml_child_nodes[]=$lob_image_node; - $attrs = array( 'mail_responses', 'auto_publish', @@ -730,16 +830,14 @@ 'show_result_type', 'possible_points' ); - foreach($attrs as $at) { - $xml_child_nodes[] = new xml_node('logicampus:'.$at, null,null, $testRec[$at]); - } + //lifecycle - $createdon = $testRec['created_on']; + $createdon = $db->record['created_on']; $lifecycleArray = array( - 'lob:version'=>$testRec['version'], + 'lob:version'=>$db->record['lob_version'], 'lob:createdon'=>time(), 'createdon_dateformat'=>'unix' ); @@ -758,17 +856,16 @@ ); $xml_child_nodes[] = $this->makeMetadataNode($metadataArray); */ - - - $guid = lcUuid(); - $this->testGuid[ $testRec['assessment_id'] ] = $guid; - - $testLob = new xml_node('lob:obj', - array('guid'=>$guid, 'dbid'=>$testRec['assessment_id']), + + $guid = $db->record['lob_guid']; + $this->testGuid[ $db->record['lob_test_id' ] ]= $guid; + + $lob_nodes[] = new xml_node('lob:obj', + array('guid'=>$guid, 'dbid'=>$db->record['lob_repo_entry_id']), $xml_child_nodes ); - //questions + /* //questions $db->query('SELECT * FROM assessment_question WHERE assessment_id = '.$testRec['assessment_id']); $questionRecs = array(); while ($db->nextRecord()) { @@ -795,7 +892,7 @@ $testLob->children[] = $qust_node; } - $lob_nodes[] = $testLob; + */ //$lob_nodes[] = $testLob; } return $lob_nodes; } @@ -825,6 +922,7 @@ 'lob:status', 'lob:active', 'lob:createdby', + 'lob:verdion', 'lob:updatedby' ); $lifecycle_node = new xml_node('lob:lifecycle',null,null); @@ -862,10 +960,12 @@ function makeMetadataNode($metadataStruct) { + echo "metadata"; $allow = array( 'lob:subject', 'lob:subdisc', 'lob:author', + 'lob:source', 'lob:copyright', 'lob:license', 'lob:objective' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-03-06 07:32:37
|
Revision: 1300 http://logicampus.svn.sourceforge.net/logicampus/?rev=1300&view=rev Author: faheemkhan Date: 2009-03-06 07:32:34 +0000 (Fri, 06 Mar 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php Added: logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php =================================================================== --- logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php 2009-03-06 07:32:34 UTC (rev 1300) @@ -0,0 +1,155 @@ +<?php +include_once(LIB_PATH.'PBDO/LobTest.php'); +include_once(LIB_PATH.'PBDO/LobTestQst.php'); +//defines constants for question types QUESTON_* +include_once(LIB_PATH.'AssessmentQuestion.php'); +include_once(LIB_PATH.'AssessmentLib.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->repoObj->lobMime = $this->mime; + $this->repoObj->lobType = $this->type; + $this->repoObj->lobSubType = $this->type; + $this->lobSub = new LobTest(); + } else { + $this->repoObj = LobRepoEntry::load($id); + $tests = $this->repoObj->getLobTestsByLobRepoEntryId(); + $this->lobSub = $tests[0]; + $this->loadQuestions(); + $this->lobMetaObj = LobMetadata::load(array('lob_repo_entry_id'=>$id)); + } + + if (isset($this->lobMetaObj) || !is_object($this->lobMetaObj)) { + $this->lobMetaObj = new LobMetadata(); + $this->lobMetaObj->createdOn = time(); + } + } + + function save() { + $ret = parent::save(); + if (!$ret) { return FALSE;} + + $this->saveQuestions(); + } + + + 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 setQuestion($qidx, $qtext, $type = 'QUESTION_ESSAY', $choices = '', $answers = '') { + $q = $this->_makeQuestion($qtext, $type, $choices, $answers); + if ($qidx > -1) { + $this->questionObjs[$qidx] = $q; + } else { + $this->questionObjs[] = $q; + } + } + + function addQuestion($qtext, $type = 'QUESTION_ESSAY', $choices = '', $answers = '') { + $q = $this->_makeQuestion($qtext, $type, $choices, $answers); + $this->questionObjs[] = $q; + } + + function getQuestionCount() { + return count($this->questionObjs); + } + + function _makeQuestion($qtext, $type, $choices, $answers='') { + $q = new LobTestQst(); + $q->qstChoices = array(); + $q->qstText = $qtext; + $q->questionTypeId = constant($type); + if ( is_array($choices) ) { + $q->qstChoices = $choices; + } + return $q; + } + + /** + * Load questions from the DB, add to internal questionObjs array + */ + function loadQuestions() { + $this->questionObjs = array(); + if ($this->lobSub->get('lobTestId') < 1) { return; } + $questionList = LobTestQstPeer::doSelect( ' lob_test_id = '.$this->lobSub->get('lobTestId')); + foreach ($questionList as $q) { + $q->qstChoices = unserialize($q->qstChoices); + $this->questionObjs[] = $q; + } + } + + + function saveQuestions() { + //clean out questions which have been deleted + $ids = array(); + $qry; // for delete query + $idList; // list of question ids that are not removed + foreach ($this->questionObjs as $q) { + if ((int) $q->lobTestQstId < 1) continue; + $ids[] = $q->lobTestQstId; + } + + /* + * modified by dewrax: PU Tasks + * added $ids check, if the $ids count is 0, the list will not be build and appended to delte query. + */ + if( count($ids) == 0 ){ + $qry = 'delete from lob_test_qst WHERE lob_test_id = '.$this->lobSub->get('lobTestId'); + } else { + $idList = '('. implode(',', $ids).')'; + $qry = 'delete from lob_test_qst WHERE lob_test_id = '.$this->lobSub->get('lobTestId') .' AND lob_test_qst_id NOT IN '.$idList; + } + + LobTestQstPeer::doQuery($qry); + + //save the questions which have been edited or created new + foreach($this->questionObjs as $q) { + if (!is_object($q)) { continue; } + if (!method_exists( $q, 'set')) { continue; } + $q->set('lobTestId', $this->lobSub->get('lobTestId')); + $q->qstChoices = serialize($q->qstChoices); + $q->save(); + } + } + + /** + * + * @return bool successfully added the choice + */ + function addLabel($l, $correct, $qidx=-1) { + if ($qidx == -1) { + $qidx = $this->getQuestionCount()-1; + } + if ($qidx == -1) { + return false; + } + $lidx = count($this->questionObjs[$qidx]->qstChoices); + if ($lidx == -1) { + $lidx = 0; + } + + $this->questionObjs[$qidx]->qstChoices[$lidx]['label'] = $l; + $this->questionObjs[$qidx]->qstChoices[$lidx]['correct'] = $correct; + return true; + } +} +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 12:20:32
|
Revision: 1299 http://logicampus.svn.sourceforge.net/logicampus/?rev=1299&view=rev Author: faheemkhan Date: 2009-02-27 12:20:25 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Updated Schema files Added Paths: ----------- logicampus/trunk/src/public_html/install/ logicampus/trunk/src/public_html/install/data_01.php logicampus/trunk/src/public_html/install/data_02.php logicampus/trunk/src/public_html/install/data_03.php logicampus/trunk/src/public_html/install/data_04.php logicampus/trunk/src/public_html/install/data_05.php logicampus/trunk/src/public_html/install/data_06.php logicampus/trunk/src/public_html/install/data_07.php logicampus/trunk/src/public_html/install/data_08.php logicampus/trunk/src/public_html/install/data_09.php logicampus/trunk/src/public_html/install/data_10.php logicampus/trunk/src/public_html/install/data_11.php logicampus/trunk/src/public_html/install/data_12.php logicampus/trunk/src/public_html/install/data_13.php logicampus/trunk/src/public_html/install/data_14.php logicampus/trunk/src/public_html/install/data_15.php logicampus/trunk/src/public_html/install/db.php logicampus/trunk/src/public_html/install/index.php logicampus/trunk/src/public_html/install/install_done.php logicampus/trunk/src/public_html/install/install_proc.php logicampus/trunk/src/public_html/install/schema_01.php logicampus/trunk/src/public_html/install/schema_02.php logicampus/trunk/src/public_html/install/schema_03.php logicampus/trunk/src/public_html/install/schema_04.php logicampus/trunk/src/public_html/install/schema_05.php logicampus/trunk/src/public_html/install/schema_06.php logicampus/trunk/src/public_html/install/schema_07.php logicampus/trunk/src/public_html/install/schema_08.php logicampus/trunk/src/public_html/install/schema_09.php logicampus/trunk/src/public_html/install/schema_10.php logicampus/trunk/src/public_html/install/schema_11.php logicampus/trunk/src/public_html/install/schema_12.php logicampus/trunk/src/public_html/install/schema_13.php logicampus/trunk/src/public_html/install/schema_14.php logicampus/trunk/src/public_html/install/schema_15.php logicampus/trunk/src/public_html/install/schema_16.php logicampus/trunk/src/public_html/install/schema_17.php logicampus/trunk/src/public_html/install/schema_18.php logicampus/trunk/src/public_html/install/schema_19.php logicampus/trunk/src/public_html/install/schema_20.php logicampus/trunk/src/public_html/install/schema_21.php logicampus/trunk/src/public_html/install/schema_22.php logicampus/trunk/src/public_html/install/schema_23.php logicampus/trunk/src/public_html/install/schema_24.php logicampus/trunk/src/public_html/install/schema_25.php logicampus/trunk/src/public_html/install/schema_26.php logicampus/trunk/src/public_html/install/schema_27.php logicampus/trunk/src/public_html/install/schema_28.php logicampus/trunk/src/public_html/install/schema_29.php logicampus/trunk/src/public_html/install/schema_30.php logicampus/trunk/src/public_html/install/schema_31.php logicampus/trunk/src/public_html/install/schema_32.php logicampus/trunk/src/public_html/install/schema_33.php logicampus/trunk/src/public_html/install/schema_34.php Added: logicampus/trunk/src/public_html/install/data_01.php =================================================================== --- logicampus/trunk/src/public_html/install/data_01.php (rev 0) +++ logicampus/trunk/src/public_html/install/data_01.php 2009-02-27 12:20:25 UTC (rev 1299) @@ -0,0 +1,264 @@ +<? +$installTableSchemas = array(); +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (1, 1, 'text', 'name', 'Enter your name', '', '', 'default', '', 'Y', '', 3, 15, 'Y', 1, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2, 1, 'textarea', 'body', 'Enter your\nmessage', '', '', 'default', '', 'Y', '<h3>', 1, 65535, 'Y', 2, 0, 25, '', '', '', '', 25, 15, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (3, 1, 'text', 'email', 'Enter your\nemail\naddress', '', '', 'email', '(email must be a valid email\naddress)', 'Y', '', 5, 100, 'Y', 3, 15, 100, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (4, 1, 'hidden', 'formId', '', '1', '', '', '', '', '', 0, 0, 'N', 4, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (7, 1, 'row', '', '', 'Enter your message\nbelow.\nSomeone will contact you shortly.', '', '', '', '', '', 0, 0, '', 5, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (6, 1, 'text', 'subject', 'Enter your Subject', '', '', 'default', '', 'Y', '', 3, 25, 'Y', 6, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (8, 2, 'text', 'name', 'Enter a name for\nyour\nform', '', '', 'default', '(Example: "User\nProfile")', 'Y', '', 5, 75, 'Y', 2, 25, 75, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (9, 2, 'textarea', 'description', 'Enter\na\ndescription', '', '', 'default', '', 'Y', '', 1, 65535, 'Y', 3, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (10, 2, 'text', 'action', 'What is\nthe\n"action" of your form?', '', '', 'default', 'Example:\nhttp://www.site.com/form.php', 'Y', '', 3, 100, 'N', 16, 25, 100, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (149, 2, 'select', 'method', 'Enter the\nform\nmethod', 'POST', '', 'select', 'There are two types of\nmethods, GET\nand POST. Select one.', 'N', '', 1, 1, 'Y', 5, 1, 0, 'POST=POST,GET=GET', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (12, 2, 'text', 'target', 'Enter the target\nof\nyour form', '', '', 'default', '(normally used with frames)', 'Y', '', 3, 25, 'N', 15, 25, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (13, 2, 'select', 'enctype', 'Form encoding\ntype', 'application/x-www-form-urlencoded', '', 'default', '(select\nmultipart/form-data if you are building a form to handle file\nuploads)', 'N', '', 1, 25, 'N', 17, 1, 2, 'application/x-www-form-urlencoded=application/x-www-form-urlencoded,multipart/form-data=multipart/form-data\n', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (14, 2, 'select', 'border', 'Table border\nwidth', '0', '', 'default', '', 'N', '', 1, 2, 'Y', 11, 1, 2, '0=None,1=1,2=2,3=3,4=4,5=5', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (15, 2, 'select', 'cellpadding', 'Table\ncellpadding', '0', '', 'default', '', 'Y', '', 1, 2, 'Y', 13, 1, 2, '0=None,1=1,2=2,3=3,4=4,5=5', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (16, 2, 'select', 'cellspacing', 'Table\ncellspacing', '0', '', 'default', '', 'Y', '', 1, 2, 'Y', 12, 1, 2, '0=None,1=1,2=2,3=3,4=4,5=5', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (17, 2, 'text', 'width', 'Table width', '75%', '', 'default', '', 'Y', '', 1, 4, 'Y', 10, 2, 4, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (18, 2, 'hidden', 'event', '', 'addModifyFormPost', '', 'default', '', '', '', 0, 0, '', 18, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (19, 2, 'submit', 'submit', '', 'Enter', '', 'default', '', '', '', 0, 0, '', 20, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (20, 2, 'row', '', '', 'Step 1 - Required\nFields', '', 'default', '', '', '', 0, 0, '', 1, 0, 0, '', '', '', '', 0, 0, '', 0, 'formHeading', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (21, 2, 'hidden', 'formId', '', '2', '', '', '', '', '', 0, 0, 'N', 19, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (163, 2, 'text', 'type', 'Form Type', 'site', '', 'default', 'The type of form should be left to \'site\' unless you are developing new types of form elements.', 'Y', '', 1, 25, 'Y', 7, 25, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (23, 3, 'text', 'fieldName', 'Enter the\nfield\nname', '', '', 'default', '', 'Y', '', 1, 100, 'Y', 2, 15, 100, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (24, 3, 'text', 'displayName', 'Display Name', '', '', 'default', '(this is what people will read to know what to\nfill\nin, example: Phone Number)', 'N', '<b></b><i></i><a></a>', 1, 255, 'Y', 3, 15, 255, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (25, 3, 'textarea', 'defaultValue', 'Enter\nthe\ndefault value for this form field', '', '', 'default', '', 'Y', '', 1, 65535, 'N', 9, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (26, 3, 'textarea', 'exp', 'Regular\nExpression', '', '', 'default', '(enter a regular expression for\nthis data)', 'Y', '', 1, 65535, 'N', 10, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (27, 3, 'select', 'validationType', 'Chooseformvalidation type', 'default', '', 'select', '(default checks\r\nagainst\r\nany regular expressions enter as well as min/max\r\nlengths)', 'N', '', 1, 1, 'N', 11, 0, 0, 'default=Default,email=Email Address,select=Select Drop Down,alphaChars=Only allow Alpha Characters,numericChars=Only allow Numbers,alphaNumeric=Alpha and Numeric', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (28, 3, 'textarea', 'message', 'Instructions\nor\nhelp', '', '', 'default', '(messages are displayed where this\ntext is,\nunderneath the form as help)', 'N', '', 1, 65535, 'N', 12, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (29, 3, 'select', 'stripTags', 'Strip HTML\nTags?', 'N', '', 'default', '', 'N', '', 1, 1, 'N', 13, 1, 0, 'N=No, Y=Yes', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (30, 3, 'text', 'allowedTags', 'Allowed\nHTML\nTags', '', '', 'default', '(Optional if you say yes above.\nEnter HTML\ntags you will allow, example: &lt;b&gt;', 'N', '', 1, 255, 'N', 14, 15, 255, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (31, 3, 'row', '', '', 'Step 3 - Form\nValidation', '', '', '', '', '', 0, 0, '', 15, 0, 0, '', '', '', '', 0, 0, '', 0, 'formHeading', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (32, 3, 'text', 'min', 'Minimum Input Length', '1', '', 'default', '(numbers only)', 'Y', '', 1, 7, 'N', 16, 4, 7, '', '', '', '', 0, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (33, 3, 'text', 'max', 'Maximum Length\nAllowed', '1', '', 'default', '(numbers only)', 'Y', '', 1, 7, 'N', 17, 4, 7, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (34, 3, 'select', 'req', 'Is this a required field?', '', '', 'select', '', 'N', '', 1, 1, 'Y', 4, 1, 0, 'N=No,Y=Yes', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (35, 3, 'text', 'size', 'Field Size', '15', '', 'default', '(numbers only)', 'Y', '', 1, 5, 'Y', 5, 5, 5, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (36, 3, 'text', 'maxlength', 'Maximum\nField\nLength', '25', '', 'default', '(numbers only)', 'Y', '', 1, 5, 'Y', 6, 5, 5, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (37, 3, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 18, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (39, 3, 'hidden', 'type', '', 'text', '', '', '', '', '', 0, 0, '', 19, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (46, 4, 'text', 'fieldName', 'Enter the\r\nfield\r\nname', '', '', 'default', '', 'Y', '', 1, 100, 'Y', 2, 50, 100, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (47, 4, 'text', 'displayName', 'Display Name', '', '', 'default', '(this is what people will read to know what to\nfill\nin, example: Phone Number)', 'N', '<b></b><i></i><a></a>', 1, 255, 'Y', 3, 15, 255, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (48, 4, 'textarea', 'defaultValue', 'Enter\nthe\ndefault value for this form field', '', '', 'default', '', 'Y', '', 1, 65535, 'N', 9, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (49, 4, 'textarea', 'message', 'Instructions\nor\nhelp', '', '', 'default', '(messages are displayed where this\ntext is,\nunderneath the form as help)', 'N', '', 1, 65535, 'N', 10, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (60, 4, 'select', 'multiple', 'Is this a\nmutiple\nselect form?', 'N', '', 'default', '', 'N', '', 1, 1, 'Y', 5, 1, 0, 'N=No,Y=Yes', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (51, 4, 'hidden', 'min', '', '1', '', 'default', '', 'Y', '', 1, 7, 'N', 14, 4, 7, '', '', '', '', 0, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (52, 4, 'hidden', 'max', '', '1', '', 'default', '', 'Y', '', 1, 7, 'N', 15, 4, 7, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (53, 4, 'select', 'req', 'Is this arequiredfield?', '', '', 'select', '', 'N', '', 1, 1, 'N', 4, 1, 0, 'N=No,Y=Yes', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (54, 4, 'text', 'size', 'Field Size', '1', '', 'default', 'If you are creating a mutiple select form, set the\nsize\nlarger to see more values.', 'Y', '', 1, 5, 'Y', 6, 5, 5, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (55, 4, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 16, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (56, 4, 'hidden', 'type', '', 'select', '', '', '', '', '', 0, 0, '', 17, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (57, 4, 'hidden', 'stripTags', '', 'N', '', 'default', '', 'N', '', 1, 1, 'N', 18, 1, 0, '', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (58, 4, 'hidden', 'validationType', '', 'select', '', '', '', 'N', '', 1, 1, '', 19, 0, 0, '', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (59, 4, 'textarea', 'selectOptions', 'Enter\nyour\ndrop down options', '', '', 'default', 'Note: enter drop\ndown options\nas follows with NO spaces between them. Example:\n1=Name,2=Phone', 'Y', '', 1, 65535, 'N', 13, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (61, 4, 'select', 'useValue', 'Use value\ninstead\nof key (advanced option)?', 'N', '', 'default', '', 'N', '', 1, 1, 'N', 11, 1, 0, 'N=No,Y=Yes', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (62, 5, 'text', 'fieldName', 'Enter the\nfield\nname', '', '', 'default', '', 'Y', '', 1, 100, 'Y', 2, 15, 100, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (63, 5, 'text', 'displayName', 'Display Name', '', '', 'default', '(this is what people will read to know what to\nfill\nin, example: Phone Number)', 'N', '<b></b><i></i><a></a>', 1, 255, 'Y', 3, 15, 255, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (64, 5, 'textarea', 'defaultValue', 'Enter\nthe\ndefault value for this form field', '', '', 'default', '', 'Y', '', 1, 65535, 'N', 10, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (65, 5, 'textarea', 'message', 'Instructions\nor\nhelp', '', '', 'default', '(messages are displayed where this\ntext is,\nunderneath the form as help)', 'N', '', 1, 65535, 'N', 11, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (66, 5, 'hidden', 'min', '', '1', '', 'default', '', 'Y', '', 1, 7, 'N', 15, 4, 7, '', '', '', '', 0, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (67, 5, 'hidden', 'max', '', '65535', '', 'default', '', 'Y', '', 1, 7, 'N', 16, 4, 7, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (68, 5, 'select', 'req', 'Is this a required field?', '', '', 'select', '', 'N', '', 1, 1, 'N', 4, 1, 0, 'N=No,Y=Yes', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (69, 5, 'hidden', 'size', '', '0', '', 'default', '', 'Y', '', 1, 5, 'Y', 20, 5, 5, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (70, 5, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 18, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (71, 5, 'hidden', 'type', '', 'textarea', '', '', '', '', '', 0, 0, '', 19, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (72, 5, 'hidden', 'validationType', '', 'default', '', '', '', 'N', '', 1, 1, '', 17, 0, 0, '', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (73, 5, 'textarea', 'exp', 'Regular\nExpression(s)', '', '', 'default', '(enter regular\nexpressions to\nmatch against data)', 'N', '', 1, 65535, 'N', 12, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (118, 5, 'select', 'stripTags', 'Strip\nHTML\nTags?', 'N', '', '', '', '', '', 0, 0, 'N', 13, 1, 0, 'N=No,Y=Yes', '', 'N', 'N', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; + +?> \ No newline at end of file Added: logicampus/trunk/src/public_html/install/data_02.php =================================================================== --- logicampus/trunk/src/public_html/install/data_02.php (rev 0) +++ logicampus/trunk/src/public_html/install/data_02.php 2009-02-27 12:20:25 UTC (rev 1299) @@ -0,0 +1,276 @@ +<? +$installTableSchemas = array(); +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (74, 5, 'text', 'cols', 'Enter number of\r\ncolumns', '25', '', 'default', '', 'N', '', 1, 3, 'Y', 5, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (75, 5, 'text', 'rows', 'Enter number of rows', '10', '', 'default', '', 'N', '', 1, 2, 'Y', 6, 15, 25, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (76, 6, 'text', 'fieldName', 'Enter the name', '', '', 'default', '', 'N', '', 1, 25, 'Y', 2, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (77, 6, 'text', 'defaultValue', 'Enter the\nvalue\nfor the hidden field', '', '', 'default', '', 'N', '', 1, 25, 'Y', 3, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (78, 6, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 5, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (79, 6, 'hidden', 'type', '', 'hidden', '', '', '', '', '', 0, 0, '', 6, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (83, 7, 'text', 'fieldName', 'Enter the name', 'submit', '', 'default', '', 'N', '', 1, 25, 'Y', 2, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (84, 7, 'text', 'defaultValue', 'Enter the name\nof\nyour button', 'Enter', '', 'default', '', 'N', '', 1, 25, 'Y', 3, 15, 25, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (85, 7, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 5, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (86, 7, 'hidden', 'type', '', 'submit', '', '', '', '', '', 0, 0, '', 6, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (89, 8, 'textarea', 'defaultValue', 'Enter\nTitle', '', '', 'default', '(if nothing is filled in you will just\nhave a\nblank row)', 'N', '', 1, 65535, 'N', 2, 0, 0, '', '', '', '', 25, 10, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', 'N') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (90, 8, 'hidden', 'type', '', 'row', '', '', '', '', '', 0, 0, '', 5, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (91, 8, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 6, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483799, 2147483663, 'radio', 'showonlineinfo', 'Show online information?', 'N', '', 'radio', '', '', '', 0, 0, 'Y', 49, 0, 0, 'N=No,Y=Yes', 'Y', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 1, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483798, 2147483663, 'text', 'msn', 'MSN Handle', '', '', 'default', '', 'Y', '', 0, 0, 'N', 48, 20, 50, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 2, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483794, 2147483663, 'text', 'url', 'Personal Home Page', 'http://', '', 'default', 'ex: http://www.google.com/', 'Y', '', 0, 0, 'N', 44, 25, 100, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 3, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483793, 2147483663, 'row', '', '', 'Online Information', '', '', '', '', '', 0, 0, '', 43, 0, 0, '', '', '', '', 0, 0, '', 0, 'tabletitle', 'a:1:{i:0;s:3:"reg";}', '', 4, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483789, 2147483663, 'customField', 'pagerPhone', 'Pager', '', '', 'phoneNumber', '', '', '', 1, 1, 'N', 15, 1, 0, '', '', 'N', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 5, '', '', '', 'phoneNumber') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483786, 2147483663, 'customField', 'workPhone', 'Work Phone', '', '', 'phoneNumber', '', '', '', 1, 1, 'N', 11, 1, 0, '', '', 'Y', '', 0, 0, '', 0, '', 'a:1:{i:0;s:7:"student";}', '', 6, '', '', '', 'phoneNumber') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483785, 2147483663, 'customField', 'homePhone', 'Home Phone', '', '', 'phoneNumber', '', '', '', 1, 1, 'Y', 10, 1, 0, '', '', 'Y', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 7, '', '', '', 'phoneNumber') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (2147483782, 2147483663, 'text', 'city', 'City', '', '', 'default', '', 'Y', '', 1, 50, 'Y', 6, 25, 50, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 8, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (119, 8, 'text', 'rowStyle', 'Style Sheet', '', '', 'default', 'Choose a style sheet for your row. Example:\nformHeading', 'Y', '', 1, 35, 'N', 3, 15, 35, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (124, 9, 'text', 'fieldName', 'Enter name\nof\npassword field', 'password', '', 'default', '', 'Y', '', 1, 50, 'Y', 2, 15, 50, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (125, 9, 'text', 'displayName', 'Enter\ndisplay\ntext', 'Enter your password', '', 'default', '', 'Y', '', 0, 255, 'Y', 3, 25, 255, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (126, 9, 'hidden', 'event', '', 'addModifyFormFieldPost', '', '', '', '', '', 0, 0, '', 9, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multiple, useValue, cols, rows, image, parentPkey, rowStyle, groups, notgroups, row, startYear, endYear, dateTimeBit, extra) VALUES (127, 9, 'hidden', 'type', '', 'password', '', '', '', '', '', 0, 0, '', 8, 0, 0, '', '', '', '', 0, 0, '', 0, '', 'a:1:{i:0;s:3:"reg";}', '', 0, '', '', '', '') +campusdelimeter; +$installTableSchemas[] = $table; +$table = <<<campusdelimeter +INSERT INTO lcForms (pkey, formId, type, fieldName, displayName, defaultValue, exp, validationType, message, stripTags, allowedTags, min, max, req, sort, size, maxlength, selectOptions, checked, multip... [truncated message content] |
From: <fah...@us...> - 2009-02-27 12:18:38
|
Revision: 1298 http://logicampus.svn.sourceforge.net/logicampus/?rev=1298&view=rev Author: faheemkhan Date: 2009-02-27 12:15:43 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed Paths: ------------- logicampus/trunk/src/public_html/install/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 12:07:29
|
Revision: 1297 http://logicampus.svn.sourceforge.net/logicampus/?rev=1297&view=rev Author: faheemkhan Date: 2009-02-27 12:07:22 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/lib/PBDO/ logicampus/trunk/src/logicreate/lib/PBDO/AssessmentEventLink.php logicampus/trunk/src/logicreate/lib/PBDO/Chat.php logicampus/trunk/src/logicreate/lib/PBDO/ChatQueue.php logicampus/trunk/src/logicreate/lib/PBDO/ClassAnnouncements.php logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsGrades.php logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsTurnin.php logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php logicampus/trunk/src/logicreate/lib/PBDO/ClassExtraFaculty.php logicampus/trunk/src/logicreate/lib/PBDO/ClassFaqs.php logicampus/trunk/src/logicreate/lib/PBDO/ClassForum.php logicampus/trunk/src/logicreate/lib/PBDO/ClassForumCategory.php logicampus/trunk/src/logicreate/lib/PBDO/ClassForumPost.php logicampus/trunk/src/logicreate/lib/PBDO/ClassForumTrashPost.php logicampus/trunk/src/logicreate/lib/PBDO/ClassForumUserActivity.php logicampus/trunk/src/logicreate/lib/PBDO/ClassGroup.php logicampus/trunk/src/logicreate/lib/PBDO/ClassGroupMember.php logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonLinks.php logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonObjectives.php logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonSequence.php logicampus/trunk/src/logicreate/lib/PBDO/ClassLessons.php logicampus/trunk/src/logicreate/lib/PBDO/ClassLinks.php logicampus/trunk/src/logicreate/lib/PBDO/ClassLinksCategories.php logicampus/trunk/src/logicreate/lib/PBDO/ClassObjectives.php logicampus/trunk/src/logicreate/lib/PBDO/ClassPresentations.php logicampus/trunk/src/logicreate/lib/PBDO/ClassSections.php logicampus/trunk/src/logicreate/lib/PBDO/ClassStudentSections.php logicampus/trunk/src/logicreate/lib/PBDO/ClassSyllabus.php logicampus/trunk/src/logicreate/lib/PBDO/Classes.php logicampus/trunk/src/logicreate/lib/PBDO/Courses.php logicampus/trunk/src/logicreate/lib/PBDO/DocsDirectories.php logicampus/trunk/src/logicreate/lib/PBDO/DocsDirectoriesFiles.php logicampus/trunk/src/logicreate/lib/PBDO/DocsDirectoriesGroups.php logicampus/trunk/src/logicreate/lib/PBDO/DocsFiles.php logicampus/trunk/src/logicreate/lib/PBDO/DocsFilesGroups.php logicampus/trunk/src/logicreate/lib/PBDO/DocsFiletypes.php logicampus/trunk/src/logicreate/lib/PBDO/LcActionLog.php logicampus/trunk/src/logicreate/lib/PBDO/LcActionLogType.php logicampus/trunk/src/logicreate/lib/PBDO/LcEvent.php logicampus/trunk/src/logicreate/lib/PBDO/LcUsersLastLogin.php logicampus/trunk/src/logicreate/lib/PBDO/LcUsersLoginAttempt.php logicampus/trunk/src/logicreate/lib/PBDO/LobActivity.php logicampus/trunk/src/logicreate/lib/PBDO/LobClassActivity.php logicampus/trunk/src/logicreate/lib/PBDO/LobClassContent.php logicampus/trunk/src/logicreate/lib/PBDO/LobClassMetadata.php logicampus/trunk/src/logicreate/lib/PBDO/LobClassRepo.php logicampus/trunk/src/logicreate/lib/PBDO/LobClassTest.php logicampus/trunk/src/logicreate/lib/PBDO/LobContent.php logicampus/trunk/src/logicreate/lib/PBDO/LobMetadata.php logicampus/trunk/src/logicreate/lib/PBDO/LobRepoEntry.php logicampus/trunk/src/logicreate/lib/PBDO/LobTest.php logicampus/trunk/src/logicreate/lib/PBDO/LobTestQst.php logicampus/trunk/src/logicreate/lib/PBDO/LobUserLink.php logicampus/trunk/src/logicreate/lib/PBDO/Photos.php logicampus/trunk/src/logicreate/lib/PBDO/PrivateMessages.php logicampus/trunk/src/logicreate/lib/PBDO/Profile.php logicampus/trunk/src/logicreate/lib/PBDO/ProfileFaculty.php logicampus/trunk/src/logicreate/lib/PBDO/ProfileFacultyCoursefamily.php logicampus/trunk/src/logicreate/lib/PBDO/ProfileStudent.php logicampus/trunk/src/logicreate/lib/PBDO/RemoteTestFiles.php logicampus/trunk/src/logicreate/lib/PBDO/Semesters.php logicampus/trunk/src/logicreate/lib/PBDO/SemestersCourseInfo.php logicampus/trunk/src/logicreate/lib/PBDO/TextbookEstimates.php Added: logicampus/trunk/src/logicreate/lib/PBDO/AssessmentEventLink.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/AssessmentEventLink.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/AssessmentEventLink.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,229 @@ +<? + +class AssessmentEventLinkBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $assessmentEventLinkId; + var $assessmentId; + var $lcEventId; + + var $__attributes = array( + 'assessmentEventLinkId'=>'int', + 'assessmentId'=>'int', + 'lcEventId'=>'int'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->assessmentEventLinkId; + } + + + function setPrimaryKey($val) { + $this->assessmentEventLinkId = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(AssessmentEventLinkPeer::doInsert($this,$dsn)); + } else { + AssessmentEventLinkPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "assessment_event_link_id='".$key."'"; + } + $array = AssessmentEventLinkPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = AssessmentEventLinkPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + AssessmentEventLinkPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class AssessmentEventLinkPeerBase { + + var $tableName = 'assessment_event_link'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("assessment_event_link",$where); + $st->fields['assessment_event_link_id'] = 'assessment_event_link_id'; + $st->fields['assessment_id'] = 'assessment_id'; + $st->fields['lc_event_id'] = 'lc_event_id'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = AssessmentEventLinkPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("assessment_event_link"); + $st->fields['assessment_event_link_id'] = $this->assessmentEventLinkId; + $st->fields['assessment_id'] = $this->assessmentId; + $st->fields['lc_event_id'] = $this->lcEventId; + + + $st->key = 'assessment_event_link_id'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("assessment_event_link"); + $st->fields['assessment_event_link_id'] = $obj->assessmentEventLinkId; + $st->fields['assessment_id'] = $obj->assessmentId; + $st->fields['lc_event_id'] = $obj->lcEventId; + + + $st->key = 'assessment_event_link_id'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("assessment_event_link","assessment_event_link_id = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new AssessmentEventLink(); + $x->assessmentEventLinkId = $row['assessment_event_link_id']; + $x->assessmentId = $row['assessment_id']; + $x->lcEventId = $row['lc_event_id']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class AssessmentEventLink extends AssessmentEventLinkBase { + + + +} + + + +class AssessmentEventLinkPeer extends AssessmentEventLinkPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/Chat.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/Chat.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/Chat.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,268 @@ +<? + +class ChatBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $pkey; + var $chatId; + var $username; + var $userpkey; + var $usertype; + var $timeint; + var $timedate; + var $message; + var $entryType; + + var $__attributes = array( + 'pkey'=>'integer', + 'chatId'=>'varchar', + 'username'=>'varchar', + 'userpkey'=>'integer', + 'usertype'=>'integer', + 'timeint'=>'integer', + 'timedate'=>'date', + 'message'=>'longvarchar', + 'entryType'=>'integer'); + + var $__nulls = array( + 'entryType'=>'entryType'); + + + + function getPrimaryKey() { + return $this->pkey; + } + + + function setPrimaryKey($val) { + $this->pkey = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ChatPeer::doInsert($this,$dsn)); + } else { + ChatPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "pkey='".$key."'"; + } + $array = ChatPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ChatPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ChatPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ChatPeerBase { + + var $tableName = 'chat'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("chat",$where); + $st->fields['pkey'] = 'pkey'; + $st->fields['chat_id'] = 'chat_id'; + $st->fields['username'] = 'username'; + $st->fields['userpkey'] = 'userpkey'; + $st->fields['usertype'] = 'usertype'; + $st->fields['timeint'] = 'timeint'; + $st->fields['timedate'] = 'timedate'; + $st->fields['message'] = 'message'; + $st->fields['entry_type'] = 'entry_type'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ChatPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("chat"); + $st->fields['pkey'] = $this->pkey; + $st->fields['chat_id'] = $this->chatId; + $st->fields['username'] = $this->username; + $st->fields['userpkey'] = $this->userpkey; + $st->fields['usertype'] = $this->usertype; + $st->fields['timeint'] = $this->timeint; + $st->fields['timedate'] = $this->timedate; + $st->fields['message'] = $this->message; + $st->fields['entry_type'] = $this->entryType; + + $st->nulls['entry_type'] = 'entry_type'; + + $st->key = 'pkey'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("chat"); + $st->fields['pkey'] = $obj->pkey; + $st->fields['chat_id'] = $obj->chatId; + $st->fields['username'] = $obj->username; + $st->fields['userpkey'] = $obj->userpkey; + $st->fields['usertype'] = $obj->usertype; + $st->fields['timeint'] = $obj->timeint; + $st->fields['timedate'] = $obj->timedate; + $st->fields['message'] = $obj->message; + $st->fields['entry_type'] = $obj->entryType; + + $st->nulls['entry_type'] = 'entry_type'; + + $st->key = 'pkey'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("chat","pkey = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new Chat(); + $x->pkey = $row['pkey']; + $x->chatId = $row['chat_id']; + $x->username = $row['username']; + $x->userpkey = $row['userpkey']; + $x->usertype = $row['usertype']; + $x->timeint = $row['timeint']; + $x->timedate = $row['timedate']; + $x->message = $row['message']; + $x->entryType = $row['entry_type']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class Chat extends ChatBase { + + + +} + + + +class ChatPeer extends ChatPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ChatQueue.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ChatQueue.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ChatQueue.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,253 @@ +<? + +class ChatQueueBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $pkey; + var $username; + var $userpkey; + var $usertype; + var $timeint; + var $timedate; + var $message; + + var $__attributes = array( + 'pkey'=>'integer', + 'username'=>'varchar', + 'userpkey'=>'integer', + 'usertype'=>'integer', + 'timeint'=>'integer', + 'timedate'=>'date', + 'message'=>'longvarchar'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->pkey; + } + + + function setPrimaryKey($val) { + $this->pkey = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ChatQueuePeer::doInsert($this,$dsn)); + } else { + ChatQueuePeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "pkey='".$key."'"; + } + $array = ChatQueuePeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ChatQueuePeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ChatQueuePeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ChatQueuePeerBase { + + var $tableName = 'chat_queue'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("chat_queue",$where); + $st->fields['pkey'] = 'pkey'; + $st->fields['username'] = 'username'; + $st->fields['userpkey'] = 'userpkey'; + $st->fields['usertype'] = 'usertype'; + $st->fields['timeint'] = 'timeint'; + $st->fields['timedate'] = 'timedate'; + $st->fields['message'] = 'message'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ChatQueuePeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("chat_queue"); + $st->fields['pkey'] = $this->pkey; + $st->fields['username'] = $this->username; + $st->fields['userpkey'] = $this->userpkey; + $st->fields['usertype'] = $this->usertype; + $st->fields['timeint'] = $this->timeint; + $st->fields['timedate'] = $this->timedate; + $st->fields['message'] = $this->message; + + + $st->key = 'pkey'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("chat_queue"); + $st->fields['pkey'] = $obj->pkey; + $st->fields['username'] = $obj->username; + $st->fields['userpkey'] = $obj->userpkey; + $st->fields['usertype'] = $obj->usertype; + $st->fields['timeint'] = $obj->timeint; + $st->fields['timedate'] = $obj->timedate; + $st->fields['message'] = $obj->message; + + + $st->key = 'pkey'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("chat_queue","pkey = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ChatQueue(); + $x->pkey = $row['pkey']; + $x->username = $row['username']; + $x->userpkey = $row['userpkey']; + $x->usertype = $row['usertype']; + $x->timeint = $row['timeint']; + $x->timedate = $row['timedate']; + $x->message = $row['message']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ChatQueue extends ChatQueueBase { + + + +} + + + +class ChatQueuePeer extends ChatQueuePeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassAnnouncements.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassAnnouncements.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassAnnouncements.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,253 @@ +<? + +class ClassAnnouncementsBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $idClassAnnouncements; + var $idClasses; + var $dtDisplay; + var $txTitle; + var $txDescription; + var $idFacultyCreatedby; + var $dtCreated; + + var $__attributes = array( + 'idClassAnnouncements'=>'integer', + 'idClasses'=>'integer', + 'dtDisplay'=>'datetime', + 'txTitle'=>'varchar', + 'txDescription'=>'longvarchar', + 'idFacultyCreatedby'=>'varchar', + 'dtCreated'=>'datetime'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->idClassAnnouncements; + } + + + function setPrimaryKey($val) { + $this->idClassAnnouncements = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassAnnouncementsPeer::doInsert($this,$dsn)); + } else { + ClassAnnouncementsPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "id_class_announcements='".$key."'"; + } + $array = ClassAnnouncementsPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassAnnouncementsPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassAnnouncementsPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassAnnouncementsPeerBase { + + var $tableName = 'class_announcements'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_announcements",$where); + $st->fields['id_class_announcements'] = 'id_class_announcements'; + $st->fields['id_classes'] = 'id_classes'; + $st->fields['dt_display'] = 'dt_display'; + $st->fields['tx_title'] = 'tx_title'; + $st->fields['tx_description'] = 'tx_description'; + $st->fields['id_faculty_createdby'] = 'id_faculty_createdby'; + $st->fields['dt_created'] = 'dt_created'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassAnnouncementsPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_announcements"); + $st->fields['id_class_announcements'] = $this->idClassAnnouncements; + $st->fields['id_classes'] = $this->idClasses; + $st->fields['dt_display'] = $this->dtDisplay; + $st->fields['tx_title'] = $this->txTitle; + $st->fields['tx_description'] = $this->txDescription; + $st->fields['id_faculty_createdby'] = $this->idFacultyCreatedby; + $st->fields['dt_created'] = $this->dtCreated; + + + $st->key = 'id_class_announcements'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_announcements"); + $st->fields['id_class_announcements'] = $obj->idClassAnnouncements; + $st->fields['id_classes'] = $obj->idClasses; + $st->fields['dt_display'] = $obj->dtDisplay; + $st->fields['tx_title'] = $obj->txTitle; + $st->fields['tx_description'] = $obj->txDescription; + $st->fields['id_faculty_createdby'] = $obj->idFacultyCreatedby; + $st->fields['dt_created'] = $obj->dtCreated; + + + $st->key = 'id_class_announcements'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_announcements","id_class_announcements = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassAnnouncements(); + $x->idClassAnnouncements = $row['id_class_announcements']; + $x->idClasses = $row['id_classes']; + $x->dtDisplay = $row['dt_display']; + $x->txTitle = $row['tx_title']; + $x->txDescription = $row['tx_description']; + $x->idFacultyCreatedby = $row['id_faculty_createdby']; + $x->dtCreated = $row['dt_created']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassAnnouncements extends ClassAnnouncementsBase { + + + +} + + + +class ClassAnnouncementsPeer extends ClassAnnouncementsPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsGrades.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsGrades.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsGrades.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,244 @@ +<? + +class ClassAssignmentsGradesBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $idClassAssignmentsGrades; + var $idClassAssignments; + var $idStudent; + var $comments; + var $grade; + + var $__attributes = array( + 'idClassAssignmentsGrades'=>'integer', + 'idClassAssignments'=>'integer', + 'idStudent'=>'varchar', + 'comments'=>'longvarchar', + 'grade'=>'float'); + + var $__nulls = array( + 'grade'=>'grade'); + + + + function getPrimaryKey() { + return $this->idClassAssignmentsGrades; + } + + + function setPrimaryKey($val) { + $this->idClassAssignmentsGrades = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassAssignmentsGradesPeer::doInsert($this,$dsn)); + } else { + ClassAssignmentsGradesPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "id_class_assignments_grades='".$key."'"; + } + $array = ClassAssignmentsGradesPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassAssignmentsGradesPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassAssignmentsGradesPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassAssignmentsGradesPeerBase { + + var $tableName = 'class_assignments_grades'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_assignments_grades",$where); + $st->fields['id_class_assignments_grades'] = 'id_class_assignments_grades'; + $st->fields['id_class_assignments'] = 'id_class_assignments'; + $st->fields['id_student'] = 'id_student'; + $st->fields['comments'] = 'comments'; + $st->fields['grade'] = 'grade'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassAssignmentsGradesPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_assignments_grades"); + $st->fields['id_class_assignments_grades'] = $this->idClassAssignmentsGrades; + $st->fields['id_class_assignments'] = $this->idClassAssignments; + $st->fields['id_student'] = $this->idStudent; + $st->fields['comments'] = $this->comments; + $st->fields['grade'] = $this->grade; + + $st->nulls['grade'] = 'grade'; + + $st->key = 'id_class_assignments_grades'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_assignments_grades"); + $st->fields['id_class_assignments_grades'] = $obj->idClassAssignmentsGrades; + $st->fields['id_class_assignments'] = $obj->idClassAssignments; + $st->fields['id_student'] = $obj->idStudent; + $st->fields['comments'] = $obj->comments; + $st->fields['grade'] = $obj->grade; + + $st->nulls['grade'] = 'grade'; + + $st->key = 'id_class_assignments_grades'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_assignments_grades","id_class_assignments_grades = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassAssignmentsGrades(); + $x->idClassAssignmentsGrades = $row['id_class_assignments_grades']; + $x->idClassAssignments = $row['id_class_assignments']; + $x->idStudent = $row['id_student']; + $x->comments = $row['comments']; + $x->grade = $row['grade']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassAssignmentsGrades extends ClassAssignmentsGradesBase { + + + +} + + + +class ClassAssignmentsGradesPeer extends ClassAssignmentsGradesPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsTurnin.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsTurnin.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassAssignmentsTurnin.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,271 @@ +<? + +class ClassAssignmentsTurninBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $idClassAssignmentsTurnin; + var $idClassAssignments; + var $idStudent; + var $dateTurnin; + var $assignType; + var $assignText; + var $assignFileMime; + var $assignFileName; + var $assignFileSize; + var $assignFileBlob; + + var $__attributes = array( + 'idClassAssignmentsTurnin'=>'integer', + 'idClassAssignments'=>'integer', + 'idStudent'=>'varchar', + 'dateTurnin'=>'datetime', + 'assignType'=>'integer', + 'assignText'=>'longtext', + 'assignFileMime'=>'varchar', + 'assignFileName'=>'varchar', + 'assignFileSize'=>'integer', + 'assignFileBlob'=>'longblob'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->idClassAssignmentsTurnin; + } + + + function setPrimaryKey($val) { + $this->idClassAssignmentsTurnin = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassAssignmentsTurninPeer::doInsert($this,$dsn)); + } else { + ClassAssignmentsTurninPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "id_class_assignments_turnin='".$key."'"; + } + $array = ClassAssignmentsTurninPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassAssignmentsTurninPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassAssignmentsTurninPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassAssignmentsTurninPeerBase { + + var $tableName = 'class_assignments_turnin'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_assignments_turnin",$where); + $st->fields['id_class_assignments_turnin'] = 'id_class_assignments_turnin'; + $st->fields['id_class_assignments'] = 'id_class_assignments'; + $st->fields['id_student'] = 'id_student'; + $st->fields['dateTurnin'] = 'dateTurnin'; + $st->fields['assign_type'] = 'assign_type'; + $st->fields['assign_text'] = 'assign_text'; + $st->fields['assign_file_mime'] = 'assign_file_mime'; + $st->fields['assign_file_name'] = 'assign_file_name'; + $st->fields['assign_file_size'] = 'assign_file_size'; + $st->fields['assign_file_blob'] = 'assign_file_blob'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassAssignmentsTurninPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_assignments_turnin"); + $st->fields['id_class_assignments_turnin'] = $this->idClassAssignmentsTurnin; + $st->fields['id_class_assignments'] = $this->idClassAssignments; + $st->fields['id_student'] = $this->idStudent; + $st->fields['dateTurnin'] = $this->dateTurnin; + $st->fields['assign_type'] = $this->assignType; + $st->fields['assign_text'] = $this->assignText; + $st->fields['assign_file_mime'] = $this->assignFileMime; + $st->fields['assign_file_name'] = $this->assignFileName; + $st->fields['assign_file_size'] = $this->assignFileSize; + $st->fields['assign_file_blob'] = $this->assignFileBlob; + + + $st->key = 'id_class_assignments_turnin'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_assignments_turnin"); + $st->fields['id_class_assignments_turnin'] = $obj->idClassAssignmentsTurnin; + $st->fields['id_class_assignments'] = $obj->idClassAssignments; + $st->fields['id_student'] = $obj->idStudent; + $st->fields['dateTurnin'] = $obj->dateTurnin; + $st->fields['assign_type'] = $obj->assignType; + $st->fields['assign_text'] = $obj->assignText; + $st->fields['assign_file_mime'] = $obj->assignFileMime; + $st->fields['assign_file_name'] = $obj->assignFileName; + $st->fields['assign_file_size'] = $obj->assignFileSize; + $st->fields['assign_file_blob'] = $obj->assignFileBlob; + + + $st->key = 'id_class_assignments_turnin'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_assignments_turnin","id_class_assignments_turnin = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassAssignmentsTurnin(); + $x->idClassAssignmentsTurnin = $row['id_class_assignments_turnin']; + $x->idClassAssignments = $row['id_class_assignments']; + $x->idStudent = $row['id_student']; + $x->dateTurnin = $row['dateTurnin']; + $x->assignType = $row['assign_type']; + $x->assignText = $row['assign_text']; + $x->assignFileMime = $row['assign_file_mime']; + $x->assignFileName = $row['assign_file_name']; + $x->assignFileSize = $row['assign_file_size']; + $x->assignFileBlob = $row['assign_file_blob']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassAssignmentsTurnin extends ClassAssignmentsTurninBase { + + + +} + + + +class ClassAssignmentsTurninPeer extends ClassAssignmentsTurninPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,260 @@ +<? + +class ClassEnrollmentBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.7'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $classEnrollmentId; + var $studentId; + var $semesterId; + var $classId; + var $sectionNumber; + var $enrolledOn; + var $active; + var $withdrewOn; + + var $__attributes = array( + 'classEnrollmentId'=>'int', + 'studentId'=>'int', + 'semesterId'=>'int', + 'classId'=>'int', + 'sectionNumber'=>'int', + 'enrolledOn'=>'int', + 'active'=>'int', + 'withdrewOn'=>'int'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->classEnrollmentId; + } + + + function setPrimaryKey($val) { + $this->classEnrollmentId = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassEnrollmentPeer::doInsert($this,$dsn)); + } else { + ClassEnrollmentPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + $where = ''; + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "class_enrollment_id='".$key."'"; + } + $array = ClassEnrollmentPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassEnrollmentPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassEnrollmentPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassEnrollmentPeerBase { + + var $tableName = 'class_enrollment'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_enrollment",$where); + $st->fields['class_enrollment_id'] = 'class_enrollment_id'; + $st->fields['student_id'] = 'student_id'; + $st->fields['semester_id'] = 'semester_id'; + $st->fields['class_id'] = 'class_id'; + $st->fields['section_number'] = 'section_number'; + $st->fields['enrolled_on'] = 'enrolled_on'; + $st->fields['active'] = 'active'; + $st->fields['withdrew_on'] = 'withdrew_on'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassEnrollmentPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_enrollment"); + $st->fields['class_enrollment_id'] = $obj->classEnrollmentId; + $st->fields['student_id'] = $obj->studentId; + $st->fields['semester_id'] = $obj->semesterId; + $st->fields['class_id'] = $obj->classId; + $st->fields['section_number'] = $obj->sectionNumber; + $st->fields['enrolled_on'] = $obj->enrolledOn; + $st->fields['active'] = $obj->active; + $st->fields['withdrew_on'] = $obj->withdrewOn; + + + $st->key = 'class_enrollment_id'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_enrollment"); + $st->fields['class_enrollment_id'] = $obj->classEnrollmentId; + $st->fields['student_id'] = $obj->studentId; + $st->fields['semester_id'] = $obj->semesterId; + $st->fields['class_id'] = $obj->classId; + $st->fields['section_number'] = $obj->sectionNumber; + $st->fields['enrolled_on'] = $obj->enrolledOn; + $st->fields['active'] = $obj->active; + $st->fields['withdrew_on'] = $obj->withdrewOn; + + + $st->key = 'class_enrollment_id'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_enrollment","class_enrollment_id = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassEnrollment(); + $x->classEnrollmentId = $row['class_enrollment_id']; + $x->studentId = $row['student_id']; + $x->semesterId = $row['semester_id']; + $x->classId = $row['class_id']; + $x->sectionNumber = $row['section_number']; + $x->enrolledOn = $row['enrolled_on']; + $x->active = $row['active']; + $x->withdrewOn = $row['withdrew_on']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassEnrollment extends ClassEnrollmentBase { + + + +} + + + +class ClassEnrollmentPeer extends ClassEnrollmentPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassExtraFaculty.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassExtraFaculty.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassExtraFaculty.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,244 @@ +<? + +class ClassExtraFacultyBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $pkey; + var $idClasses; + var $facultyId; + var $facultyType; + + var $__attributes = array( + 'pkey'=>'integer', + 'idClasses'=>'integer', + 'facultyId'=>'varchar', + 'facultyType'=>'char'); + + var $__nulls = array( + 'idClasses'=>'idClasses', + 'facultyId'=>'facultyId', + 'facultyType'=>'facultyType'); + + + + function getPrimaryKey() { + return $this->pkey; + } + + + function setPrimaryKey($val) { + $this->pkey = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassExtraFacultyPeer::doInsert($this,$dsn)); + } else { + ClassExtraFacultyPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "pkey='".$key."'"; + } + $array = ClassExtraFacultyPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassExtraFacultyPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassExtraFacultyPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassExtraFacultyPeerBase { + + var $tableName = 'class_extra_faculty'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_extra_faculty",$where); + $st->fields['pkey'] = 'pkey'; + $st->fields['id_classes'] = 'id_classes'; + $st->fields['facultyId'] = 'facultyId'; + $st->fields['facultyType'] = 'facultyType'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassExtraFacultyPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_extra_faculty"); + $st->fields['pkey'] = $this->pkey; + $st->fields['id_classes'] = $this->idClasses; + $st->fields['facultyId'] = $this->facultyId; + $st->fields['facultyType'] = $this->facultyType; + + $st->nulls['id_classes'] = 'id_classes'; + $st->nulls['facultyId'] = 'facultyId'; + $st->nulls['facultyType'] = 'facultyType'; + + $st->key = 'pkey'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_extra_faculty"); + $st->fields['pkey'] = $obj->pkey; + $st->fields['id_classes'] = $obj->idClasses; + $st->fields['facultyId'] = $obj->facultyId; + $st->fields['facultyType'] = $obj->facultyType; + + $st->nulls['id_classes'] = 'id_classes'; + $st->nulls['facultyId'] = 'facultyId'; + $st->nulls['facultyType'] = 'facultyType'; + + $st->key = 'pkey'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_extra_faculty","pkey = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassExtraFaculty(); + $x->pkey = $row['pkey']; + $x->idClasses = $row['id_classes']; + $x->facultyId = $row['facultyId']; + $x->facultyType = $row['facultyType']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassExtraFaculty extends ClassExtraFacultyBase { + + + +} + + + +class ClassExtraFacultyPeer extends ClassExtraFacultyPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassFaqs.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassFaqs.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassFaqs.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,253 @@ +<? + +class ClassFaqsBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $idClassFaqs; + var $idClasses; + var $category; + var $question; + var $answer; + var $clicks; + var $groups; + + var $__attributes = array( + 'idClassFaqs'=>'integer', + 'idClasses'=>'integer', + 'category'=>'varchar', + 'question'=>'varchar', + 'answer'=>'longvarchar', + 'clicks'=>'integer', + 'groups'=>'longvarchar'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->idClassFaqs; + } + + + function setPrimaryKey($val) { + $this->idClassFaqs = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassFaqsPeer::doInsert($this,$dsn)); + } else { + ClassFaqsPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "id_class_faqs='".$key."'"; + } + $array = ClassFaqsPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassFaqsPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassFaqsPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassFaqsPeerBase { + + var $tableName = 'class_faqs'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_faqs",$where); + $st->fields['id_class_faqs'] = 'id_class_faqs'; + $st->fields['id_classes'] = 'id_classes'; + $st->fields['category'] = 'category'; + $st->fields['question'] = 'question'; + $st->fields['answer'] = 'answer'; + $st->fields['clicks'] = 'clicks'; + $st->fields['groups'] = 'groups'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassFaqsPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_faqs"); + $st->fields['id_class_faqs'] = $this->idClassFaqs; + $st->fields['id_classes'] = $this->idClasses; + $st->fields['category'] = $this->category; + $st->fields['question'] = $this->question; + $st->fields['answer'] = $this->answer; + $st->fields['clicks'] = $this->clicks; + $st->fields['groups'] = $this->groups; + + + $st->key = 'id_class_faqs'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_faqs"); + $st->fields['id_class_faqs'] = $obj->idClassFaqs; + $st->fields['id_classes'] = $obj->idClasses; + $st->fields['category'] = $obj->category; + $st->fields['question'] = $obj->question; + $st->fields['answer'] = $obj->answer; + $st->fields['clicks'] = $obj->clicks; + $st->fields['groups'] = $obj->groups; + + + $st->key = 'id_class_faqs'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_faqs","id_class_faqs = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassFaqs(); + $x->idClassFaqs = $row['id_class_faqs']; + $x->idClasses = $row['id_classes']; + $x->category = $row['category']; + $x->question = $row['question']; + $x->answer = $row['answer']; + $x->clicks = $row['clicks']; + $x->groups = $row['groups']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassFaqs extends ClassFaqsBase { + + + +} + + + +class ClassFaqsPeer extends ClassFaqsPeerBase { + +} + +?> \ No newline at end of file Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassForum.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassForum.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassForum.php 2009-02-27 12:07:22 UTC (rev 1297) @@ -0,0 +1,335 @@ +<? + +class ClassForumBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.6'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $classForumId; + var $name; + var $classId; + var $isLocked; + var $isVisible; + var $isModerated; + var $allowUploads; + var $description; + var $recentPostDatetime; + var $recentPoster; + var $threadCount; + var $postCount; + var $unansweredCount; + var $classForumCategoryId; + + var $__attributes = array( + 'classForumId'=>'integer', + 'name'=>'varchar', + 'classId'=>'integer', + 'isLocked'=>'tinyint', + 'isVisible'=>'tinyint', + 'isModerated'=>'tinyint', + 'allowUploads'=>'tinyint', + 'description'=>'varchar', + 'recentPostDatetime'=>'integer', + 'recentPoster'=>'varchar', + 'threadCount'=>'integer', + 'postCount'=>'integer', + 'unansweredCount'=>'integer', + 'classForumCategoryId'=>'integer'); + + var $__nulls = array( + 'classForumCategoryId'=>'classForumCategoryId'); + + /** + * Retrieves one class_forum_category object via the foreign key class_forum_category_id. + * + * @param String $dsn the name of the data source to use for the sql query. + * @return Object the related object. + */ + function getClassForumCategoryByClassForumCategoryId($dsn='default') { + if ( $this->classForumCategoryId == '' ) { trigger_error('Peer doSelect with empty key'); return false; } + $array = ClassForumCategoryPeer::doSelect('class_forum_category_id = \''.$this->classForumCategoryId.'\'',$dsn); + if ( count($array) > 1 ) { trigger_error('multiple objects on one-to-one relationship'); } + return $array[0]; + } + + /** + * Retrieves an array of class_forum_post objects via the foreign key class_forum_id. + * + * @param String $dsn the name of the data source to use for the sql query. + * @return Array related objects. + */ + function getClassForumPostsByClassForumId($dsn='default') { + if ( $this->classForumId == '' ) { trigger_error('Peer doSelect with empty key'); return false; } + $array = ClassForumPostPeer::doSelect('class_forum_id = \''.$this->classForumId.'\'',$dsn); + return $array; + } + + /** + * Retrieves an array of class_forum_trash_post objects via the foreign key class_forum_id. + * + * @param String $dsn the name of the data source to use for the sql query. + * @return Array related objects. + */ + function getClassForumTrashPostsByClassForumId($dsn='default') { + if ( $this->classForumId == '' ) { trigger_error('Peer doSelect with empty key'); return false; } + $array = ClassForumTrashPostPeer::doSelect('class_forum_id = \''.$this->classForumId.'\'',$dsn); + return $array; + } + + + + function getPrimaryKey() { + return $this->classForumId; + } + + + function setPrimaryKey($val) { + $this->classForumId = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassForumPeer::doInsert($this,$dsn)); + } else { + ClassForumPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "class_forum_id='".$key."'"; + } + $array = ClassForumPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassForumPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassForumPeer::doDelete($this,$deep,$dsn); + }... [truncated message content] |
From: <fah...@us...> - 2009-02-27 12:04:18
|
Revision: 1296 http://logicampus.svn.sourceforge.net/logicampus/?rev=1296&view=rev Author: faheemkhan Date: 2009-02-27 12:04:13 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Updating the whole PBDO folder for PU Tasks Removed Paths: ------------- logicampus/trunk/src/logicreate/lib/PBDO/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 12:01:33
|
Revision: 1295 http://logicampus.svn.sourceforge.net/logicampus/?rev=1295&view=rev Author: faheemkhan Date: 2009-02-27 12:01:19 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed Paths: ------------- logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonSequence.php Deleted: logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonSequence.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonSequence.php 2009-02-27 12:00:01 UTC (rev 1294) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassLessonSequence.php 2009-02-27 12:01:19 UTC (rev 1295) @@ -1,356 +0,0 @@ -<? - -class ClassLessonSequenceBase { - - var $_new = true; //not pulled from DB - var $_modified; //set() called - var $_version = '1.7'; //PBDO version number - var $_entityVersion = ''; //Source version number - var $classLessonSequenceId; - var $lessonId; - var $classId; - var $lobClassRepoId; - var $lobType; - var $lobSubType; - var $lobMime; - var $lobTitle; - var $linkText; - var $notBeforeSeqId; - var $startOffset; - var $startTime; - var $endOffset; - var $endTime; - var $dueOffset; - var $dueTime; - var $gracePeriodDays; - var $rank; - var $hideUntilStart; - var $hideAfterEnd; - - var $__attributes = array( - 'classLessonSequenceId'=>'integer', - 'lessonId'=>'integer', - 'classId'=>'integer', - 'lobClassRepoId'=>'integer', - 'lobType'=>'varchar', - 'lobSubType'=>'varchar', - 'lobMime'=>'varchar', - 'lobTitle'=>'varchar', - 'linkText'=>'varchar', - 'notBeforeSeqId'=>'int', - 'startOffset'=>'int', - 'startTime'=>'mediumint', - 'endOffset'=>'int', - 'endTime'=>'mediumint', - 'dueOffset'=>'int', - 'dueTime'=>'mediumint', - 'gracePeriodDays'=>'int', - 'rank'=>'integer', - 'hideUntilStart'=>'int', - 'hideAfterEnd'=>'int'); - - var $__nulls = array( - 'notBeforeSeqId'=>'notBeforeSeqId', - 'startOffset'=>'startOffset', - 'startTime'=>'startTime', - 'endOffset'=>'endOffset', - 'endTime'=>'endTime', - 'dueOffset'=>'dueOffset', - 'dueTime'=>'dueTime', - 'gracePeriodDays'=>'gracePeriodDays'); - - - - function getPrimaryKey() { - return $this->classLessonSequenceId; - } - - - function setPrimaryKey($val) { - $this->classLessonSequenceId = $val; - } - - - function save($dsn="default") { - if ( $this->isNew() ) { - $this->setPrimaryKey(ClassLessonSequencePeer::doInsert($this,$dsn)); - } else { - ClassLessonSequencePeer::doUpdate($this,$dsn); - } - } - - - function load($key,$dsn="default") { - $where = ''; - if (is_array($key) ) { - while (list ($k,$v) = @each($key) ) { - $where .= "$k='$v' and "; - } - $where = substr($where,0,-5); - } else { - $where = "class_lesson_sequence_id='".$key."'"; - } - $array = ClassLessonSequencePeer::doSelect($where,$dsn); - return $array[0]; - } - - - function loadAll($dsn="default") { - $array = ClassLessonSequencePeer::doSelect('',$dsn); - return $array; - } - - - function delete($deep=false,$dsn="default") { - ClassLessonSequencePeer::doDelete($this,$deep,$dsn); - } - - - function isNew() { - return $this->_new; - } - - - function isModified() { - return $this->_modified; - - } - - - function get($key) { - return $this->{$key}; - } - - - /** - * only sets if the new value is !== the current value - * returns true if the value was updated - * also, sets _modified to true on success - */ - function set($key,$val) { - if ($this->{$key} !== $val) { - $this->_modified = true; - $this->{$key} = $val; - return true; - } - return false; - } - -} - - -class ClassLessonSequencePeerBase { - - var $tableName = 'class_lesson_sequence'; - - function doSelect($where,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_SelectStatement("class_lesson_sequence",$where); - $st->fields['class_lesson_sequence_id'] = 'class_lesson_sequence_id'; - $st->fields['lesson_id'] = 'lesson_id'; - $st->fields['class_id'] = 'class_id'; - $st->fields['lob_class_repo_id'] = 'lob_class_repo_id'; - $st->fields['lob_type'] = 'lob_type'; - $st->fields['lob_sub_type'] = 'lob_sub_type'; - $st->fields['lob_mime'] = 'lob_mime'; - $st->fields['lob_title'] = 'lob_title'; - $st->fields['link_text'] = 'link_text'; - $st->fields['not_before_seq_id'] = 'not_before_seq_id'; - $st->fields['start_offset'] = 'start_offset'; - $st->fields['start_time'] = 'start_time'; - $st->fields['end_offset'] = 'end_offset'; - $st->fields['end_time'] = 'end_time'; - $st->fields['due_offset'] = 'due_offset'; - $st->fields['due_time'] = 'due_time'; - $st->fields['grace_period_days'] = 'grace_period_days'; - $st->fields['rank'] = 'rank'; - $st->fields['hide_until_start'] = 'hide_until_start'; - $st->fields['hide_after_end'] = 'hide_after_end'; - - - $array = array(); - $db->executeQuery($st); - while($db->nextRecord() ) { - $array[] = ClassLessonSequencePeer::row2Obj($db->record); - } - return $array; - } - - function doInsert(&$obj,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_InsertStatement("class_lesson_sequence"); - $st->fields['class_lesson_sequence_id'] = $obj->classLessonSequenceId; - $st->fields['lesson_id'] = $obj->lessonId; - $st->fields['class_id'] = $obj->classId; - $st->fields['lob_class_repo_id'] = $obj->lobClassRepoId; - $st->fields['lob_type'] = $obj->lobType; - $st->fields['lob_sub_type'] = $obj->lobSubType; - $st->fields['lob_mime'] = $obj->lobMime; - $st->fields['lob_title'] = $obj->lobTitle; - $st->fields['link_text'] = $obj->linkText; - $st->fields['not_before_seq_id'] = $obj->notBeforeSeqId; - $st->fields['start_offset'] = $obj->startOffset; - $st->fields['start_time'] = $obj->startTime; - $st->fields['end_offset'] = $obj->endOffset; - $st->fields['end_time'] = $obj->endTime; - $st->fields['due_offset'] = $obj->dueOffset; - $st->fields['due_time'] = $obj->dueTime; - $st->fields['grace_period_days'] = $obj->gracePeriodDays; - $st->fields['rank'] = $obj->rank; - $st->fields['hide_until_start'] = $obj->hideUntilStart; - $st->fields['hide_after_end'] = $obj->hideAfterEnd; - - $st->nulls['not_before_seq_id'] = 'not_before_seq_id'; - $st->nulls['start_offset'] = 'start_offset'; - $st->nulls['start_time'] = 'start_time'; - $st->nulls['end_offset'] = 'end_offset'; - $st->nulls['end_time'] = 'end_time'; - $st->nulls['due_offset'] = 'due_offset'; - $st->nulls['due_time'] = 'due_time'; - $st->nulls['grace_period_days'] = 'grace_period_days'; - - $st->key = 'class_lesson_sequence_id'; - $db->executeQuery($st); - - $obj->_new = false; - $obj->_modified = false; - $id = $db->getInsertID(); - return $id; - - } - - function doUpdate(&$obj,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_UpdateStatement("class_lesson_sequence"); - $st->fields['class_lesson_sequence_id'] = $obj->classLessonSequenceId; - $st->fields['lesson_id'] = $obj->lessonId; - $st->fields['class_id'] = $obj->classId; - $st->fields['lob_class_repo_id'] = $obj->lobClassRepoId; - $st->fields['lob_type'] = $obj->lobType; - $st->fields['lob_sub_type'] = $obj->lobSubType; - $st->fields['lob_mime'] = $obj->lobMime; - $st->fields['lob_title'] = $obj->lobTitle; - $st->fields['link_text'] = $obj->linkText; - $st->fields['not_before_seq_id'] = $obj->notBeforeSeqId; - $st->fields['start_offset'] = $obj->startOffset; - $st->fields['start_time'] = $obj->startTime; - $st->fields['end_offset'] = $obj->endOffset; - $st->fields['end_time'] = $obj->endTime; - $st->fields['due_offset'] = $obj->dueOffset; - $st->fields['due_time'] = $obj->dueTime; - $st->fields['grace_period_days'] = $obj->gracePeriodDays; - $st->fields['rank'] = $obj->rank; - $st->fields['hide_until_start'] = $obj->hideUntilStart; - $st->fields['hide_after_end'] = $obj->hideAfterEnd; - - $st->nulls['not_before_seq_id'] = 'not_before_seq_id'; - $st->nulls['start_offset'] = 'start_offset'; - $st->nulls['start_time'] = 'start_time'; - $st->nulls['end_offset'] = 'end_offset'; - $st->nulls['end_time'] = 'end_time'; - $st->nulls['due_offset'] = 'due_offset'; - $st->nulls['due_time'] = 'due_time'; - $st->nulls['grace_period_days'] = 'grace_period_days'; - - $st->key = 'class_lesson_sequence_id'; - $db->executeQuery($st); - $obj->_modified = false; - - } - - function doReplace($obj,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - if ($this->isNew() ) { - $db->executeQuery(new PBDO_InsertStatement($criteria)); - } else { - $db->executeQuery(new PBDO_UpdateStatement($criteria)); - } - } - - - /** - * remove an object - */ - function doDelete(&$obj,$deep=false,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_DeleteStatement("class_lesson_sequence","class_lesson_sequence_id = '".$obj->getPrimaryKey()."'"); - - $db->executeQuery($st); - - if ( $deep ) { - - } - - $obj->_new = false; - $obj->_modified = false; - $id = $db->getInsertID(); - return $id; - - } - - - - /** - * send a raw query - */ - function doQuery(&$sql,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - - $db->query($sql); - - return; - } - - - - function row2Obj($row) { - $x = new ClassLessonSequence(); - $x->classLessonSequenceId = $row['class_lesson_sequence_id']; - $x->lessonId = $row['lesson_id']; - $x->classId = $row['class_id']; - $x->lobClassRepoId = $row['lob_class_repo_id']; - $x->lobType = $row['lob_type']; - $x->lobSubType = $row['lob_sub_type']; - $x->lobMime = $row['lob_mime']; - $x->lobTitle = $row['lob_title']; - $x->linkText = $row['link_text']; - $x->notBeforeSeqId = $row['not_before_seq_id']; - $x->startOffset = $row['start_offset']; - $x->startTime = $row['start_time']; - $x->endOffset = $row['end_offset']; - $x->endTime = $row['end_time']; - $x->dueOffset = $row['due_offset']; - $x->dueTime = $row['due_time']; - $x->gracePeriodDays = $row['grace_period_days']; - $x->rank = $row['rank']; - $x->hideUntilStart = $row['hide_until_start']; - $x->hideAfterEnd = $row['hide_after_end']; - - $x->_new = false; - return $x; - } - - -} - - -//You can edit this class, but do not change this next line! -class ClassLessonSequence extends ClassLessonSequenceBase { - - - -} - - - -class ClassLessonSequencePeer extends ClassLessonSequencePeerBase { - -} - -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 12:00:12
|
Revision: 1294 http://logicampus.svn.sourceforge.net/logicampus/?rev=1294&view=rev Author: faheemkhan Date: 2009-02-27 12:00:01 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php Added: logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php (rev 0) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php 2009-02-27 12:00:01 UTC (rev 1294) @@ -0,0 +1,260 @@ +<? + +class ClassEnrollmentBase { + + var $_new = true; //not pulled from DB + var $_modified; //set() called + var $_version = '1.7'; //PBDO version number + var $_entityVersion = ''; //Source version number + var $classEnrollmentId; + var $studentId; + var $semesterId; + var $classId; + var $sectionNumber; + var $enrolledOn; + var $active; + var $withdrewOn; + + var $__attributes = array( + 'classEnrollmentId'=>'int', + 'studentId'=>'int', + 'semesterId'=>'int', + 'classId'=>'int', + 'sectionNumber'=>'int', + 'enrolledOn'=>'int', + 'active'=>'int', + 'withdrewOn'=>'int'); + + var $__nulls = array(); + + + + function getPrimaryKey() { + return $this->classEnrollmentId; + } + + + function setPrimaryKey($val) { + $this->classEnrollmentId = $val; + } + + + function save($dsn="default") { + if ( $this->isNew() ) { + $this->setPrimaryKey(ClassEnrollmentPeer::doInsert($this,$dsn)); + } else { + ClassEnrollmentPeer::doUpdate($this,$dsn); + } + } + + + function load($key,$dsn="default") { + $where = ''; + if (is_array($key) ) { + while (list ($k,$v) = @each($key) ) { + $where .= "$k='$v' and "; + } + $where = substr($where,0,-5); + } else { + $where = "class_enrollment_id='".$key."'"; + } + $array = ClassEnrollmentPeer::doSelect($where,$dsn); + return $array[0]; + } + + + function loadAll($dsn="default") { + $array = ClassEnrollmentPeer::doSelect('',$dsn); + return $array; + } + + + function delete($deep=false,$dsn="default") { + ClassEnrollmentPeer::doDelete($this,$deep,$dsn); + } + + + function isNew() { + return $this->_new; + } + + + function isModified() { + return $this->_modified; + + } + + + function get($key) { + return $this->{$key}; + } + + + /** + * only sets if the new value is !== the current value + * returns true if the value was updated + * also, sets _modified to true on success + */ + function set($key,$val) { + if ($this->{$key} !== $val) { + $this->_modified = true; + $this->{$key} = $val; + return true; + } + return false; + } + +} + + +class ClassEnrollmentPeerBase { + + var $tableName = 'class_enrollment'; + + function doSelect($where,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_SelectStatement("class_enrollment",$where); + $st->fields['class_enrollment_id'] = 'class_enrollment_id'; + $st->fields['student_id'] = 'student_id'; + $st->fields['semester_id'] = 'semester_id'; + $st->fields['class_id'] = 'class_id'; + $st->fields['section_number'] = 'section_number'; + $st->fields['enrolled_on'] = 'enrolled_on'; + $st->fields['active'] = 'active'; + $st->fields['withdrew_on'] = 'withdrew_on'; + + + $array = array(); + $db->executeQuery($st); + while($db->nextRecord() ) { + $array[] = ClassEnrollmentPeer::row2Obj($db->record); + } + return $array; + } + + function doInsert(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_InsertStatement("class_enrollment"); + $st->fields['class_enrollment_id'] = $obj->classEnrollmentId; + $st->fields['student_id'] = $obj->studentId; + $st->fields['semester_id'] = $obj->semesterId; + $st->fields['class_id'] = $obj->classId; + $st->fields['section_number'] = $obj->sectionNumber; + $st->fields['enrolled_on'] = $obj->enrolledOn; + $st->fields['active'] = $obj->active; + $st->fields['withdrew_on'] = $obj->withdrewOn; + + + $st->key = 'class_enrollment_id'; + $db->executeQuery($st); + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + function doUpdate(&$obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_UpdateStatement("class_enrollment"); + $st->fields['class_enrollment_id'] = $obj->classEnrollmentId; + $st->fields['student_id'] = $obj->studentId; + $st->fields['semester_id'] = $obj->semesterId; + $st->fields['class_id'] = $obj->classId; + $st->fields['section_number'] = $obj->sectionNumber; + $st->fields['enrolled_on'] = $obj->enrolledOn; + $st->fields['active'] = $obj->active; + $st->fields['withdrew_on'] = $obj->withdrewOn; + + + $st->key = 'class_enrollment_id'; + $db->executeQuery($st); + $obj->_modified = false; + + } + + function doReplace($obj,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + if ($this->isNew() ) { + $db->executeQuery(new PBDO_InsertStatement($criteria)); + } else { + $db->executeQuery(new PBDO_UpdateStatement($criteria)); + } + } + + + /** + * remove an object + */ + function doDelete(&$obj,$deep=false,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + $st = new PBDO_DeleteStatement("class_enrollment","class_enrollment_id = '".$obj->getPrimaryKey()."'"); + + $db->executeQuery($st); + + if ( $deep ) { + + } + + $obj->_new = false; + $obj->_modified = false; + $id = $db->getInsertID(); + return $id; + + } + + + + /** + * send a raw query + */ + function doQuery(&$sql,$dsn="default") { + //use this tableName + $db = DB::getHandle($dsn); + + $db->query($sql); + + return; + } + + + + function row2Obj($row) { + $x = new ClassEnrollment(); + $x->classEnrollmentId = $row['class_enrollment_id']; + $x->studentId = $row['student_id']; + $x->semesterId = $row['semester_id']; + $x->classId = $row['class_id']; + $x->sectionNumber = $row['section_number']; + $x->enrolledOn = $row['enrolled_on']; + $x->active = $row['active']; + $x->withdrewOn = $row['withdrew_on']; + + $x->_new = false; + return $x; + } + + +} + + +//You can edit this class, but do not change this next line! +class ClassEnrollment extends ClassEnrollmentBase { + + + +} + + + +class ClassEnrollmentPeer extends ClassEnrollmentPeerBase { + +} + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:58:37
|
Revision: 1293 http://logicampus.svn.sourceforge.net/logicampus/?rev=1293&view=rev Author: faheemkhan Date: 2009-02-27 11:58:26 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed Paths: ------------- logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php Deleted: logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php =================================================================== --- logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php 2009-02-27 11:52:19 UTC (rev 1292) +++ logicampus/trunk/src/logicreate/lib/PBDO/ClassEnrollment.php 2009-02-27 11:58:26 UTC (rev 1293) @@ -1,260 +0,0 @@ -<? - -class ClassEnrollmentBase { - - var $_new = true; //not pulled from DB - var $_modified; //set() called - var $_version = '1.7'; //PBDO version number - var $_entityVersion = ''; //Source version number - var $classEnrollmentId; - var $studentId; - var $semesterId; - var $classId; - var $sectionNumber; - var $enrolledOn; - var $active; - var $withdrewOn; - - var $__attributes = array( - 'classEnrollmentId'=>'int', - 'studentId'=>'int', - 'semesterId'=>'int', - 'classId'=>'int', - 'sectionNumber'=>'int', - 'enrolledOn'=>'int', - 'active'=>'int', - 'withdrewOn'=>'int'); - - var $__nulls = array(); - - - - function getPrimaryKey() { - return $this->classEnrollmentId; - } - - - function setPrimaryKey($val) { - $this->classEnrollmentId = $val; - } - - - function save($dsn="default") { - if ( $this->isNew() ) { - $this->setPrimaryKey(ClassEnrollmentPeer::doInsert($this,$dsn)); - } else { - ClassEnrollmentPeer::doUpdate($this,$dsn); - } - } - - - function load($key,$dsn="default") { - $where = ''; - if (is_array($key) ) { - while (list ($k,$v) = @each($key) ) { - $where .= "$k='$v' and "; - } - $where = substr($where,0,-5); - } else { - $where = "class_enrollment_id='".$key."'"; - } - $array = ClassEnrollmentPeer::doSelect($where,$dsn); - return $array[0]; - } - - - function loadAll($dsn="default") { - $array = ClassEnrollmentPeer::doSelect('',$dsn); - return $array; - } - - - function delete($deep=false,$dsn="default") { - ClassEnrollmentPeer::doDelete($this,$deep,$dsn); - } - - - function isNew() { - return $this->_new; - } - - - function isModified() { - return $this->_modified; - - } - - - function get($key) { - return $this->{$key}; - } - - - /** - * only sets if the new value is !== the current value - * returns true if the value was updated - * also, sets _modified to true on success - */ - function set($key,$val) { - if ($this->{$key} !== $val) { - $this->_modified = true; - $this->{$key} = $val; - return true; - } - return false; - } - -} - - -class ClassEnrollmentPeerBase { - - var $tableName = 'class_enrollment'; - - function doSelect($where,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_SelectStatement("class_enrollment",$where); - $st->fields['class_enrollment_id'] = 'class_enrollment_id'; - $st->fields['student_id'] = 'student_id'; - $st->fields['semester_id'] = 'semester_id'; - $st->fields['class_id'] = 'class_id'; - $st->fields['section_number'] = 'section_number'; - $st->fields['enrolled_on'] = 'enrolled_on'; - $st->fields['active'] = 'active'; - $st->fields['withdrew_on'] = 'withdrew_on'; - - - $array = array(); - $db->executeQuery($st); - while($db->nextRecord() ) { - $array[] = ClassEnrollmentPeer::row2Obj($db->record); - } - return $array; - } - - function doInsert(&$obj,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_InsertStatement("class_enrollment"); - $st->fields['class_enrollment_id'] = $obj->classEnrollmentId; - $st->fields['student_id'] = $obj->studentId; - $st->fields['semester_id'] = $obj->semesterId; - $st->fields['class_id'] = $obj->classId; - $st->fields['section_number'] = $obj->sectionNumber; - $st->fields['enrolled_on'] = $obj->enrolledOn; - $st->fields['active'] = $obj->active; - $st->fields['withdrew_on'] = $obj->withdrewOn; - - - $st->key = 'class_enrollment_id'; - $db->executeQuery($st); - - $obj->_new = false; - $obj->_modified = false; - $id = $db->getInsertID(); - return $id; - - } - - function doUpdate(&$obj,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_UpdateStatement("class_enrollment"); - $st->fields['class_enrollment_id'] = $obj->classEnrollmentId; - $st->fields['student_id'] = $obj->studentId; - $st->fields['semester_id'] = $obj->semesterId; - $st->fields['class_id'] = $obj->classId; - $st->fields['section_number'] = $obj->sectionNumber; - $st->fields['enrolled_on'] = $obj->enrolledOn; - $st->fields['active'] = $obj->active; - $st->fields['withdrew_on'] = $obj->withdrewOn; - - - $st->key = 'class_enrollment_id'; - $db->executeQuery($st); - $obj->_modified = false; - - } - - function doReplace($obj,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - if ($this->isNew() ) { - $db->executeQuery(new PBDO_InsertStatement($criteria)); - } else { - $db->executeQuery(new PBDO_UpdateStatement($criteria)); - } - } - - - /** - * remove an object - */ - function doDelete(&$obj,$deep=false,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - $st = new PBDO_DeleteStatement("class_enrollment","class_enrollment_id = '".$obj->getPrimaryKey()."'"); - - $db->executeQuery($st); - - if ( $deep ) { - - } - - $obj->_new = false; - $obj->_modified = false; - $id = $db->getInsertID(); - return $id; - - } - - - - /** - * send a raw query - */ - function doQuery(&$sql,$dsn="default") { - //use this tableName - $db = DB::getHandle($dsn); - - $db->query($sql); - - return; - } - - - - function row2Obj($row) { - $x = new ClassEnrollment(); - $x->classEnrollmentId = $row['class_enrollment_id']; - $x->studentId = $row['student_id']; - $x->semesterId = $row['semester_id']; - $x->classId = $row['class_id']; - $x->sectionNumber = $row['section_number']; - $x->enrolledOn = $row['enrolled_on']; - $x->active = $row['active']; - $x->withdrewOn = $row['withdrew_on']; - - $x->_new = false; - return $x; - } - - -} - - -//You can edit this class, but do not change this next line! -class ClassEnrollment extends ClassEnrollmentBase { - - - -} - - - -class ClassEnrollmentPeer extends ClassEnrollmentPeerBase { - -} - -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:52:27
|
Revision: 1292 http://logicampus.svn.sourceforge.net/logicampus/?rev=1292&view=rev Author: faheemkhan Date: 2009-02-27 11:52:19 +0000 (Fri, 27 Feb 2009) Log Message: ----------- new xml for PU Tasks: Image Lob Added Paths: ----------- logicampus/trunk/src/pbdo/logicampus_pbdo.xml Added: logicampus/trunk/src/pbdo/logicampus_pbdo.xml =================================================================== --- logicampus/trunk/src/pbdo/logicampus_pbdo.xml (rev 0) +++ logicampus/trunk/src/pbdo/logicampus_pbdo.xml 2009-02-27 11:52:19 UTC (rev 1292) @@ -0,0 +1,828 @@ +<?xml version="1.0"?> +<project + name="logicampus"> + + <entity name="lc_action_log" description="log important actions"> + <attribute + name = "lc_action_log_id" + type = "int" + size = "11" + primaryKey = "true" /> + <attribute + name = "lc_action_log_type_id" + type = "int" + size = "11" /> + <attribute + name = "action_datetime" + type = "int" + size = "11" /> + <attribute + name = "agent_ip" + type = "varchar" + size = "32" /> + <attribute + name = "agent_url" + type = "varchar" + size = "32" /> + <attribute + name = "file" + type = "varchar" + size = "255" /> + <attribute + name = "line" + type = "varchar" + size = "32" /> + <attribute + name = "agent_username" + type = "varchar" + size = "32" /> + <attribute + name = "message" + type = "blob" + size = "32" /> + <attribute + name = "class_id" + type = "int" + size = "11" /> + <attribute + name = "semester_id" + type = "int" + size = "11" /> + <key + attribute="lc_action_log_type_id" + name="lc_action_log_type_idx"/> + <key + attribute="class_id" + name="class_idx"/> + <key + attribute="semester_id" + name="semester_idx"/> + <key + attribute="action_datetime" + name="action_datetime_idx"/> + </entity> + <entity name="lc_action_log_type" description="types of actions that can be logged"> + <attribute + name = "lc_action_log_type_id" + type = "int" + size = "11" + primaryKey = "true" /> + <attribute + name = "action_code" + type = "varchar" + size = "32" /> + <attribute + name = "display_name" + type = "varchar" + size = "255" /> + </entity> + <entity name="lc_event"> + <attribute + name = "lc_event_id" + type = "int" + size = "11" + extra = "unsigned" + primaryKey = "true" /> + <attribute + name = "calendar_type" + type = "varchar" + size = "255" /> + <attribute + name = "username" + type = "varchar" + size = "15" /> + <attribute + name = "title" + type = "varchar" + size = "255" /> + <attribute + name = "description" + type = "text"/> + <attribute + name = "location" + type = "varchar" + size = "255" /> + <attribute + name = "start_date" + type = "int" + size = "11" /> + <attribute + name = "end_date" + type = "int" + size = "11" /> + <attribute + name = "groups" + type = "text"/> + <attribute + name = "notgroups" + type = "text"/> + <attribute + name = "last_modified" + type = "timestamp" + size = "11" /> + <attribute + name = "repeat_type" + type = "int" + size = "11" /> + <attribute + name = "repeat_count" + type = "int" + size = "11" + extra = "unsigned" /> + <attribute + name = "repeat_mask" + type = "int" + size = "11" + extra = "unsigned" /> + <attribute + name = "repeat_exclude" + type = "text" + size = "11" /> + <attribute + name = "class_id" + type = "int" + size = "11" + extra = "unsigned" /> + <key + attribute="class_id" + name="class_idx"/> + <key + attribute="start_date" + name="start_date_idx"/> + <key + attribute="end_date" + name="end_date_idx"/> + </entity> + <entity name="class_enrollment" description="hold enrollment info for one student in one class and section"> + <attribute + name = "class_enrollment_id" + type = "int" + size = "11" + primaryKey = "true" /> + <attribute + name = "student_id" + type = "int" + size = "11" /> + <attribute + name = "semester_id" + type = "int" + size = "11" /> + <attribute + name = "class_id" + type = "int" + size = "11" /> + <attribute + name = "section_number" + type = "int" + size = "11" /> + <attribute + name = "enrolled_on" + type = "int" + size = "11" /> + <attribute + name = "active" + type = "int" + size = "11" /> + <attribute + name = "withdrew_on" + type = "int" + size = "11" /> + <key + attribute="student_id" + name="student_idx"/> + <key + attribute="semester_id" + name="semester_idx"/> + <key + attribute="class_id" + name="class_idx"/> + <key + attribute="active" + name="active_idx"/> + </entity> + <entity name="class_syllabus"> + <attribute name="class_syllabus_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="class_id" + required="true" + default="0" + size="11" + type="INTEGER"/> + <attribute name="section_title" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="section_content" + required="true" + size="" + type="LONGVARCHAR"/> + <attribute name="rank" + required="true" + default="0" + size="11" + type="INTEGER"/> + + <key + attribute="rank" + name="rank_idx"/> + </entity> + + <entity name="class_lesson_sequence"> + <attribute name="class_lesson_sequence_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lesson_id" + required="true" + default="0" + size="11" + type="INTEGER"/> + <attribute name="class_id" + required="true" + default="0" + size="11" + type="INTEGER"/> + <attribute name="lob_class_repo_id" + required="true" + default="0" + size="11" + type="INTEGER"/> + <attribute name="lob_type" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_sub_type" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_mime" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_title" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="link_text" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="not_before_seq_id" + required="false" + size="11" + type="int"/> + <attribute name="start_offset" + required="false" + size="11" + type="int"/> + <attribute name="start_time" + required="false" + size="5" + extra="unsigned" + type="mediumint"/> + <attribute name="end_offset" + required="false" + size="11" + type="int"/> + <attribute name="end_time" + required="false" + size="5" + extra="unsigned" + type="mediumint"/> + <attribute name="due_offset" + required="false" + size="11" + type="int"/> + <attribute name="due_time" + required="false" + size="5" + extra="unsigned" + type="mediumint"/> + <attribute name="grace_period_days" + required="false" + size="11" + type="int"/> + <attribute name="rank" + required="true" + default="0" + size="11" + type="INTEGER"/> + <attribute name="hide_until_start" + required="true" + size="2" + default="0" + type="int"/> + <attribute name="hide_after_end" + required="true" + size="2" + default="0" + type="int"/> + <key + attribute="class_id" + name="class_idx"/> + <key + attribute="lesson_id" + name="lesson_idx"/> + <key + attribute="lob_class_repo_id" + name="lob_class_repo_idx"/> + <key + attribute="rank" + name="rank_idx"/> + <key + attribute="link_text" + name="link_text_idx"/> + </entity> + + <entity name="lob_repo_entry"> + <attribute name="lob_repo_entry_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_guid" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="lob_title" + required="true" + default="" + size="255" + type="VARCHAR"/> + <attribute name="lob_type" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_sub_type" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_mime" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_description" + required="false" + type="TEXT"/> + <attribute name="lob_notes" + required="false" + type="LONGTEXT"/> + <attribute name="lob_urltitle" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="lob_version" + required="true" + size="11" + type="INTEGER"/> + <attribute name="lob_bytes" + required="true" + size="11" + type="INTEGER"/> + <key + attribute="lob_guid" + name="lob_guid_idx"/> + </entity> + + <entity name="lob_content"> + <attribute name="lob_content_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_text" + required="false" + type="LONGTEXT"/> + <attribute name="lob_binary" + required="false" + type="LONGBLOB"/> + <attribute name="lob_filename" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="lob_caption" + size="255" + type="VARCHAR"/> + <attribute name="lob_repo_entry_id" + required="true" + size="11" + type="INTEGER"/> + <key + attribute="lob_repo_entry_id" + name="lob_repo_entry_idx"/> + <foreign-key foreignTable="lob_repo_entry"> + <reference + local="lob_repo_entry_id" + foreign="lob_repo_entry_id"/> + </foreign-key> + </entity> + + + <entity name="lob_test"> + <attribute name="lob_test_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + + <attribute name="lob_repo_entry_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="num_retry" + required="true" + size="11" + type="INTEGER"/> + <attribute name="is_practice" + required="true" + size="2" + type="TINYINT"/> + <key + attribute="lob_repo_entry_id" + name="lob_repo_entry_idx"/> + <foreign-key foreignTable="lob_repo_entry"> + <reference + local="lob_repo_entry_id" + foreign="lob_repo_entry_id"/> + </foreign-key> + </entity> + + <entity name="lob_test_qst"> + <attribute name="lob_test_qst_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + + <attribute name="lob_test_id" + required="true" + size="11" + type="INTEGER"/> + + <attribute name="image_content_id" + required="false" + size="11" + type="INTEGER"/> + + <attribute name="qst_text" + required="true" + default="" + type="TEXT"/> + + <attribute name="qst_choices" + required="true" + default="" + type="TEXT"/> + + <attribute name="question_type_id" + required="true" + default="" + type="tinyint"/> + + <attribute name="qst_points" + required="true" + default="" + type="tinyint"/> + + <key + attribute="lob_test_id" + name="lob_test_idx"/> + <foreign-key foreignTable="lob_test"> + <reference + local="lob_test_id" + foreign="lob_test_id"/> + </foreign-key> + + <foreign-key foreignTable="lob_repo_entry"> + <reference + local="image_content_id" + foreign="lob_repo_entry_id"/> + </foreign-key> + </entity> + + <entity name="lob_activity"> + <attribute name="lob_activity_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + + <attribute name="lob_repo_entry_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="response_type_id" + required="true" + size="4" + type="TINYINT"/> + <key + attribute="lob_repo_entry_id" + name="lob_repo_entry_idx"/> + <foreign-key foreignTable="lob_repo_entry"> + <reference + local="lob_repo_entry_id" + foreign="lob_repo_entry_id"/> + </foreign-key> + </entity> + + <entity name="lob_metadata"> + <attribute name="lob_metadata_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_repo_entry_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="subject" + required="true" + default="" + size="255" + type="VARCHAR"/> + <attribute name="subdisc" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="author" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="source" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="copyright" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="license" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="user_version" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="status" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="updated_on" + required="true" + size="11" + type="integer"/> + <attribute name="created_on" + required="true" + size="11" + type="integer"/> + <key + attribute="lob_repo_entry_id" + name="lob_repo_entry_idx"/> + </entity> + + <entity name="lob_user_link"> + <attribute name="lob_user_link_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_repo_entry_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="user_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="is_owner" + required="false" + size="11" + type="INTEGER"/> + <key + attribute="lob_repo_entry_id" + name="lob_repo_entry_idx"/> + <key + attribute="user_id" + name="user_id"/> + <key + attribute="is_owner" + name="is_owner_idx"/> + </entity> + + <entity name="lob_class_repo"> + <attribute name="lob_class_repo_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="class_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="lob_repo_entry_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="lob_guid" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="lob_title" + required="true" + default="" + size="255" + type="VARCHAR"/> + <attribute name="lob_urltitle" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="lob_copy_style" + required="true" + size="1" + type="CHAR"/> + <attribute name="lob_type" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_sub_type" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_mime" + required="true" + size="100" + type="VARCHAR"/> + <attribute name="lob_description" + required="false" + type="TEXT"/> + <attribute name="lob_version" + required="true" + size="11" + type="INTEGER"/> + <attribute name="lob_bytes" + required="true" + size="11" + type="INTEGER"/> + <key + attribute="lob_version" + name="lob_version_idx"/> + <key + attribute="lob_repo_entry_id" + name="lob_repo_entry_idx"/> + <key + attribute="lob_type" + name="lob_type_idx"/> + <key + attribute="class_id" + name="class_idx"/> + <key + attribute="lob_guid" + name="lob_guid_idx"/> + </entity> + + <entity name="lob_class_metadata"> + <attribute name="lob_class_metadata_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_class_repo_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="subject" + required="true" + default="" + size="255" + type="VARCHAR"/> + <attribute name="subdisc" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="author" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="source" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="copyright" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="license" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="user_version" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="status" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="updated_on" + required="true" + size="11" + type="integer"/> + <attribute name="created_on" + required="true" + size="11" + type="integer"/> + <key + attribute="lob_class_repo_id" + name="lob_class_repo_idx"/> + </entity> + + <entity name="lob_class_content"> + <attribute name="lob_class_content_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_class_repo_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="lob_text" + required="false" + type="LONGTEXT"/> + <attribute name="lob_binary" + required="false" + type="LONGBLOB"/> + <attribute name="lob_filename" + required="true" + size="255" + type="VARCHAR"/> + <attribute name="lob_caption" + size="255" + type="VARCHAR"/> + <key + attribute="lob_class_repo_id" + name="lob_class_repo_idx"/> + <foreign-key foreignTable="lob_class_repo"> + <reference + local="lob_class_repo_id" + foreign="lob_class_repo_id"/> + </foreign-key> + </entity> + + <entity name="lob_class_activity"> + <attribute name="lob_class_activity_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_class_repo_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="response_type_id" + required="true" + size="4" + type="TINYINT"/> + <key + attribute="lob_class_repo_id" + name="lob_class_repo_idx"/> + <foreign-key foreignTable="lob_class_repo"> + <reference + local="lob_class_repo_id" + foreign="lob_class_repo_id"/> + </foreign-key> + </entity> + + <entity name="lob_class_test"> + <attribute name="lob_class_test_id" + required="true" + primaryKey="true" + size="11" + type="INTEGER"/> + <attribute name="lob_class_repo_id" + required="true" + size="11" + type="INTEGER"/> + <attribute name="num_retry" + required="true" + size="11" + type="INTEGER"/> + <attribute name="is_practice" + required="true" + size="2" + type="TINYINT"/> + <key + attribute="lob_class_repo_id" + name="lob_class_repo_idx"/> + <foreign-key foreignTable="lob_class_repo"> + <reference + local="lob_class_repo_id" + foreign="lob_class_repo_id"/> + </foreign-key> + </entity> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:50:07
|
Revision: 1291 http://logicampus.svn.sourceforge.net/logicampus/?rev=1291&view=rev Author: faheemkhan Date: 2009-02-27 11:50:01 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed Paths: ------------- logicampus/trunk/src/pbdo/logicampus_pbdo.xml Deleted: logicampus/trunk/src/pbdo/logicampus_pbdo.xml =================================================================== --- logicampus/trunk/src/pbdo/logicampus_pbdo.xml 2009-02-27 11:44:02 UTC (rev 1290) +++ logicampus/trunk/src/pbdo/logicampus_pbdo.xml 2009-02-27 11:50:01 UTC (rev 1291) @@ -1,817 +0,0 @@ -<?xml version="1.0"?> -<project - name="logicampus"> - - <entity name="lc_action_log" description="log important actions"> - <attribute - name = "lc_action_log_id" - type = "int" - size = "11" - primaryKey = "true" /> - <attribute - name = "lc_action_log_type_id" - type = "int" - size = "11" /> - <attribute - name = "action_datetime" - type = "int" - size = "11" /> - <attribute - name = "agent_ip" - type = "varchar" - size = "32" /> - <attribute - name = "agent_url" - type = "varchar" - size = "32" /> - <attribute - name = "file" - type = "varchar" - size = "255" /> - <attribute - name = "line" - type = "varchar" - size = "32" /> - <attribute - name = "agent_username" - type = "varchar" - size = "32" /> - <attribute - name = "message" - type = "blob" - size = "32" /> - <attribute - name = "class_id" - type = "int" - size = "11" /> - <attribute - name = "semester_id" - type = "int" - size = "11" /> - <key - attribute="lc_action_log_type_id" - name="lc_action_log_type_idx"/> - <key - attribute="class_id" - name="class_idx"/> - <key - attribute="semester_id" - name="semester_idx"/> - <key - attribute="action_datetime" - name="action_datetime_idx"/> - </entity> - <entity name="lc_action_log_type" description="types of actions that can be logged"> - <attribute - name = "lc_action_log_type_id" - type = "int" - size = "11" - primaryKey = "true" /> - <attribute - name = "action_code" - type = "varchar" - size = "32" /> - <attribute - name = "display_name" - type = "varchar" - size = "255" /> - </entity> - <entity name="lc_event"> - <attribute - name = "lc_event_id" - type = "int" - size = "11" - extra = "unsigned" - primaryKey = "true" /> - <attribute - name = "calendar_type" - type = "varchar" - size = "255" /> - <attribute - name = "username" - type = "varchar" - size = "15" /> - <attribute - name = "title" - type = "varchar" - size = "255" /> - <attribute - name = "description" - type = "text"/> - <attribute - name = "location" - type = "varchar" - size = "255" /> - <attribute - name = "start_date" - type = "int" - size = "11" /> - <attribute - name = "end_date" - type = "int" - size = "11" /> - <attribute - name = "groups" - type = "text"/> - <attribute - name = "notgroups" - type = "text"/> - <attribute - name = "last_modified" - type = "timestamp" - size = "11" /> - <attribute - name = "repeat_type" - type = "int" - size = "11" /> - <attribute - name = "repeat_count" - type = "int" - size = "11" - extra = "unsigned" /> - <attribute - name = "repeat_mask" - type = "int" - size = "11" - extra = "unsigned" /> - <attribute - name = "repeat_exclude" - type = "text" - size = "11" /> - <attribute - name = "class_id" - type = "int" - size = "11" - extra = "unsigned" /> - <key - attribute="class_id" - name="class_idx"/> - <key - attribute="start_date" - name="start_date_idx"/> - <key - attribute="end_date" - name="end_date_idx"/> - </entity> - <entity name="class_enrollment" description="hold enrollment info for one student in one class and section"> - <attribute - name = "class_enrollment_id" - type = "int" - size = "11" - primaryKey = "true" /> - <attribute - name = "student_id" - type = "int" - size = "11" /> - <attribute - name = "semester_id" - type = "int" - size = "11" /> - <attribute - name = "class_id" - type = "int" - size = "11" /> - <attribute - name = "section_number" - type = "int" - size = "11" /> - <attribute - name = "enrolled_on" - type = "int" - size = "11" /> - <attribute - name = "active" - type = "int" - size = "11" /> - <attribute - name = "withdrew_on" - type = "int" - size = "11" /> - <key - attribute="student_id" - name="student_idx"/> - <key - attribute="semester_id" - name="semester_idx"/> - <key - attribute="class_id" - name="class_idx"/> - <key - attribute="active" - name="active_idx"/> - </entity> - <entity name="class_syllabus"> - <attribute name="class_syllabus_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="class_id" - required="true" - default="0" - size="11" - type="INTEGER"/> - <attribute name="section_title" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="section_content" - required="true" - size="" - type="LONGVARCHAR"/> - <attribute name="rank" - required="true" - default="0" - size="11" - type="INTEGER"/> - - <key - attribute="rank" - name="rank_idx"/> - </entity> - - <entity name="class_lesson_sequence"> - <attribute name="class_lesson_sequence_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lesson_id" - required="true" - default="0" - size="11" - type="INTEGER"/> - <attribute name="class_id" - required="true" - default="0" - size="11" - type="INTEGER"/> - <attribute name="lob_class_repo_id" - required="true" - default="0" - size="11" - type="INTEGER"/> - <attribute name="lob_type" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_sub_type" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_mime" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_title" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="link_text" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="not_before_seq_id" - required="false" - size="11" - type="int"/> - <attribute name="start_offset" - required="false" - size="11" - type="int"/> - <attribute name="start_time" - required="false" - size="5" - extra="unsigned" - type="mediumint"/> - <attribute name="end_offset" - required="false" - size="11" - type="int"/> - <attribute name="end_time" - required="false" - size="5" - extra="unsigned" - type="mediumint"/> - <attribute name="due_offset" - required="false" - size="11" - type="int"/> - <attribute name="due_time" - required="false" - size="5" - extra="unsigned" - type="mediumint"/> - <attribute name="grace_period_days" - required="false" - size="11" - type="int"/> - <attribute name="rank" - required="true" - default="0" - size="11" - type="INTEGER"/> - <attribute name="hide_until_start" - required="true" - size="2" - default="0" - type="int"/> - <attribute name="hide_after_end" - required="true" - size="2" - default="0" - type="int"/> - <key - attribute="class_id" - name="class_idx"/> - <key - attribute="lesson_id" - name="lesson_idx"/> - <key - attribute="lob_class_repo_id" - name="lob_class_repo_idx"/> - <key - attribute="rank" - name="rank_idx"/> - <key - attribute="link_text" - name="link_text_idx"/> - </entity> - - <entity name="lob_repo_entry"> - <attribute name="lob_repo_entry_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_guid" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="lob_title" - required="true" - default="" - size="255" - type="VARCHAR"/> - <attribute name="lob_type" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_sub_type" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_mime" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_description" - required="false" - type="TEXT"/> - <attribute name="lob_notes" - required="false" - type="LONGTEXT"/> - <attribute name="lob_urltitle" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="lob_version" - required="true" - size="11" - type="INTEGER"/> - <attribute name="lob_bytes" - required="true" - size="11" - type="INTEGER"/> - <key - attribute="lob_guid" - name="lob_guid_idx"/> - </entity> - - <entity name="lob_content"> - <attribute name="lob_content_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_text" - required="false" - type="LONGTEXT"/> - <attribute name="lob_binary" - required="false" - type="LONGBLOB"/> - <attribute name="lob_filename" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="lob_caption" - size="255" - type="VARCHAR"/> - <attribute name="lob_repo_entry_id" - required="true" - size="11" - type="INTEGER"/> - <key - attribute="lob_repo_entry_id" - name="lob_repo_entry_idx"/> - <foreign-key foreignTable="lob_repo_entry"> - <reference - local="lob_repo_entry_id" - foreign="lob_repo_entry_id"/> - </foreign-key> - </entity> - - - <entity name="lob_test"> - <attribute name="lob_test_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - - <attribute name="lob_repo_entry_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="num_retry" - required="true" - size="11" - type="INTEGER"/> - <attribute name="is_practice" - required="true" - size="2" - type="TINYINT"/> - <key - attribute="lob_repo_entry_id" - name="lob_repo_entry_idx"/> - <foreign-key foreignTable="lob_repo_entry"> - <reference - local="lob_repo_entry_id" - foreign="lob_repo_entry_id"/> - </foreign-key> - </entity> - - <entity name="lob_test_qst"> - <attribute name="lob_test_qst_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - - <attribute name="lob_test_id" - required="true" - size="11" - type="INTEGER"/> - - <attribute name="qst_text" - required="true" - default="" - type="TEXT"/> - - <attribute name="qst_choices" - required="true" - default="" - type="TEXT"/> - - <attribute name="question_type_id" - required="true" - default="" - type="tinyint"/> - - <attribute name="qst_points" - required="true" - default="" - type="tinyint"/> - - <key - attribute="lob_test_id" - name="lob_test_idx"/> - <foreign-key foreignTable="lob_test"> - <reference - local="lob_test_id" - foreign="lob_test_id"/> - </foreign-key> - </entity> - - <entity name="lob_activity"> - <attribute name="lob_activity_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - - <attribute name="lob_repo_entry_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="response_type_id" - required="true" - size="4" - type="TINYINT"/> - <key - attribute="lob_repo_entry_id" - name="lob_repo_entry_idx"/> - <foreign-key foreignTable="lob_repo_entry"> - <reference - local="lob_repo_entry_id" - foreign="lob_repo_entry_id"/> - </foreign-key> - </entity> - - <entity name="lob_metadata"> - <attribute name="lob_metadata_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_repo_entry_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="subject" - required="true" - default="" - size="255" - type="VARCHAR"/> - <attribute name="subdisc" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="author" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="source" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="copyright" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="license" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="user_version" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="status" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="updated_on" - required="true" - size="11" - type="integer"/> - <attribute name="created_on" - required="true" - size="11" - type="integer"/> - <key - attribute="lob_repo_entry_id" - name="lob_repo_entry_idx"/> - </entity> - - <entity name="lob_user_link"> - <attribute name="lob_user_link_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_repo_entry_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="user_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="is_owner" - required="false" - size="11" - type="INTEGER"/> - <key - attribute="lob_repo_entry_id" - name="lob_repo_entry_idx"/> - <key - attribute="user_id" - name="user_id"/> - <key - attribute="is_owner" - name="is_owner_idx"/> - </entity> - - <entity name="lob_class_repo"> - <attribute name="lob_class_repo_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="class_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="lob_repo_entry_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="lob_guid" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="lob_title" - required="true" - default="" - size="255" - type="VARCHAR"/> - <attribute name="lob_urltitle" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="lob_copy_style" - required="true" - size="1" - type="CHAR"/> - <attribute name="lob_type" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_sub_type" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_mime" - required="true" - size="100" - type="VARCHAR"/> - <attribute name="lob_description" - required="false" - type="TEXT"/> - <attribute name="lob_version" - required="true" - size="11" - type="INTEGER"/> - <attribute name="lob_bytes" - required="true" - size="11" - type="INTEGER"/> - <key - attribute="lob_version" - name="lob_version_idx"/> - <key - attribute="lob_repo_entry_id" - name="lob_repo_entry_idx"/> - <key - attribute="lob_type" - name="lob_type_idx"/> - <key - attribute="class_id" - name="class_idx"/> - <key - attribute="lob_guid" - name="lob_guid_idx"/> - </entity> - - <entity name="lob_class_metadata"> - <attribute name="lob_class_metadata_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_class_repo_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="subject" - required="true" - default="" - size="255" - type="VARCHAR"/> - <attribute name="subdisc" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="author" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="source" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="copyright" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="license" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="user_version" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="status" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="updated_on" - required="true" - size="11" - type="integer"/> - <attribute name="created_on" - required="true" - size="11" - type="integer"/> - <key - attribute="lob_class_repo_id" - name="lob_class_repo_idx"/> - </entity> - - <entity name="lob_class_content"> - <attribute name="lob_class_content_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_class_repo_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="lob_text" - required="false" - type="LONGTEXT"/> - <attribute name="lob_binary" - required="false" - type="LONGBLOB"/> - <attribute name="lob_filename" - required="true" - size="255" - type="VARCHAR"/> - <attribute name="lob_caption" - size="255" - type="VARCHAR"/> - <key - attribute="lob_class_repo_id" - name="lob_class_repo_idx"/> - <foreign-key foreignTable="lob_class_repo"> - <reference - local="lob_class_repo_id" - foreign="lob_class_repo_id"/> - </foreign-key> - </entity> - - <entity name="lob_class_activity"> - <attribute name="lob_class_activity_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_class_repo_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="response_type_id" - required="true" - size="4" - type="TINYINT"/> - <key - attribute="lob_class_repo_id" - name="lob_class_repo_idx"/> - <foreign-key foreignTable="lob_class_repo"> - <reference - local="lob_class_repo_id" - foreign="lob_class_repo_id"/> - </foreign-key> - </entity> - - <entity name="lob_class_test"> - <attribute name="lob_class_test_id" - required="true" - primaryKey="true" - size="11" - type="INTEGER"/> - <attribute name="lob_class_repo_id" - required="true" - size="11" - type="INTEGER"/> - <attribute name="num_retry" - required="true" - size="11" - type="INTEGER"/> - <attribute name="is_practice" - required="true" - size="2" - type="TINYINT"/> - <key - attribute="lob_class_repo_id" - name="lob_class_repo_idx"/> - <foreign-key foreignTable="lob_class_repo"> - <reference - local="lob_class_repo_id" - foreign="lob_class_repo_id"/> - </foreign-key> - </entity> -</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:44:13
|
Revision: 1290 http://logicampus.svn.sourceforge.net/logicampus/?rev=1290&view=rev Author: faheemkhan Date: 2009-02-27 11:44:02 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed Paths: ------------- logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php Deleted: logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php =================================================================== --- logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php 2009-02-27 11:40:21 UTC (rev 1289) +++ logicampus/trunk/src/logicreate/lib/lob/lc_lob_test.php 2009-02-27 11:44:02 UTC (rev 1290) @@ -1,143 +0,0 @@ -<?php -include_once(LIB_PATH.'PBDO/LobTest.php'); -include_once(LIB_PATH.'PBDO/LobTestQst.php'); -//defines constants for question types QUESTON_* -include_once(LIB_PATH.'AssessmentQuestion.php'); -include_once(LIB_PATH.'AssessmentLib.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->repoObj->lobMime = $this->mime; - $this->repoObj->lobType = $this->type; - $this->repoObj->lobSubType = $this->type; - $this->lobSub = new LobTest(); - } else { - $this->repoObj = LobRepoEntry::load($id); - $tests = $this->repoObj->getLobTestsByLobRepoEntryId(); - $this->lobSub = $tests[0]; - $this->loadQuestions(); - $this->lobMetaObj = LobMetadata::load(array('lob_repo_entry_id'=>$id)); - } - - if (isset($this->lobMetaObj) || !is_object($this->lobMetaObj)) { - $this->lobMetaObj = new LobMetadata(); - $this->lobMetaObj->createdOn = time(); - } - } - - function save() { - $ret = parent::save(); - if (!$ret) { return FALSE;} - - $this->saveQuestions(); - } - - - 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 setQuestion($qidx, $qtext, $type = 'QUESTION_ESSAY', $choices = '', $answers = '') { - $q = $this->_makeQuestion($qtext, $type, $choices, $answers); - if ($qidx > -1) { - $this->questionObjs[$qidx] = $q; - } else { - $this->questionObjs[] = $q; - } - } - - function addQuestion($qtext, $type = 'QUESTION_ESSAY', $choices = '', $answers = '') { - $q = $this->_makeQuestion($qtext, $type, $choices, $answers); - $this->questionObjs[] = $q; - } - - function getQuestionCount() { - return count($this->questionObjs); - } - - function _makeQuestion($qtext, $type, $choices, $answers='') { - $q = new LobTestQst(); - $q->qstChoices = array(); - $q->qstText = $qtext; - $q->questionTypeId = constant($type); - if ( is_array($choices) ) { - $q->qstChoices = $choices; - } - return $q; - } - - /** - * Load questions from the DB, add to internal questionObjs array - */ - function loadQuestions() { - $this->questionObjs = array(); - if ($this->lobSub->get('lobTestId') < 1) { return; } - $questionList = LobTestQstPeer::doSelect( ' lob_test_id = '.$this->lobSub->get('lobTestId')); - foreach ($questionList as $q) { - $q->qstChoices = unserialize($q->qstChoices); - $this->questionObjs[] = $q; - } - } - - - function saveQuestions() { - //clean out questions which have been deleted - $ids = array(); - foreach ($this->questionObjs as $q) { - if ((int) $q->lobTestQstId < 1) continue; - $ids[] = $q->lobTestQstId; - } - - $idList = '('. implode(',', $ids).')'; - LobTestQstPeer::doQuery( 'delete from lob_test_qst WHERE lob_test_id = '.$this->lobSub->get('lobTestId') .' AND lob_test_qst_id NOT IN '.$idList); - - //save the questions which have been edited or created new - foreach($this->questionObjs as $q) { - if (!is_object($q)) { continue; } - if (!method_exists( $q, 'set')) { continue; } - $q->set('lobTestId', $this->lobSub->get('lobTestId')); - $q->qstChoices = serialize($q->qstChoices); - $q->save(); - } - } - - /** - * - * @return bool successfully added the choice - */ - function addLabel($l, $correct, $qidx=-1) { - if ($qidx == -1) { - $qidx = $this->getQuestionCount()-1; - } - if ($qidx == -1) { - return false; - } - $lidx = count($this->questionObjs[$qidx]->qstChoices); - if ($lidx == -1) { - $lidx = 0; - } - - $this->questionObjs[$qidx]->qstChoices[$lidx]['label'] = $l; - $this->questionObjs[$qidx]->qstChoices[$lidx]['correct'] = $correct; - return true; - } -} -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:40:25
|
Revision: 1289 http://logicampus.svn.sourceforge.net/logicampus/?rev=1289&view=rev Author: faheemkhan Date: 2009-02-27 11:40:21 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_truefalse.html Added: logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_truefalse.html =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_truefalse.html (rev 0) +++ logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_truefalse.html 2009-02-27 11:40:21 UTC (rev 1289) @@ -0,0 +1,99 @@ +<h3><?= lct('True/False Question');?></h3> + +<?=$t['error'];?> + +<form method="POST"> + <table border="0" width="600"> + <tr> + <td valign="top">*<b>Question</b></td> + <td colspan=2> + <textarea rows="5" cols="50" name="question_text" <?= $t['disableFlag'];?>><?=$t['q']->qstText;?></textarea> + </td> + </tr> + <tr> + <td colspan=3 height=25> </td> + </tr> + <tr> + <td>*<b>Answer</b></td> + <td colspan=2> </td> + </tr> + <? for ($x=0;$x<2;++$x) { ?> + <? $qc = $t['q']->qstChoices[$x]; ?> + <?// debug($t['q']);?> + <?// debug($qc);?> + <tr> + <td width=100 align="right"> + <? printf('%d',$x+1);?>. + </td> + <td width=50><?=$qc['label'];?></td> + <td> + <input name="correct" value="<?=$x;?>" type="radio" <?= $qc['correct'] ? 'CHECKED':'';?>> + </td> + </tr> + <? } ?> + <tr> + <td> </td> + <td colspan=2> +<style> + + div.over { + overflow: scroll; + height: 220px; + width: 240px; + } + +</style> + <FIELDSET valign="middle" style="width: 235px; height: 245px; padding: 2px;"> + + <select name="imagesMenu" id="imagesMenu" + style="width: 235px;" + onChange="document.getElementById('previewfile').src='<?=appurl('lobrepo/exam/event=viewImage/id=');?>' + this.value;" + > + <option value="">Select Image</option> + <?php + $images_array = array(); + $images_array = $t['images']; + + foreach( $images_array as $img) + { ?> + <option value="<?=$img['lob_repo_entry_id']?>"><?=$img['lob_title']?> + </option> + <? } + ?> + </select> + + <div class="over" align="center" valign="middle"> + <table cellpadding="2" cellspacing="0" border="0" width="100%" height="100%"> + <tr> + + <td valign="middle" align="center" height="100%" width="100%"> + <img alt="" name="previewfile" id="previewfile"> + <? if( isset($t['imgId']) ){ ?> + <script language="JavaScript" type="text/javascript"> + document.getElementById('imagesMenu').value = <?=$t['imgId']?>; + document.getElementById('previewfile').src='<?=appurl('lobrepo/exam/event=viewImage/id=').$t['imgId'];?>'; + </script> + <? } ?> + + </td> + </tr> + </table> + </div> + + </FIELDSET> + </td> + </tr> + <tr> + <td> </td> + <td colspan=2> + <input type="submit" name="sbmt_button" value="<?=lct('Continue ->');?>"/> + <input type="hidden" name="event" value="saveQuestion"/> + <input type="hidden" name="qidx" value="<?=$t['qidx'];?>"/> + <input type="hidden" name="questionType" value="<?= $t['questionType'];?>"/> + </td> + </tr> + </table> + +</form> + +<p>* denotes a required field.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:39:35
|
Revision: 1288 http://logicampus.svn.sourceforge.net/logicampus/?rev=1288&view=rev Author: faheemkhan Date: 2009-02-27 11:39:27 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_mchoice.html Added: logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_mchoice.html =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_mchoice.html (rev 0) +++ logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_mchoice.html 2009-02-27 11:39:27 UTC (rev 1288) @@ -0,0 +1,49 @@ +<h3><?= lct('Multiple Choice Question');?></h3> +<form method="POST" action="<?=modurl('exam/');?>"> + <table border="0" width="600"> + <tr> + <td valign="top">*<b><?= lct('Question');?></b></td> + <td> + <textarea rows="5" cols="50" name="questionText" <?= $t['disableFlag'];?>><?=$t['questionObj']->qstText;?></textarea> + </td> + </tr> + <tr> + <td><b><?= lct('Answers');?></b></td> + <td><?=lct('(check boxes to indicate the correct responses)');?></td> + </tr> + <? for ($x=0;$x<10;++$x) { ?> + <? $qc = $t['q']->qstChoices[$x]; ?> + + <tr> + <td align="right"> + <? if ($x <= 1) {echo '*';} else { echo ' '; } ?> + <? printf('%d',$x+1);?>. + </td> + <td NOWRAP> + <? $x <= 1 ? '*' : ''; ?> + <input name="labels[<?=$x;?>]" type="text" value="<?=$qc['label'];?>" size="50" <?= $t['disableFlag'];?>> + <input name="correct" value="<?=$x;?>" type="radio" <?= $qc['correct'] ? 'CHECKED':'';?>> + </td> + </tr> + <? } ?> + + <tr> + <td> </td> + <td> + </td> + </tr> + + <tr> + <td> </td> + <td> + <input type="submit" name="sbmt_button" value="<?=lct('Continue ->');?>"/> + <input type="hidden" name="event" value="saveQuestion"/> + <input type="hidden" name="qidx" value="<?=$t['qidx'];?>"/> + <input type="hidden" name="questionType" value="<?= $t['questionType'];?>"/> +</form> + </td> + </tr> + + </table> + +<p>* denotes a required field.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fah...@us...> - 2009-02-27 11:38:37
|
Revision: 1287 http://logicampus.svn.sourceforge.net/logicampus/?rev=1287&view=rev Author: faheemkhan Date: 2009-02-27 11:38:33 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added Paths: ----------- logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_matching.html Added: logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_matching.html =================================================================== --- logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_matching.html (rev 0) +++ logicampus/trunk/src/logicreate/services/lobrepo/templates/exam_question_matching.html 2009-02-27 11:38:33 UTC (rev 1287) @@ -0,0 +1,109 @@ +<?=$t['sectionheader'];?> + +<?=$t['error'];?><FIELDSET> +<LEGEND> +<b>Help</b> +</LEGEND> +Enter your questions in the left column and your answers in the right column. Answers will automatically be sorted for you when you preview on the next page. Questions will remain in the order you entered them. Each time you update this question the answers will be randomly sorted. +</FIELDSET> + +<form method="POST" > + <table border="0" width="100%"> + <tr> + <td> </td> + <td colspan=2> + *<b>Instructions</b><br /> + <textarea rows="5" cols="50" name="questionText" <?= $t['disableFlag'];?>><?=$t['q']->questionText;?></textarea> + </td> + </tr> + <tr> + <td colspan=3> </td> + </tr> + <tr> + <td> </td> + <td><b>Questions (or definitions)</b></td> + <td><b>Answers (or terms)</b></td> + </tr> + <? for ($x=0;$x<20;++$x) { ?> + <? $qc = $t['q']->questionChoices[$x]; ?> + <tr> + <td align="right" valign="center"> + <? if ($x <= 1) {echo '*';} else { echo ' '; } ?> + <? printf('%d',$x+1);?>. + </td> + <td valign="center"> + <input name="labels[<?=$x;?>]" type="text" value="<?=$qc->label;?>" size="40" <?= $t['disableFlag'];?>> + </td> + <td> + <? $x <= 1 ? '*' : ''; ?> + <input name="correct[<?=$x?>]" value="<?=$qc->correct?>" size="20"> + </td> + </tr> + <? } ?> + + <tr> + <td colspan=3> + +<style> + + div.over { + overflow: scroll; + height: 220px; + width: 240px; + } + +</style> + <FIELDSET valign="middle" style="width: 235px; height: 245px; padding: 2px;"> + + <select name="imagesMenu" id="imagesMenu" + style="width: 235px;" + onChange="document.getElementById('previewfile').src='<?=appurl('lobrepo/exam/event=viewImage/id=');?>' + this.value;" + > + <option value="">Select Image</option> + <?php + $images_array = array(); + $images_array = $t['images']; + + foreach( $images_array as $img) + { ?> + <option value="<?=$img['lob_repo_entry_id']?>"><?=$img['lob_title']?> + </option> + <? } + ?> + </select> + + <div class="over" align="center" valign="middle"> + <table cellpadding="2" cellspacing="0" border="0" width="100%" height="100%"> + <tr> + + <td valign="middle" align="center" height="100%" width="100%"> + <img alt="" name="previewfile" id="previewfile"> + <? if( isset($t['imgId']) ){ ?> + <script language="JavaScript" type="text/javascript"> + document.getElementById('imagesMenu').value = <?=$t['imgId']?>; + document.getElementById('previewfile').src='<?=appurl('lobrepo/exam/event=viewImage/id=').$t['imgId'];?>'; + </script> + <? } ?> + + </td> + </tr> + </table> + </div> + + </FIELDSET> + </td> + </tr> + + <tr> + <td> </td> + <td> + <input type="submit" name="sbmt_button" value="<?=lct('Continue ->');?>"/> + <input type="hidden" name="event" value="saveQuestion"/> + <input type="hidden" name="qidx" value="<?=$t['qidx'];?>"/> + <input type="hidden" name="questionType" value="<?= $t['questionType'];?>"/> + </td> + </tr> + </table> +</form> + +<p>* denotes a required field.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |