You are here

function AbstractQuizQuestionResponse::toBareObject in Quiz 6.6

Same name and namespace in other branches
  1. 6.3 question_types/quiz_question/quiz_question.core.inc \AbstractQuizQuestionResponse::toBareObject()
  2. 6.5 question_types/quiz_question/quiz_question.core.inc \AbstractQuizQuestionResponse::toBareObject()

File

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

Class

AbstractQuizQuestionResponse
A base implementation of QuizQuestionResponse.

Code

function toBareObject() {
  $obj = new stdClass();
  $obj->score = $this
    ->getScore();

  // This can be 0 for unscored.
  $obj->nid = $this->question->nid;
  $obj->vid = $this->question->vid;
  $obj->rid = $this->rid;
  $obj->is_correct = $this
    ->isCorrect();
  $obj->is_evaluated = $this
    ->isEvaluated();
  $obj->is_skipped = FALSE;
  return $obj;
}