Class for enhanced mode answerblocks. More...
Public Member Functions | |
EnhancedAnswerblock ($question_id=-1) | |
EnhancedAnswerblock constructor. | |
setId ($id=-1) | |
Sets the database id of the answerblock. | |
getId () | |
Gets the database id of the answerblock. | |
setQuestionId ($id=-1) | |
Sets the question id of the answerblock. | |
getQuestionId () | |
Gets the question id of the answerblock. | |
setAnswerblockIndex ($answerblock_index=-1) | |
Sets the answerblock index of the answerblock. | |
getAnswerblockIndex () | |
Gets the answerblock index of the answerblock. | |
setPoints ($points=0) | |
Sets the points of the answerblock. | |
getPoints () | |
Gets the points of the answerblock. | |
setSubquestionIndex ($subquestion_index=0) | |
Sets the subquestion index. | |
getSubquestionIndex () | |
Gets the subquestion index. | |
setFeedback ($feedback=0) | |
Sets the feedback of the answerblock. | |
getFeedback () | |
Gets the feedback of the answerblock. | |
addConnection ($answer_id, $order, $boolean_prefix) | |
Adds a new connection to the answerblock. | |
getConnection ($order) | |
Gets an answerblock answer of a given position. | |
flushConnections () | |
Deletes all existing answerblock answers. | |
Data Fields | |
$id | |
$answerblock_index | |
$question_id | |
$points | |
$feedback | |
$connections | |
$subquestion_index |
Class for enhanced mode answerblocks.
EnhancedAnswerblock is a class encapsulating answerblocks in enhanced question mode
class.assEnhancedAnswerblock.php Assessment
Definition at line 34 of file class.assEnhancedAnswerblock.php.
EnhancedAnswerblock::addConnection | ( | $ | answer_id, | |
$ | order, | |||
$ | boolean_prefix | |||
) |
Adds a new connection to the answerblock.
Adds a new connection to the answerblock
public
Definition at line 301 of file class.assEnhancedAnswerblock.php.
{ $connection = new AnswerblockAnswer(); $connection->setAnswerId($answer_id); $connection->setOrder($order); $connection->setBooleanPrefix($boolean_prefix); $this->connections[$order] = $connection; }
EnhancedAnswerblock::EnhancedAnswerblock | ( | $ | question_id = -1 |
) |
EnhancedAnswerblock constructor.
The constructor takes possible arguments an creates an instance of the EnhancedAnswerblock object.
integer | $question_id The id of the question containing the answerblock public |
Definition at line 106 of file class.assEnhancedAnswerblock.php.
References $question_id.
{ $this->question_id = $question_id; $this->subquestion_index = 0; $this->connections = array(); $this->feedback = ""; $this->points = 0; $this->answerblock_index = 0; }
EnhancedAnswerblock::flushConnections | ( | ) |
Deletes all existing answerblock answers.
Deletes all existing answerblock answers
public
Definition at line 332 of file class.assEnhancedAnswerblock.php.
{ $this->connections = array(); }
EnhancedAnswerblock::getAnswerblockIndex | ( | ) |
Gets the answerblock index of the answerblock.
Gets the answerblock index of the answerblock
Definition at line 201 of file class.assEnhancedAnswerblock.php.
{
return $this->answerblock_index;
}
EnhancedAnswerblock::getConnection | ( | $ | order | ) |
Gets an answerblock answer of a given position.
Gets an answerblock answer of a given position
integer | $order Order of the answerblock answer |
Definition at line 319 of file class.assEnhancedAnswerblock.php.
{
return $this->connections[$order];
}
EnhancedAnswerblock::getFeedback | ( | ) |
Gets the feedback of the answerblock.
Gets the feedback of the answerblock
Definition at line 288 of file class.assEnhancedAnswerblock.php.
{
return $this->feedback;
}
EnhancedAnswerblock::getId | ( | ) |
Gets the database id of the answerblock.
Gets the database id of the answerblock
Definition at line 143 of file class.assEnhancedAnswerblock.php.
{
return $this->id;
}
EnhancedAnswerblock::getPoints | ( | ) |
Gets the points of the answerblock.
Gets the points of the answerblock
Definition at line 230 of file class.assEnhancedAnswerblock.php.
{
return $this->points;
}
EnhancedAnswerblock::getQuestionId | ( | ) |
Gets the question id of the answerblock.
Gets the question id of the answerblock
Definition at line 172 of file class.assEnhancedAnswerblock.php.
{
return $this->question_id;
}
EnhancedAnswerblock::getSubquestionIndex | ( | ) |
Gets the subquestion index.
Gets the subquestion index
Definition at line 259 of file class.assEnhancedAnswerblock.php.
{
return $this->subquestion_index;
}
EnhancedAnswerblock::setAnswerblockIndex | ( | $ | answerblock_index = -1 |
) |
Sets the answerblock index of the answerblock.
Sets the answerblock index of the answerblock
integer | $answerblock_index answerblock index public |
Definition at line 186 of file class.assEnhancedAnswerblock.php.
References $answerblock_index.
{ $this->answerblock_index = $answerblock_index; }
EnhancedAnswerblock::setFeedback | ( | $ | feedback = 0 |
) |
Sets the feedback of the answerblock.
Sets the feedback of the answerblock
integer | $feedback feedback public |
Definition at line 273 of file class.assEnhancedAnswerblock.php.
References $feedback.
{ $this->feedback = $feedback; }
EnhancedAnswerblock::setId | ( | $ | id = -1 |
) |
Sets the database id of the answerblock.
Sets the database id of the answerblock
integer | $id database id public |
Definition at line 128 of file class.assEnhancedAnswerblock.php.
References $id.
{ $this->id = $id; }
EnhancedAnswerblock::setPoints | ( | $ | points = 0 |
) |
Sets the points of the answerblock.
Sets the points of the answerblock
integer | $point points public |
Definition at line 215 of file class.assEnhancedAnswerblock.php.
References $points.
{ $this->points = $points; }
EnhancedAnswerblock::setQuestionId | ( | $ | id = -1 |
) |
Sets the question id of the answerblock.
Sets the question id of the answerblock
integer | $question_id question id public |
Definition at line 157 of file class.assEnhancedAnswerblock.php.
References $question_id.
{ $this->question_id = $question_id; }
EnhancedAnswerblock::setSubquestionIndex | ( | $ | subquestion_index = 0 |
) |
Sets the subquestion index.
Sets the subquestion index
integer | $subquestion_index subquestion index public |
Definition at line 244 of file class.assEnhancedAnswerblock.php.
References $subquestion_index.
{ $this->subquestion_index = $subquestion_index; }
EnhancedAnswerblock::$answerblock_index |
Definition at line 51 of file class.assEnhancedAnswerblock.php.
Referenced by setAnswerblockIndex().
EnhancedAnswerblock::$connections |
Definition at line 87 of file class.assEnhancedAnswerblock.php.
EnhancedAnswerblock::$feedback |
Definition at line 78 of file class.assEnhancedAnswerblock.php.
Referenced by setFeedback().
EnhancedAnswerblock::$id |
Definition at line 42 of file class.assEnhancedAnswerblock.php.
Referenced by setId().
EnhancedAnswerblock::$points |
Definition at line 69 of file class.assEnhancedAnswerblock.php.
Referenced by setPoints().
EnhancedAnswerblock::$question_id |
Definition at line 60 of file class.assEnhancedAnswerblock.php.
Referenced by EnhancedAnswerblock(), and setQuestionId().
EnhancedAnswerblock::$subquestion_index |
Definition at line 96 of file class.assEnhancedAnswerblock.php.
Referenced by setSubquestionIndex().