| 1 | #!perl |
1 | #!perl |
| 2 | ################################################################################ |
2 | ################################################################################ |
| 3 | # WeBWorK Online Homework Delivery System |
3 | # WeBWorK Online Homework Delivery System |
| 4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
4 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 5 | # $CVSHeader: webwork-modperl/conf/database.conf.dist,v 1.11 2004/06/08 20:03:10 sh002i Exp $ |
5 | # $CVSHeader: webwork2/conf/database.conf.dist,v 1.12 2004/06/14 22:55:52 sh002i Exp $ |
| 6 | # |
6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify it under |
7 | # This program is free software; you can redistribute it and/or modify it under |
| 8 | # the terms of either: (a) the GNU General Public License as published by the |
8 | # the terms of either: (a) the GNU General Public License as published by the |
| 9 | # Free Software Foundation; either version 2, or (at your option) any later |
9 | # Free Software Foundation; either version 2, or (at your option) any later |
| 10 | # version, or (b) the "Artistic License" which comes with this package. |
10 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 150 | source => "dbi:mysql:webwork_$courseName", |
150 | source => "dbi:mysql:webwork_$courseName", |
| 151 | params => { %sqlParams }, |
151 | params => { %sqlParams }, |
| 152 | }, |
152 | }, |
| 153 | }; |
153 | }; |
| 154 | |
154 | |
|
|
155 | =head1 THE SQL_SINGLE DATABASE LAYOUT |
|
|
156 | |
|
|
157 | The C<sql_single> layout is similar to the C<sql> layout, excpet that it uses a |
|
|
158 | single database for all courses. This is accomplised by prefixing each table |
|
|
159 | name with the name of the course. |
|
|
160 | |
|
|
161 | =cut |
|
|
162 | |
|
|
163 | $dbLayouts{sql_single} = { |
|
|
164 | password => { |
|
|
165 | record => "WeBWorK::DB::Record::Password", |
|
|
166 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
167 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
168 | source => "dbi:mysql:webwork", |
|
|
169 | params => { %sqlParams, |
|
|
170 | tableOverride => "${courseName}_password", |
|
|
171 | }, |
|
|
172 | }, |
|
|
173 | permission => { |
|
|
174 | record => "WeBWorK::DB::Record::PermissionLevel", |
|
|
175 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
176 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
177 | source => "dbi:mysql:webwork", |
|
|
178 | params => { %sqlParams, |
|
|
179 | tableOverride => "${courseName}_permission", |
|
|
180 | }, |
|
|
181 | }, |
|
|
182 | key => { |
|
|
183 | record => "WeBWorK::DB::Record::Key", |
|
|
184 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
185 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
186 | source => "dbi:mysql:webwork", |
|
|
187 | params => { %sqlParams, |
|
|
188 | tableOverride => "${courseName}_key", |
|
|
189 | fieldOverride => { key => "key_not_a_keyword" }, |
|
|
190 | }, |
|
|
191 | }, |
|
|
192 | user => { |
|
|
193 | record => "WeBWorK::DB::Record::User", |
|
|
194 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
195 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
196 | source => "dbi:mysql:webwork", |
|
|
197 | params => { %sqlParams, |
|
|
198 | tableOverride => "${courseName}_user", |
|
|
199 | }, |
|
|
200 | }, |
|
|
201 | set => { |
|
|
202 | record => "WeBWorK::DB::Record::Set", |
|
|
203 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
204 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
205 | source => "dbi:mysql:webwork", |
|
|
206 | params => { %sqlParams, |
|
|
207 | tableOverride => "${courseName}_set" |
|
|
208 | }, |
|
|
209 | }, |
|
|
210 | set_user => { |
|
|
211 | record => "WeBWorK::DB::Record::UserSet", |
|
|
212 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
213 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
214 | source => "dbi:mysql:webwork", |
|
|
215 | params => { %sqlParams, |
|
|
216 | tableOverride => "${courseName}_set_user" |
|
|
217 | }, |
|
|
218 | }, |
|
|
219 | problem => { |
|
|
220 | record => "WeBWorK::DB::Record::Problem", |
|
|
221 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
222 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
223 | source => "dbi:mysql:webwork", |
|
|
224 | params => { %sqlParams, |
|
|
225 | tableOverride => "${courseName}_problem" |
|
|
226 | }, |
|
|
227 | }, |
|
|
228 | problem_user => { |
|
|
229 | record => "WeBWorK::DB::Record::UserProblem", |
|
|
230 | schema => "WeBWorK::DB::Schema::SQL", |
|
|
231 | driver => "WeBWorK::DB::Driver::SQL", |
|
|
232 | source => "dbi:mysql:webwork", |
|
|
233 | params => { %sqlParams, |
|
|
234 | tableOverride => "${courseName}_problem_user" |
|
|
235 | }, |
|
|
236 | }, |
|
|
237 | }; |
|
|
238 | |
| 155 | =head1 THE GDBM DATABASE LAYOUT ($dbLayouts{gdbm}) |
239 | =head1 THE GDBM DATABASE LAYOUT ($dbLayouts{gdbm}) |
| 156 | |
240 | |
| 157 | This layout uses the traditional WeBWorK 1.x database format, using the GDBM |
241 | This layout uses the traditional WeBWorK 1.x database format, using the GDBM |
| 158 | file format. Use this layout if you wish to share courses between WeBWorK 1.x |
242 | file format. Use this layout if you wish to share courses between WeBWorK 1.x |
| 159 | and WeBWorK 2. |
243 | and WeBWorK 2. |