static integer getNextQuestionNumber(
integer
$learningId
)
|
|
Returns the question number that should be used for a new question for the given learning.
i.e. If there are five question, getNextQuestionNumber() will return an integer 6.
Parameters:
integer |
$learningId: |
Learning Id |
API Tags:
Return: | Question Number |
Access: | public |
KuoteObjects_Question __construct(
)
|
|
Constructor instantiates $enrollment as a DataObjects_Enrollment object.
API Tags:
Information Tags:
Removes the object from the datastore based on it's Id
API Tags:
Return: | True on success, false otherwise. |
Access: | public |
boolean get(
integer
$id
)
|
|
Loads the object from the data store by its unique identifier.
Parameters:
integer |
$id: |
Unique identifier of a course in the data store. |
API Tags:
Return: | True on success, false otherwise. |
Access: | public |
Returns the option number of the correct question option.
API Tags:
Return: | Option number. |
Access: | public |
Returns the "question" for this question.
API Tags:
Return: | Question Body. |
Access: | public |
Returns the difficulty of the question. 1 is easiest, 5 is hardest.
API Tags:
Return: | Question Difficulty |
Access: | public |
Returns the unique id of the object
API Tags:
Return: | The objects's unique id |
Access: | public |
Returns the Id of the learning under which this question exists.
API Tags:
Return: | Learning Id |
Access: | public |
string getOption(
integer
$optionNumber
)
|
|
Returns the "answer" for the given Option Number
Parameters:
integer |
$optionNumber: |
The number of the option to return, 1 through 5 are valid. |
API Tags:
Return: | The "answer" for the given Option Number. |
Access: | public |
Information Tags:
Throws: | Exception 1 if $optionNumber is out of bounds. |
Returns the text of the questions first option.
API Tags:
Return: | Question Option |
Access: | public |
Returns the text of the questions second option.
API Tags:
Return: | Question Option |
Access: | public |
Returns the text of the questions third option.
API Tags:
Return: | Question Option |
Access: | public |
Returns the text of the questions fourth option.
API Tags:
Return: | Question Option |
Access: | public |
Returns the text of the questions fifth option.
API Tags:
Return: | Question Option |
Access: | public |
integer getQuestionNumber(
)
|
|
Returns the order number of the question. First question is 1, second question is 2, etc.
API Tags:
Return: | Question Number |
Access: | public |
Returns the amount of time given in seconds to answer this question. 0 is unlimited.
API Tags:
Return: | Time in seconds. |
Access: | public |
Takes the currently set properties of the object and inserts them into the data store as a new instance with its own unique id.
API Tags:
Return: | True on success, false otherwise. |
Access: | public |
boolean setAnswer(
integer
$answer
)
|
|
Sets the option number of the correct question option.
Parameters:
integer |
$answer: |
Correct Option Number |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setBody(
string
$body
)
|
|
Sets the "question" for this question.
Parameters:
string |
$body: |
Question Body. |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setDifficulty(
$difficulty, integer
$difficutly
)
|
|
Sets the difficulty of the question. 1 is easiest, 5 is hardest.
Parameters:
integer |
$difficutly: |
Question Difficutly |
|
$difficulty: |
|
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setLearningId(
integer
$id
)
|
|
Sets the Id of the learning under which this question exists.
Parameters:
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setOption(
integer
$optionNumber, string
$string
)
|
|
Sets the "answer" for the given option number to the given string.
Parameters:
integer |
$optionNumber: |
The number of the option to set, 1 through 5 are valid. |
string |
$string: |
The string which is to be the "answer". |
API Tags:
Return: | True on success, false otherwise. |
Access: | public |
Information Tags:
Throws: | Exception 1 if optionNumber is out of bounds. |
boolean setOption1(
string
$string
)
|
|
Sets the text of the questions first option.
Parameters:
string |
$string: |
Question Option |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setOption2(
string
$string
)
|
|
Sets the text of the questions second option.
Parameters:
string |
$string: |
Question Option |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setOption3(
string
$string
)
|
|
Sets the text of the questions third option.
Parameters:
string |
$string: |
Question Option |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setOption4(
string
$string
)
|
|
Sets the text of the questions forth option.
Parameters:
string |
$string: |
Question Option |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setOption5(
string
$string
)
|
|
Sets the text of the questions fifth option.
Parameters:
string |
$string: |
Question Option |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setQuestionNumber(
$number, integer
$id
)
|
|
Sets the order number of the question. First question is 1, second question is 2, etc.
Parameters:
integer |
$id: |
Learning Id |
|
$number: |
|
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
boolean setTime(
integer
$time
)
|
|
Sets the amount of time given in seconds to answer this question. 0 is unlimited.
Parameters:
integer |
$time: |
Time in seconds. |
API Tags:
Return: | True on successful set, false otherwise. |
Access: | public |
Updates the datastore to reflect the currently set properties of the object.
Updates by the current Id.
API Tags:
Return: | True on success, false otherwise. |
Access: | public |