3 * the line below safe-guards this file from being accessed directly from
\r
4 * a web browser. It will only execute if required from within an ATutor script,
\r
5 * in our case the Module::install() method.
\r
7 if (!defined('AT_INCLUDE_PATH')) { exit; }
\r
10 $_admin_privilege = TRUE; // possible values: FALSE | TRUE
\r
14 * the following code checks if there are any errors (generated previously)
\r
15 * then uses the SqlUtility to run any database queries it needs, ie. to create
\r
18 if (!$msg->containsErrors() && file_exists(dirname(__FILE__) . '/module.sql')) {
\r
19 // deal with the SQL file:
\r
20 require(AT_INCLUDE_PATH . 'classes/sqlutility.class.php');
\r
21 $sqlUtility =& new SqlUtility();
\r
24 * the SQL file could be stored anywhere, and named anything, "module.sql" is simply
\r
25 * a convention we're using.
\r
27 $sqlUtility->queryFromFile(dirname(__FILE__) . '/module.sql', TABLE_PREFIX);
\r