File: objects/bookObject.php

Return to Documentation

Class: superUnitObject
superUnitObject (2)
get_id (3)
set_id (4)
get_title (5)
set_title (6)

Class: unitObject
unitObject (7)
get_id (8)
set_id (9)
get_title (10)
set_title (11)
get_header_image (12)
set_header_image (13)
get_superunit_id (14)
set_superunit_id (15)

Class: bookObject
bookObject (16)
get_id (17)
set_id (18)
get_title (19)
set_title (20)
get_difficulty (21)
set_difficulty (22)
get_created (23)
get_created_formatted (24)
set_created (25)
get_cover_image (26)
set_cover_image (27)
set_status (28)
get_status (29)
set_active (30)
get_active (31)
set_unit_id (32)
get_unit_id (33)
get_unit_title (34)

Class: pageObject
pageObject (35)
get_id (36)
set_id (37)
get_image_right (38)
set_image_right (39)
get_sentence_top (40)
set_sentence_top (41)
get_blackboard_text (42)
set_blackboard_text (43)
get_blackboard_reread (44)
set_blackboard_reread (45)
get_type (46)
set_type (47)
get_f_key_book (48)
set_f_key_book (49)
get_f_key_prevpage (50)
set_f_key_prevpage (51)

Class: questionObject
questionObject (52)
get_id (53)
set_id (54)
get_f_key_page (55)
set_f_key_page (56)
get_question_content (57)
set_question_content (58)

Class: answerObject
answerObject (59)
get_id (60)
set_id (61)
get_answer_content (62)
set_answer_content (63)
get_blackboard_content (64)
set_blackboard_content (65)
get_f_key_question (66)
set_f_key_question (67)

superUnitObject

Author: David
Version: 04.21.05

Example

superUnitObject::superUnitObject($id, $title)

Parameters

IdId the uniquely identifies this superunit in the database
TitleTitle of this superunit

Top

get_id

Author: David
Version: 04.25.05

Description

Get the unique id for this superunit (this is the id that acts as the primary key forsuperunits in the database).

Example

superUnitObject::get_id()

Parameters

None

Returns

Returns an integer which is the unique id of this superunit


Top

set_id

Author: David
Version: 04.25.05

Description

