Log of /trunk/webwork2/lib/WeBWorK/DB.pm
Parent Directory
Revision
1236 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 17:04:03 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 35479 byte(s)
Diff to
previous 1226
new{Password,PermissionLevel,Key,User,GlobalSet,UserSet,...} now pass an
optional prototype object to the record class's constructor. this allows
you to use these methods in place of global2user and user2global (which
you should):
my $userSet = $db->getUserSet($userID, $setID);
my $gloalSet = $db->newGlobalSet($userSet);
You can even do weird things like:
my $gloalSet = $db->newGlobalSet($userProblem);
The WeBWorK::DB::Record class just copies the values of ANY matching
fields from the old object to the new object.
Revision
1226 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 20 01:17:45 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 35287 byte(s)
Diff to
previous 1205
added (commented-out) timing code, checkFields now requires ^\d*$ in
problem_id field and assers that ID fields not be undef or blank.
Revision
1185 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 17 19:26:23 2003 UTC (9 years, 11 months ago) by
malsyned
File length: 32825 byte(s)
Diff to
previous 1167
"That's what happens when you put in error checking code, is that your
error checking code is full of errors" --Sam Hathaway
-Dennis
Revision
1167 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 13 23:35:54 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 32821 byte(s)
Diff to
previous 1108
Several changes to the DB system:
Made all schemas subclasses of WeBWorK::DB::Schema, factored common
constructor code out into Schema.pm. Made all drivers subclasses of
WeBWorK::DB::Schema, factored common constructor code out into
Driver.pm.
Removed superfluous style() and tables() functions from schemas and
drivers. (You can treat the constants in which these are defined as
functions, and call them like $object->STYLE or $object->STYLE().)
WeBWorK::DB now tries to build all tables defined in %dbLayout, instead
of using its own internal list. (TODO: add warnings if known tables are
not built or unknown tables are built.)
Made the error messages given during DB instantiation a little more
intelligent.
Changed the behavior of the exists() and delete() schema methods in all
schemas (and updated the docs) s.t. not all elements of @keyparts have
to be defined.
Changed WeBWorK::DB to allow undefined values to be passed instead of
IDs in delete* method calls, but only if the call was made from
WeBWorK::DB itself (to protect you from accidentally passing an
undefined value and clobbering your whole database).
Changed delete functions to be more efficient. For example,
deleteGlobalSet no longer has to say:
$self->deleteUserSet($_, $setID)
foreach $self->listSetUsers($setID);
$self->deleteGlobalProblem($setID, $_)
foreach $self->listGlobalProblems($setID);
Instead it says:
$self->deleteUserSet(undef, $setID);
$self->deleteGlobalProblem($setID, undef);
This is somewhat more efficient with hash-style schemas, and MUCH more
efficient with the SQL schema.
As usual, be wary of lingering bugs. w00t!
-sam
Revision
1108 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 10 19:58:28 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 32128 byte(s)
Diff to
previous 1104
changed global.conf.dist to include one of sql.conf or gdbm.conf. added
sql.conf.dist and gdbm.conf.dist. continuted documenting WeBWorK::DB
-sam
Revision
1104 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 10 17:25:26 2003 UTC (9 years, 11 months ago) by
malsyned
File length: 27905 byte(s)
Diff to
previous 1096
Fixed a bug in error reporting that was preventing answer submission.
Say your final goodbyes to bug #69
-Dennis
Revision
956 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 30 21:09:19 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 14155 byte(s)
Diff to
previous 953
Added the capability to the GlobalTableEmulator to designate a user
whose records will be used as global records. To specify this, set the
globalUserID param for the tables using the GlobalTableEmulator (in
%dbLayout). It's probably good to do this on a per-course basis. Put the
following in your course.conf:
$dbLayout{set}->{params}->{globalUserID} = "professor";
$dbLayout{problem}->{params}->{globalUserID} = "professor";
If globalUserID is not present, GlobalTableEmulator will use consensus
(which is very slow!).
-sam
Revision
953 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri May 30 18:14:14 2003 UTC (9 years, 11 months ago) by
sh002i
File length: 10546 byte(s)
Diff to
previous 931
Made listGlobalProblems more efficient. (I have to go back and look at
the rest of DB and see if there are any more optimizations that can be
made.)
-sam
Revision
923 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 28 01:27:38 2003 UTC (10 years ago) by
sh002i
File length: 10469 byte(s)
Diff to
previous 916
additional work on DB system and SQL backend.
Record:: classes now support a can() method.
fixed some other stuff.
-sam
Revision
909 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 27 20:11:18 2003 UTC (10 years ago) by
sh002i
File length: 10419 byte(s)
Diff to
previous 904
added:
* listSetUsers($setID) - lists users to whom a set has been assigned
* listProblemUsers($setID, $problemID) - lists users to whom a problem
has been assigned
Both return userIDs.
-sam
Revision
808 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Apr 17 21:01:17 2003 UTC (10 years, 1 month ago) by
sh002i
File length: 9463 byte(s)
Diff to
previous 798
Lots of work on WWDBv2... WW1Hash is done! A complete dbLayout (as
detailed on global.conf.dist) works now.
-sam
Revision
798 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 21 23:30:16 2003 UTC (10 years, 2 months ago) by
sh002i
File length: 9102 byte(s)
Diff to
previous 775
initial support for WWDBv2:
- DB.pm finished (except for getGlobalUser{Set,Problem} methods)
- schema modules for password, permission, key, and user with
WWDBv1 hash-bashed backends
- GDBM driver
- wwdb command-line frontend
-sam
Revision
775 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Fri Mar 7 07:03:57 2003 UTC (10 years, 2 months ago) by
sh002i
File length: 8739 byte(s)
added DB.pm -- DB API implemented.
(however, no Schema or Driver modules have been written!)
-sam
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.