You are here

public function QuizQuestion::save in Quiz 6.3

Same name and namespace in other branches
  1. 6.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()
  2. 6.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()
  3. 6.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()
  4. 7.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()
  5. 7 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()
  6. 7.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()
  7. 7.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::save()

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. This function is only responsible for saving data specific to the implement ation.

The $is_new flag is set to TRUE whenever the node is being initially created.

A save function is required to handle the following three situations:

  • A new node is created ($is_new is TRUE)
  • A new node *revision* is created ($is_new is NOT set, because the node itself is not new).
  • An existing node revision is modified.

Parameters

$is_new: TRUE when the node is initially created.

5 methods override QuizQuestion::save()
LongAnswerQuestion::save in question_types/long_answer/long_answer.classes.inc
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. This function is only responsible for saving data specific to the implement ation.
MatchingQuestion::save in question_types/matching/matching.classes.inc
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. This function is only responsible for saving data specific to the implement ation.
QuizDirectionsQuestion::save in question_types/quiz_directions/quiz_directions.classes.inc
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. This function is only responsible for saving data specific to the implement ation.
ShortAnswerQuestion::save in question_types/short_answer/short_answer.classes.inc
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. This function is only responsible for saving data specific to the implement ation.
TrueFalseQuestion::save in question_types/quiz_question/quiz_question.truefalse.inc
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. This function is only responsible for saving data specific to the implement ation.

File

question_types/quiz_question/quiz_question.core.inc, line 60
Classes used in the Quiz Question module.

Class

QuizQuestion
A Quiz Question. There should be an implementation of this interface for every question type support by Quiz.

Code

public function save($is_new = FALSE);