Set the unique id for this superunit (which will be used as the primary key to identifythis superunit in the database.

Example

superUnitObject::set_id($valIn)

Parameters

ValInInteger representing the id of this superunit

Top

get_title

Author: David
Version: 04.25.05

Description

Return the title of this superunit.

Example

superUnitObject::get_title()

Parameters

None

Returns

Returns string containing the title of this superunit


Top

set_title

Author: David
Version: 04.26.05

Description

Sets the title of this superunit.

Example

superUnitObject::set_title($valIn)

Parameters

ValInString containing the title of this superunit

Top

unitObject

Author: David
Version: 04.20.05

Example

unitObject::unitObject($id, $title, $header_image, $superunit_id)

Parameters

IdId of the unit (which is the primary key for unit in the database)
TitleTitle of the unit
Header_imageImage that is shown at the top of the unit page
Superunit_idThe superunit this unit belongs to

Top

get_id

Author: David
Version: 04.25.05

Description

Returns the id of the unit.

Example

unitObject::get_id()

Parameters

None

Returns

Integer which represents unit id


Top

set_id

Author: David
Version: 04.25.05

Description

This sets the id of the unit (which is the primary key for this unit in the database).

Example

unitObject::set_id($valIn)

Parameters

ValInInteger which represents unit id

Top

get_title

Author: David
Version: 04.25.05

Description

Returns the title of the unit.

Example

unitObject::get_title()

Parameters

None

Returns

String which represents the title of the unit


Top

set_title

Author: David
Version: 04.25.05

Description

Sets the title of the unit.

Example

unitObject::set_title($valIn)

Parameters

ValInString which represents the title of the unit

Top

get_header_image

Author: David
Version: 04.25.05

Description

Returns name of the image file which is displayed at the top of this unit.

Example

unitObject::get_header_image()

Parameters

None

Returns

Returns string which contains file name of the image displayed for this unit


Top

set_header_image

Author: David
Version: 04.25.05

Description

Sets name of the image file which is displayed at the top of this unit.

Example

unitObject::set_header_image($valIn)

Parameters

ValInFile name of image to be shown at the top of this unit

Top

get_superunit_id

Author: David
Version: 04.25.05

Description

Returns integer containing id of the superunit this unit belongs to.

Example

unitObject::get_superunit_id()

Parameters

None

Returns

Returns integer of id for superunit this unit belongs to


Top

set_superunit_id

Author: David
Version: 04.25.05

Description

Sets the id of the superunit this unit belongs to.

Example

unitObject::set_superunit_id($valIn)

Parameters

ValInReturns integer of id for superunit this unit belongs to

Top

bookObject

Author: Brad
Version: 04.20.05

Example

bookObject::bookObject($id, $title, $difficulty, $created, $cover_image, $status, $active, $unit_id)

Parameters

IdId of the book (i.e., primary key for the book in the database)
TitleTitle of the book
DifficultyInteger value indicating difficulty of book
CreatedInteger indicitive of time/date book was created in the format of a unix timestamp
Cover_imageFile name for image shown on book cover
StatusApproval status, such as "approved", "rejected", or "pending"
Active"y" or "n" indicating if the book is active or not
Unit_idInteger containing unit id of the unit this book belongs to

Top

get_id

Author: Brad
Version: 04.25.05

Description

Returns id of the book (which is the primary key of the book in the database).

Example

bookObject::get_id()

Parameters

None

Returns

Returns integer with the id of the book


Top

set_id

Author: Brad
Version: 04.25.05

Description

Sets the id of the book (which is the primary key of the book in the database).

Example

bookObject::set_id($valIn)

Parameters

ValInInteger value to set the id of the book

Top

get_title

Author: Brad
Version: 04.25.05

Description

Returns the title of the book.

Example

bookObject::get_title()

Parameters

None

Returns

Returns string for the title of the book


Top

set_title

Author: Brad
Version: 04.25.05

Description

Sets the title of the book.

Example

bookObject::set_title($valIn)

Parameters

ValInString which contains the title of the book

Top

get_difficulty

Author: Brad
Version: 04.25.05

Description

Returns the difficult of the book.

Example

bookObject::get_difficulty()

Parameters

None

Returns

Returns integer which indicates the difficulty of the book


Top

set_difficulty

Author: Brad
Version: 04.25.05

Description

Sets the difficulty of the book.

Example

bookObject::set_difficulty($valIn)

Parameters

ValInPostive integer (99 or less) which indicates the difficulty of the book

Top

get_created

Author: Brad
Version: 04.25.05

Description

Returns time/date the book was created.

Example

bookObject::get_created()

Parameters

None

Returns

Integer which has the unix timestamp of the book


Top

get_created_formatted

Author: Brad
Version: 04.25.05

Description

Returns the date the book was created formatted as a human-readable date.

Example

bookObject::get_created_formatted()

Parameters

None

Top

set_created

Author: Brad
Version: 04.25.05

Description

Sets the time/date this book was created.

Example

bookObject::set_created($valIn)

Parameters

ValInInteger (unix timestamp) indicating when book was created.

Top

get_cover_image

Author: Brad
Version: 04.25.05

Description

Returns the image file name of the cover image of this book.

Example

bookObject::get_cover_image()

Parameters

None

Returns

String for the file name of the cover image of this book


Top

set_cover_image

Author: Brad
Version: 04.25.05

Description

Sets the image file name of the book.

Example

bookObject::set_cover_image($valIn)

Parameters

ValInString for the file name of the cover image of this book

Top

set_status

Author: Brad
Version: 04.25.05

Description

Set the status of this book, such as "pending", "approved", or "rejected".

Example

bookObject::set_status($statusIn)

Parameters

StatusInString for the status of this book, such as "pending", "approved", or "rejected"

Top

get_status

Author: Brad
Version: 04.25.05

Description

Returns the status of this book.

Example

bookObject::get_status()

Parameters

None

Returns

Returns the status of this book, such as "pending", "approved", or "rejected"


Top

set_active

Author: Brad
Version: 04.25.05

Description

Set whether the book is active in this unit or not.

Example

bookObject::set_active($valIn)

Parameters

ValInEither "y" or "n" which indicates if book is active or not

Top

get_active

Author: Brad
Version: 04.25.05

Description

Returns if book is active or not.

Example

bookObject::get_active()

Parameters

None

Returns

Either "y" or "n" which indicates if book is active or not


Top

set_unit_id

Author: Brad
Version: 04.25.05

Description

Unit id of the unit this book belongs to.

Example

bookObject::set_unit_id($unit_idIn)

Parameters

Unit_idInInteger indicating id of unit to which this book belongs

Top

get_unit_id

Author: Brad
Version: 04.25.05

Description

Returns id (p_key) of this unit.

Example

bookObject::get_unit_id()

Parameters

None

Top

get_unit_title

Author: Brad
Version: 04.25.05

Description

Returns title of the unit this book belongs to.

Example

bookObject::get_unit_title()

Parameters

None

Returns

String for the title of the unit this book belongs to


Top

pageObject

Author: Brad
Version: 03.23.05

Example

pageObject::pageObject($id, $image_right, $sentence_top, $blackboard_text, $blackboard_reread, $type, $f_key_book, $f_key_prevpage)

Parameters

IdId of the page
Image_rightFilename of image shown on the right side of the page
Sentence_topSentence shown at the top of the page
Blackboard_textText shown on the blackboard when reading in "let's read this book for
Blackboard_rereadText shown on the blackboard when reading in "let's reread this book".
Type"old" or "new" page. Should always be "new" unless this page was migrated
F_key_bookId of the book this page belongs to
F_key_prevpageId of the page before this. -1 if this is the first page

Top

get_id

Author: Brad
Version: 04.25.05

Description

Returns id of the page (which is the primary key for the page in the database).

Example

pageObject::get_id()

Parameters

None

Returns

Integer with the id of the page


Top

set_id

Author: Brad
Version: 04.25.05

Description

Sets the id of the page (which is the primary key for the page in the database).

Example

pageObject::set_id($valIn)

Parameters

ValInInteger with the id of the page

Top

get_image_right

Author: Brad
Version: 04.25.05

Description

Returns the filename of the image on the top right of the page (this is the main image shown on the page).

Example

pageObject::get_image_right()

Parameters

None

Returns

String for the filename of the image


Top

set_image_right

Author: Brad
Version: 04.25.05

Description

Sets the filename of the image on the top right of the page (this is the main image shown on the page).

Example

pageObject::set_image_right($valIn)

Parameters

ValInString for the file name of the image

Top

get_sentence_top

Author: Brad
Version: 04.25.05

Description

Returns the sentence shown on the page.

Example

pageObject::get_sentence_top()

Parameters

None

Returns

String for the setence shown at the top of the page


Top

set_sentence_top

Author: Brad
Version: 04.25.05

Description

Sets the sentence shown on this page.

Example

pageObject::set_sentence_top($valIn)

Parameters

ValInString for the sentence shown at the top of the page

Top

get_blackboard_text

Author: Brad
Version: 04.25.05

Description

Returns the text shown on the blackboard. in some cases, this may not be text, but the file nameof an image -- an image file name is only shown on old pages (i.e., pages of type "old").

Example

pageObject::get_blackboard_text()

Parameters

None

Returns

String for the text on the blackboard (except on "old" pages, where the string is actually


Top

set_blackboard_text

Author: Brad
Version: 04.25.05

Description

Sets the text shown on the blackboard. in some cases, this may not be text, but the file nameof an image -- an image file name is only shown on old pages (i.e., pages of type "old").

Example

pageObject::set_blackboard_text()

Parameters

None

Returns

String for the text on the blackboard (except on "old" pages, where the string is actually


Top

get_blackboard_reread

Author: Brad
Version: 04.25.05

Description

Same function as "get_blackboard_text" except this is for the blackboard shown when you go to"let's reread this book together".

Example

pageObject::get_blackboard_reread()

Parameters

None

Returns

String for the text on the blackboard (except on "old" pages, where the string is actually a file name)


Top

set_blackboard_reread

Author: Brad
Version: 04.25.05

Description

Same function as "set_blackboard_text" except this is for the blackboard shown when you go toi"let's reread this book together".

Example

pageObject::set_blackboard_reread($valIn)

Parameters

ValInString for the text on the blackbaord (except on "old" pages, where the string is atually a filae name)

Top

get_type

Author: Brad
Version: 04.25.05

Description

Gets the type of page this is, either "old" or "new". Old pages should no longer be created, theythey were only used when migrating old content to this new site because blackboard text could not be parsed and an image had to be used instead.

Example

pageObject::get_type()

Parameters

None

Returns

Type of page this is, either "old" or "new"


Top

set_type

Author: Brad
Version: 04.25.05

Description

Sets the type of page this is, either "old" or "new". Old pages should no longer be created, theythey were only used when migrating old content to this new site because blackboard text could not be parsed and an image had to be used instead.

Example

pageObject::set_type($valIn)

Parameters

ValInType of page this is, either "old" or "new"

Top

get_f_key_book

Author: Brad
Version: 04.25.05

Description

Gets the id of the book this page belongs to.

Example

pageObject::get_f_key_book()

Parameters

None

Returns

Integer for the id of the book this page belongs to


Top

set_f_key_book

Author: Brad
Version: 04.25.05

Description

Set the id of the book this page belongs to.

Example

pageObject::set_f_key_book($valIn)

Parameters

ValInInteger for the id of the book this page belongs to

Top

get_f_key_prevpage

Author: Brad
Version: 04.25.05

Description

Return the page id of the previous page, or -1 if this is the first page.

Example

pageObject::get_f_key_prevpage()

Parameters

None

Returns

Integer for the id of the previous page or -1 if this is the first page


Top

set_f_key_prevpage

Author: Brad
Version: 04.25.05

Description

Set the the page id of the previous page. set this to -1 if this is the first page.

Example

pageObject::set_f_key_prevpage($valIn)

Parameters

ValInInteger for the id of the previous page or -1 if this is the first page

Top

questionObject

Author: Brad
Version: 03.23.05

Example

questionObject::questionObject($id, $f_key_page, $question_content)

Parameters

IdId of this question (primary key of the question in the database)
F_key_pageId of the page this question is on
Question_contentString for the actual question

Top

get_id

Author: Brad
Version: 04.25.05

Description

Returns the id of this question.

Example

questionObject::get_id()

Parameters

None

Returns

Integer for the id of this question


Top

set_id

Author: Brad
Version: 04.25.05

Description

Sets the id of this question.

Example

questionObject::set_id($valIn)

Parameters

ValInInteger for the id of this question

Top

get_f_key_page

Author: Brad
Version: 04.25.05

Description

Returns the id of the page this question belongs to.

Example

questionObject::get_f_key_page()

Parameters

None

Returns

Integer for the id of the page this question belongs to


Top

set_f_key_page

Author: Brad
Version: 04.25.05

Description

Sets the id of the page this question belongs to.

Example

questionObject::set_f_key_page($valIn)

Parameters

ValInInteger for the id of the page this question belongs to

Top

get_question_content

Author: Brad
Version: 04.25.05

Description

Returns the question.

Example

questionObject::get_question_content()

Parameters

None

Returns

String for the question itself


Top

set_question_content

Author: Brad
Version: 04.25.05

Description

Sets the question.

Example

questionObject::set_question_content($valIn)

Parameters

ValInString for the question itself

Top

answerObject

Author: Brad
Version: 03.23.05

Example

answerObject::answerObject($id, $answer_content, $blackboard_content, $f_key_question)

Parameters

IdId for the answer
Answer_contentThe answer itself
Blackboard_contentWhat should be displayed on the blackboard when this answer is selected
F_key_questionThe id of the question this answer belongs to

Top

get_id

Author: Brad
Version: 04.25.05

Description

Return the unique id which identifies this answer.

Example

answerObject::get_id()

Parameters

None

Returns

Unique id for this answer


Top

set_id

Author: Brad
Version: 04.25.05

Description

Sets the id to uniquely identify this answer.

Example

answerObject::set_id($valIn)

Parameters

ValInThe value for the id of this answer. remember this is what

Top

get_answer_content

Author: Brad
Version: 04.25.05

Description

Returns the answer.

Example

answerObject::get_answer_content()

Parameters

None

Returns

String containing answer to question


Top

set_answer_content

Author: Brad
Version: 04.25.05

Description

Sets the answer to the question.

Example

answerObject::set_answer_content($valIn)

Parameters

ValInString (of maximum length = 50) containing the answer

Top

get_blackboard_content

Author: Brad
Version: 04.25.05

Description

Return the text set for the blackbaord on this answer. in other words, whatthe blackboard should say when the student selects this answer.

Example

answerObject::get_blackboard_content()

Parameters

None

Returns

Returns the string for the blackboard text on this page


Top

set_blackboard_content

Author: Brad
Version: 04.25.05

Description

Sets the text on the blackboard for this answer. in other words, whatthe blackboard should say when the student selects this answer.

Example

answerObject::set_blackboard_content($valIn)

Parameters

ValInString containing text for blackboard

Top

get_f_key_question

Author: Brad
Version: 04.25.05

Description

Returns the question number that belongs to this answer.

Example

answerObject::get_f_key_question()

Parameters

None

Returns

Integer value for the question's key in the database


Top

set_f_key_question

Author: Brad
Version: 04.25.05

Description

Sets which question belongs to this answer (the id of the questionstored in the database).

Example

answerObject::set_f_key_question($valIn)

Parameters

ValInInteger value for the question's key in the database

Top