You are here

function quiz_uninstall in Quiz 5

Same name and namespace in other branches
  1. 8.4 quiz.install \quiz_uninstall()
  2. 5.2 quiz.install \quiz_uninstall()
  3. 6.6 quiz.install \quiz_uninstall()
  4. 6.2 quiz.install \quiz_uninstall()
  5. 6.3 quiz.install \quiz_uninstall()
  6. 6.4 quiz.install \quiz_uninstall()
  7. 6.5 quiz.install \quiz_uninstall()
  8. 7.6 quiz.install \quiz_uninstall()
  9. 7 quiz.install \quiz_uninstall()
  10. 7.4 quiz.install \quiz_uninstall()
  11. 7.5 quiz.install \quiz_uninstall()

Implementation of hook_uninstall()

File

./quiz.install, line 155

Code

function quiz_uninstall() {
  db_query('DROP TABLE {quiz_question_results}');
  db_query('DROP TABLE {quiz_result}');
  db_query('DROP TABLE {quiz_question_answer}');
  db_query('DROP TABLE {quiz_question}');
  db_query('DROP TABLE {quiz_questions}');
  db_query('DROP TABLE {quiz}');

  // delete from nodes and node_revisions
  db_query('DELETE FROM node, node_revisions USING node LEFT JOIN node_revisions USING (nid) WHERE type IN ("quiz", "multichoice")');
  variable_del('quiz_name');
  variable_del('quiz_default_close');
  variable_del('quiz_use_passfail');
  variable_del('quiz_default_pass_rate');
}