<url>http://atutor.ca</url> \r
<license>GPL</license> \r
<release> \r
- <version>0.1</version> \r
- <date>2006-09-29</date> \r
+ <version>0.2</version> \r
+ <date>2010-10-25</date> \r
<state>stable</state> \r
<notes>A Cmap server must be running and functioning properly to make use of this module once installed. There is also a client CmapTools that can be installed on the users system so they to can interact with the server for collaborative concept map authoring. See the Cmap site for full details (http://cmap.ihmc.us/) Once the module is installed, go to the Cmap admin tool created in ATutor, and enter the URL to your Cmap server.</notes> \r
</release> \r
--- /dev/null
+<?php\r
+/*******\r
+ * module_uninstall.php performs reversion of module_install.php\r
+ */\r
+\r
+/*******\r
+ * the line below safe-guards this file from being accessed directly from\r
+ * a web browser. It will only execute if required from within an ATutor script,\r
+ * in our case the Module::uninstall() method.\r
+ */\r
+if (!defined('AT_INCLUDE_PATH')) { exit; }\r
+\r
+\r
+/******\r
+ * the following code checks if there are any errors (generated previously)\r
+ * then uses the SqlUtility to run reverted database queries of module.sql, \r
+ * ie. "create table" statement in module.sql is run as drop according table.\r
+ */\r
+if (!$msg->containsErrors() && file_exists(dirname(__FILE__) . '/module.sql')) {\r
+ // deal with the SQL file:\r
+ require(AT_INCLUDE_PATH . 'classes/sqlutility.class.php');\r
+ $sqlUtility = new SqlUtility();\r
+\r
+ /*\r
+ * the SQL file could be stored anywhere, and named anything, "module.sql" is simply\r
+ * a convention we're using.\r
+ */\r
+ $sqlUtility->revertQueryFromFile(dirname(__FILE__) . '/module.sql', TABLE_PREFIX);\r
+}\r
+\r
+?>
\ No newline at end of file