-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtables.php
50 lines (42 loc) · 1.63 KB
/
tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/**
* PostNuke Application Framework
*
* @copyright (c) 2002, PostNuke Development Team
* @link http://www.postnuke.com
* @version $Id: pninit.php 22139 2007-06-01 10:57:16Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package PostNuke_Value_Addons
* @subpackage Moodle
*/
/**
* Define module tables
* @author Albert Pérez Monfort ([email protected])
* @return module tables information
*/
function IWmoodle_tables() {
// Initialise table array
$table = array();
// iw_webbox table definition
$table['IWmoodle'] = DBUtil::getLimitedTablename('IWmoodle');
$table['IWmoodle_column'] = array('mid' => 'iw_mid',
'mcid' => 'iw_mcid',
'uid' => 'iw_uid',
'role' => 'iw_role');
$table['IWmoodle_column_def'] = array('mid' => "I NOTNULL AUTO PRIMARY",
'mcid' => "I NOTNULL DEFAULT '0'",
'uid' => "I NOTNULL DEFAULT '0'",
'role' => "I NOTNULL DEFAULT '0'");
// Define tables from groups and users that are used in this module
$table['group_membership'] = DBUtil::getLimitedTablename('group_membership');
$table['group_membership_column'] = array('uid' => 'uid',
'gid' => 'gid');
$table['users'] = DBUtil::getLimitedTablename('users');
$table['users_column'] = array('uid' => 'uid',
'pass' => 'pass',
'uname' => 'uname');
ObjectUtil::addStandardFieldsToTableDefinition($table['IWmoodle_column'], 'pn_');
ObjectUtil::addStandardFieldsToTableDataDefinition($table['IWmoodle_column_def'], 'iw_');
// Return the table information
return $table;
}