dblibraryBookObject::createBookObject($bookObjectIn)
Parameters | |
| BookObjectIn | BookObject to be stored in the book table |
Returns a bookObject with the primary key as the id and information provided by the parameter
dblibraryBookObject::updateBookObject($bookObjectIn)
Parameters | |
| BookObjectIn | BookObject to be updated in the book table |
Boolean: true if updated without errors, false if update failed
dblibraryBookObject::deleteBookObject($bookObjectIn)
Parameters | |
| BookObjectIn | BookObject to be deleted in the book table (just uses the book id) |
Boolean: true if the book object deleted, false if it failed to delete
dblibraryBookObject::getBookObject($idIn)
Parameters | |
| IdIn | P_key (id) of the book to get from the book table |
BookObject if the object is found in the database, -1 if not found
dblibraryBookObject::getBookPages($idIn)
Parameters | |
| IdIn | The id of the book |
An array of page elements in the order they would appear in the book
dblibraryBookObject::createPageObject($pageObjectIn)
Parameters | |
| PageObjectIn | PageObject to be stored in the page table |
PageObject with the primary key as the id, and other fields the same as the input object
dblibraryBookObject::updatePageObject($pageObjectIn)
Parameters | |
| PageObjectIn | PageObject to be updated in the page table |
Boolean: true if the object updated, false if there was an error during update
dblibraryBookObject::deletePageObject($pageObjectIn)
Parameters | |
| PageObjectIn | PageObject to be deleted in the page table |
Boolean: true if the object deleted, false if there was an error during the delte
dblibraryBookObject::getPageObject($idIn)
Parameters | |
| IdIn | P_key (id) of the page in the page table |
PageObject equivalent to the entry in the database, -1 if the object was not found
dblibraryBookObject::pageHasQuestion($pageIn)
Parameters | |
| PageIn | P_key (id) of page |
True if page contains a question, false otherwise
dblibraryBookObject::getQuestionObjectFromPage($-)
Parameters | |
| - | PageIn page object we want question for |
Boolean: questionObject of the question if found, else -1
dblibraryBookObject::createQuestionObject($questionObjectIn)
Parameters | |
| QuestionObjectIn | QuestionObject to be created in the database |
dblibraryBookObject::updateQuestionObject($questionObjectIn)
Parameters | |
| QuestionObjectIn | QuestionObject to be updated in the question table |
Boolean: returns true if updated, false if not
dblibraryBookObject::deleteQuestionObject($questionObjectIn)
Parameters | |
| QuestionObjectIn | QuestionObject to be deleted from the question table |
Boolean: returns true if deleted, false if not
dblibraryBookObject::getQuestionObject($idIn)
Parameters | |
| IdIn | P_key (id) of the question in the question table |
Returns a questionObject equivalent to the entry in the database, -1 if not found
dblibraryBookObject::createAnswerObject($answerObjectIn)
Parameters | |
| AnswerObjectIn | AnswerObject to be stored in the question_answer table |
Returns an answerObject equivalent to the entry added to the database
dblibraryBookObject::updateAnswerObject($answerObjectIn)
Parameters | |
| AnswerObjectIn | AnswerObject to be updated in the question_answer table |
Boolean: returns true if updated, false if not
dblibraryBookObject::deleteAnswerObject($answerObjectIn)
Parameters | |
| AnswerObjectIn | AnswerObject to be deleted from the question_answer table |
Boolean: returns true if deleted, false if not
dblibraryBookObject::getAnswerObject($idIn)
Parameters | |
| IdIn | P_key (id) of the entry in the question_answer table to get |
Returns an answerObject if found, or -1 if not
dblibraryBookObject::getAllAnswers($idIn)
Parameters | |
| IdIn | P_key (id) of question we need answers for |
Returns an array of answerObjects
Returns an array of books contained within specified unit -- if $activeOnly == true, returnsonly that unit's active books.
dblibraryBookObject::getUnitBooks($idIn, $activeOnly)
Parameters | |
| IdIn | P_key (id) of unit we need books for |
| ActiveOnly | Bool (0 or 1) to indicate if want only active books (1) or all books (0) |
Returns an array of bookObjects
Sets a book to be active within its unit.
dblibraryBookObject::setActive($uid, $bookids)
Parameters | |
| Uid | P_key of unit |
| Bookids | Array of bookids to be set to active |
Returns an array of unitObjects containing less than eight books -- this should be a legacyfunction and should not be used.
dblibraryBookObject::getOpenUnits()
Parameters | |
| None |
Returns an array containing unitObjects for all open units (<8 books)
Returns an array of unitObjects containing units that currently have 8 active books.
dblibraryBookObject::getClosedUnits()
Parameters | |
| None |
Returns an array containing unitObjects for all closed units (==8 books)
Returns an array of unitObjects for all units in the database.
dblibraryBookObject::getAllUnits()
Parameters | |
| None |
Returns an array containing unitObjects for all units
Creates a unit in the database.
dblibraryBookObject::createUnitObject($-)
Parameters | |
| - | UnitObjectIn unit object to be stored in the unit table |
Returns book object with id filled in
Updates unit in the database that has unitObjectIn's p_key.
dblibraryBookObject::updateUnitObject($unitObjectIn)($-)
Parameters | |
| - | UnitObjectIn unit object with updated information |
Returns true if update successful, false otherwise
Retrieves unit object with idIn as its p_key from the database.
dblibraryBookObject::getUnitObject($idIn)
Parameters | |
| IdIn | P_key (id) of unit we need object for |
Returns a unit object for the specified p_key, -1 if not found
Deletes unit object with p_key = idIn from db.
dblibraryBookObject::deleteUnitObject($idIn)
Parameters | |
| IdIn | P_key (id) of unit to be deleted |
Returns true if succesfully deleted, false otherwise
Gets SuperUnitObject with p_key=idIn from db.
dblibraryBookObject::getSuperUnitObject($idIn)
Parameters | |
| IdIn | P_key (id) of superunit we need for |
Returns superUnitObject of entry if found, -1 otherwise
Retrieves an array of all superunits from the db.
dblibraryBookObject::getAllSuperUnits()
Parameters | |
| None |
Returns an array of all super units in superUnitObjects
Creates an entry in 'student_activity' table recording student_id, book_id and time read-- called from typeSelect.php when reading (not when previewing).
dblibraryBookObject::reportActivity($bookIDIn, $studentIDIn)
Parameters | |
| BookIDIn | P_key (id) of book being accessed |
| StudentIDIn | P_key (id) of student accessing the book |
Returns id of row created by insertion