-
Notifications
You must be signed in to change notification settings - Fork 1
/
acm_course.install
180 lines (174 loc) · 4.28 KB
/
acm_course.install
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?php
/**
* Implementation of hook_install().
*/
function acm_course_install() {
drupal_install_schema('acm_course');
}
/**
* Implementation of hook_uninstall().
*/
function acm_course_uninstall() {
drupal_uninstall_schema('acm_course');
}
function acm_course_schema() {
$schema['acm_course'] = array(
'description' => t('The base table for course entity'),
'fields' => array(
'id' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'exam_score' => array(
'type' => 'varchar',
'description' => 'Exam score for this grade',
'length' => '12',
'not null' => FALSE,
'default' => '',
),
'test_score' => array(
'type' => 'varchar',
'description' => 'Total score or CA score for this grade',
'length' => '12',
'not null' => FALSE,
'default' => '',
),
'academic_departmentid' => array(
'type' => 'varchar',
'description' => 'The department course belong to',
'length' => '25',
'not null' => FALSE,
'default' => '',
),
'title' => array(
'type' => 'varchar',
'description' => 'The course id we are grading for',
'length' => '25',
'not null' => FALSE,
'default' => '',
),
'code' => array(
'type' => 'varchar',
'description' => 'The course code',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'description' => array(
'type' => 'text',
'size' => 'medium',
'description' => 'Course description',
'not null' => FALSE,
'default' => '',
),
'creditpoint' => array(
'type' => 'varchar',
'description' => 'The applicable credit point for score',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'prerequisitecodes' => array(
'type' => 'varchar',
'description' => 'Code for prerequisite course',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'prerequisites' => array(
'type' => 'varchar',
'description' => 'Prerequisites course',
'length' => '100',
'not null' => FALSE,
'default' => '',
),
'level' => array(
'type' => 'varchar',
'description' => 'Course level',
'length' => '225',
'not null' => FALSE,
'default' => '',
),
'semester' => array(
'type' => 'varchar',
'description' => 'Course semester',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'session' => array(
'type' => 'varchar',
'description' => 'Academic session this course belongs to',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'lecturerincharge' => array(
'type' => 'varchar',
'description' => 'Course assigned to a lecture',
'length' => '40',
'not null' => FALSE,
'default' => '',
),
'numberofcas' => array(
'type' => 'varchar',
'description' => 'Total number of CA for this course',
'length' => '40',
'not null' => FALSE,
'default' => '',
),
'caapprovalmethod' => array(
'type' => 'varchar',
'description' => 'approval method',
'length' => '255',
'not null' => FALSE,
'default' => '',
),
'maxtestmark' => array(
'type' => 'varchar',
'description' => 'Test score maximum mark',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'maxexammark' => array(
'type' => 'varchar',
'description' => 'Maximum exam mark',
'length' => '10',
'not null' => FALSE,
'default' => '',
),
'programme' => array(
'type' => 'varchar',
'description' => 'A progremme this course belong to',
'length' => '40',
'not null' => FALSE,
'default' => '',
),
'type' => array(
'type' => 'varchar',
'description' => 'Core,required or elective',
'length' => '40',
'not null' => FALSE,
'default' => '',
),
'created' => array(
'type' => 'varchar',
'description' => 'Created date',
'length' => '50',
'not null' => FALSE,
'default' => '',
),
'updated' => array(
'type' => 'varchar',
'description' => 'Updated date',
'length' => '50',
'not null' => FALSE,
'default' => '',
),
),
'primary key' => array('id'),
);
return $schema;
}