class QuizQuestionH5P in Quiz 7.4
Hierarchy
- class \QuizQuestion
- class \QuizQuestionH5P
Expanded class hierarchy of QuizQuestionH5P
1 string reference to 'QuizQuestionH5P'
- quiz_h5p_quiz_question_info in question_types/
quiz_h5p/ quiz_h5p.module - Implements hook_quiz_question_info().
File
- question_types/
quiz_h5p/ QuizQuestionH5P.class.inc, line 2
View source
class QuizQuestionH5P extends QuizQuestion {
public function getCreationForm(array &$form_state = NULL) {
return array();
}
public function getMaximumScore() {
return variable_get('h5p_quiz_question_max_score', 10);
}
public function saveNodeProperties($is_new = FALSE) {
}
public function validateNode(array &$form) {
}
public function getAnsweringForm(array $form_state = NULL, $result_id) {
drupal_add_js(drupal_get_path('module', 'quiz_h5p') . '/quiz_h5p.js');
return array(
'tries' => array(
'#type' => 'hidden',
'#default_value' => 1,
'#attributes' => array(
'id' => 'quiz-h5p-result-key',
),
),
);
}
public function getNodeForm(array &$form_state = NULL) {
$form = parent::getNodeForm($form_state);
unset($form['title']);
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QuizQuestion:: |
public | property | The current node for this question. | |
QuizQuestion:: |
public | property | ||
QuizQuestion:: |
protected | function | This may be overridden in subclasses. If it returns true, it means the max_score is updated for all occurrences of this question in quizzes. | 1 |
QuizQuestion:: |
public | function | Delete question data from the database. | 7 |
QuizQuestion:: |
public | function | Allow question types to override the body field title | 3 |
QuizQuestion:: |
protected | function | Utility function that returns the format of the node body | |
QuizQuestion:: |
public | function | Getter function returning properties to be loaded when the node is loaded. | 7 |
QuizQuestion:: |
public | function | Retrieve information relevant for viewing the node. | 6 |
QuizQuestion:: |
public | function | Finds out if a question has been answered or not | |
QuizQuestion:: |
public | function | Responsible for handling insert/update of question-specific data. This is typically called from within the Node API, so there is no need to save the node. | |
QuizQuestion:: |
function | Handle the add to quiz part of the quiz_question_form | ||
QuizQuestion:: |
public | function | Determines if the user can view the correct answers | |
QuizQuestion:: |
public | function | QuizQuestion constructor stores the node object. | 2 |
QuizQuestionH5P:: |
public | function |
Get the form through which the user will answer the question. Overrides QuizQuestion:: |
|
QuizQuestionH5P:: |
public | function |
Get the form used to create a new question. Overrides QuizQuestion:: |
|
QuizQuestionH5P:: |
public | function |
Get the maximum possible score for this question. Overrides QuizQuestion:: |
|
QuizQuestionH5P:: |
public | function |
Returns a node form to quiz_question_form Overrides QuizQuestion:: |
|
QuizQuestionH5P:: |
public | function |
Save question type specific node properties Overrides QuizQuestion:: |
|
QuizQuestionH5P:: |
public | function |
Provides validation for question before it is created. Overrides QuizQuestion:: |