<?php
if (!defined('INSTALL_PROGRESS'))
	die("This file cannot be executed directly");

if (!isset($installer))
	throw new Exception("Install options are not defined");

/**
 * Remove the plugin.
 *
 * @var $installer \Claromentis\Setup\SetupFacade
 */
$installer->GetPluginsRepository()->Remove('quiz');

/**
 * Remove the Quiz and Quiz Admin permissions
 */
$database = $installer->GetDb();

$database->query("DELETE FROM permissions WHERE class_id IN in:int:class_ids", array(130, 131));
