You are here

public function QuizQuestionH5PResponse::save in Quiz 7.4

Save current score and xAPI response in db.

Overrides QuizQuestionResponse::save

File

question_types/quiz_h5p/QuizQuestionH5PResponse.class.inc, line 24

Class

QuizQuestionH5PResponse

Code

public function save() {
  global $user;

  // Decode xAPI answer data
  $data = new H5PReportXAPIData(json_decode($this->answer));

  // Parse data
  $this
    ->saveXAPIData($data);
}