removed assign by reference & from uninstall and reset file manager location to mods...
authorgreg gay <ggay@ocad.ca>
Mon, 25 Oct 2010 16:20:34 +0000 (16:20 -0000)
committergreg gay <ggay@ocad.ca>
Mon, 25 Oct 2010 16:20:34 +0000 (16:20 -0000)
mods/elluminate/module.xml
mods/elluminate/module_uninstall.php [new file with mode: 0644]

index 6ad6af6..6fa9c8c 100644 (file)
@@ -11,9 +11,9 @@
     <url>http://atutor.ca</url> \r
     <license>BSD</license> \r
        <release> \r
-        <version>0.1</version> \r
-        <date>2006-07-02</date> \r
+        <version>0.3</version> \r
+        <date>2010-10-25</date> \r
         <state>stable</state> \r
-        <notes>Requires Sun Java WebStart on the client's computer. Elluminate must be installed before installing this module. Once the module is installed and enabled, open the Administrator's Elluminate screen to enter the URL, and optional guest password. See the readme file included with the module for further details.</notes> \r
+        <notes>Requires Sun Java WebStart on the client's computer. Elluminate must be installed before installing this module. Once the module is installed and enabled, open the Administrator's Elluminate screen to enter the URL, and optional guest password. See the readme file included with the module for further details. If you are using the free 3 room version (vRoom) add the line "header( 'Location: your url here to elluminate' ) ;" (changing the words to a URL of course) somewhere near the top of the index.php file.</notes> \r
     </release> \r
 </module>
\ No newline at end of file
diff --git a/mods/elluminate/module_uninstall.php b/mods/elluminate/module_uninstall.php
new file mode 100644 (file)
index 0000000..52d8f81
--- /dev/null
@@ -0,0 +1,31 @@
+<?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