You are here

public function ShortAnswerResponse::delete in Quiz 8.4

Implementation of delete

Overrides QuizQuestionResponse::delete

See also

QuizQuestionResponse#delete()

File

question_types/short_answer/lib/Drupal/short_answer/ShortAnswerResponse.php, line 155
The main classes for the short answer response.

Class

ShortAnswerResponse
Extension of QuizQuestionResponse

Namespace

Drupal\short_answer

Code

public function delete() {
  db_delete('quiz_short_answer_user_answers')
    ->condition('question_nid', $this->question
    ->id())
    ->condition('question_vid', $this->question
    ->getRevisionId())
    ->condition('result_id', $this->rid)
    ->execute();
}