You are here

public function MatchingResponse::delete in Quiz 6.4

Same name and namespace in other branches
  1. 6.6 question_types/matching/matching.classes.inc \MatchingResponse::delete()
  2. 6.3 question_types/matching/matching.classes.inc \MatchingResponse::delete()
  3. 6.5 question_types/matching/matching.classes.inc \MatchingResponse::delete()
  4. 7.6 question_types/matching/matching.classes.inc \MatchingResponse::delete()
  5. 7 question_types/matching/matching.classes.inc \MatchingResponse::delete()
  6. 7.4 question_types/matching/matching.classes.inc \MatchingResponse::delete()
  7. 7.5 question_types/matching/matching.classes.inc \MatchingResponse::delete()

Implementation of delete

Overrides QuizQuestionResponse::delete

See also

QuizQuestionResponse#delete()

File

question_types/matching/matching.classes.inc, line 398
matching.classes

Class

MatchingResponse
Extension of QuizQuestionResponse

Code

public function delete() {
  $sql = 'DELETE FROM {quiz_matching_user_answers}
            WHERE match_id IN (
              SELECT match_id
              FROM {quiz_matching_node}
              WHERE nid = %d AND vid = %d
            )
            AND result_id = %d';
  db_query($sql, $this->question->nid, $this->question->vid, $this->rid);
}