3 * module_uninstall.php performs reversion of module_install.php
\r
7 * the line below safe-guards this file from being accessed directly from
\r
8 * a web browser. It will only execute if required from within an ATutor script,
\r
9 * in our case the Module::uninstall() method.
\r
11 if (!defined('AT_INCLUDE_PATH')) { exit; }
\r
14 * the following code is used for removing a module-specific directory created in module_install.php.
\r
15 * it generates appropriate error messages to aid in its creation.
\r
17 $directory = AT_CONTENT_DIR .'cpref_switch';
\r
19 // check if the directory exists
\r
20 if (is_dir($directory)) {
\r
21 require(AT_INCLUDE_PATH.'lib/filemanager.inc.php');
\r
23 if (!clr_dir($directory))
\r
24 $msg->addError(array('MODULE_UNINSTALL', '<li>'.$directory.' can not be removed. Please manually remove it.</li>'));
\r