[system] / trunk / webwork-modperl / lib / WeBWorK / DB.pm Repository:
ViewVC logotype

Log of /trunk/webwork-modperl/lib/WeBWorK/DB.pm

Parent Directory Parent Directory


Links to HEAD: (view) (download) (as text) (annotate)
Sticky Revision:

Revision 2330 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 16 18:26:59 2004 UTC (8 years, 11 months ago) by toenail
File length: 54835 byte(s)
Diff to previous 2328 , to selected 814
added countUserSets method

Revision 2328 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 16 17:13:28 2004 UTC (8 years, 11 months ago) by sh002i
File length: 54582 byte(s)
Diff to previous 2319 , to selected 814
check for both definedness and non-emptiness when merging fields.

Revision 2319 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jun 15 18:55:26 2004 UTC (8 years, 11 months ago) by sh002i
File length: 54520 byte(s)
Diff to previous 2312 , to selected 814
getMerged* now use the global value when a field is empty ("") rather
than when a field is undefined.

Revision 2312 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 14 22:58:55 2004 UTC (8 years, 11 months ago) by sh002i
File length: 54314 byte(s)
Diff to previous 2105 , to selected 814
added hashDatabaseOK() function to check and repair hash-based databases
from webwork 1. can add global user and assign sets to global user.

Revision 2105 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu May 13 21:14:25 2004 UTC (9 years ago) by sh002i
File length: 50237 byte(s)
Diff to previous 1976 , to selected 814
comments

Revision 1976 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 27 03:37:56 2004 UTC (9 years ago) by sh002i
File length: 50010 byte(s)
Diff to previous 1696 , to selected 814
return auto-created permission level records

Revision 1696 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 3 20:07:03 2004 UTC (9 years, 4 months ago) by sh002i
File length: 49964 byte(s)
Diff to previous 1681 , to selected 814
UPDATE YOUR CONFIG FILES! (global.conf.dist, database.conf.dist)

Made changes to support the storage of multiple database layouts in a
single course environment. Database layouts are now stored in a hash
named %dbLayouts in database.conf, and the default layout is aliased to
*dbLayout (see comments in database.conf.dist and global.conf.dist)
sql.conf and gdbm.conf are no longer used.

Support the selection of a specific database layout when instantiating
WeBWorK::DB. WeBWorK::DB now takes a reference to a database layout
rather than an entire course environment.

All calls to WeBWorK::DB::new were updated to pass the correct argument.

Revision 1681 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 18 23:15:34 2003 UTC (9 years, 5 months ago) by sh002i
File length: 49729 byte(s)
Diff to previous 1672 , to selected 814
- Assigner and SetsAssignedToUser now refuse to unassign sets from the
GlobalTableEmulator's "global user". Closes bug #283.
- New "unassign from all users" button in Assigner.
- Cosmetic changes to path() and title() in several modules.

Revision 1672 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 17 20:21:15 2003 UTC (9 years, 5 months ago) by sh002i
File length: 49749 byte(s)
Diff to previous 1668 , to selected 814
added "getAllGlobalProblems", similar to "getAllUserProblems".

Revision 1668 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 12 20:23:27 2003 UTC (9 years, 5 months ago) by sh002i
File length: 49046 byte(s)
Diff to previous 1663 , to selected 814
Added DB: getAllUserProblems; WW1Hash: getAll, getAllNoFilter;
GlobalTableEmulator: getAll.

Together, these functions allow efficient access to all problems in a
given set.

Revision 1663 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 9 01:12:32 2003 UTC (9 years, 5 months ago) by sh002i
File length: 48159 byte(s)
Diff to previous 1661 , to selected 814
Normalized headers. All files now contain the text below as a header.
This is important since all files now (a) use the full name of the
package, (b) assign copyright to "The WeBWorK Project", (c) give the
full path of the file (relative to CVSROOT) instead of simply the file
name, and (d) include license and warranty information.

Here is the new header:

################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2003 The WeBWorK Projcct, http://openwebwork.sf.net/
# $CVSHeader$
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version, or (b) the "Artistic License" which comes with this package.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See either the GNU General Public License or the
# Artistic License for more details.
################################################################################

Revision 1661 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 8 23:07:46 2003 UTC (9 years, 5 months ago) by sh002i
File length: 47502 byte(s)
Diff to previous 1657 , to selected 814
Implemented a schema-level "count" function in the WW1Hash schema.
Added countSetUsers and countProblemUsers to DB.
Replaced SCALAR calls to listSetUsers with calls to countSetUsers.
Update Schema documentation.

The immediate advantage of this is to make ProblemSetList MUCH faster.

Revision 1657 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 4 18:31:55 2003 UTC (9 years, 5 months ago) by sh002i
File length: 46473 byte(s)
Diff to previous 1649 , to selected 814
removed debugging statements

Revision 1649 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 3 20:30:31 2003 UTC (9 years, 5 months ago) by sh002i
File length: 46518 byte(s)
Diff to previous 1641 , to selected 814
finally committing "terrible GDBM hack": if WW1Hash and
GlobalTableEmuator are being used, a schema-specific optimization is
enabled in getMergedSets.

Revision 1641 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 19 22:55:58 2003 UTC (9 years, 6 months ago) by sh002i
File length: 45009 byte(s)
Diff to previous 1635 , to selected 814
plural get methods no longer require an argument. that way, one can pass
an empty list to them and get an empty list back.

Revision 1635 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Nov 19 18:42:42 2003 UTC (9 years, 6 months ago) by sh002i
File length: 46279 byte(s)
Diff to previous 1589 , to selected 814
getPassword[s] and getPermissionLevel[s] now auto-create missing
records.

Revision 1589 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 16 03:12:44 2003 UTC (9 years, 7 months ago) by sh002i
File length: 45028 byte(s)
Diff to previous 1587 , to selected 814
fixed the problem where all user values appear to be overridden. no bug
for this is bugzilla though.

Revision 1587 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 15 19:36:13 2003 UTC (9 years, 7 months ago) by sh002i
File length: 44902 byte(s)
Diff to previous 1586 , to selected 814
fixed how "gets" was being called. It has to be called with a list of
array references. fixed several implementations of "gets".
closes bug #252.

Revision 1586 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 15 17:09:41 2003 UTC (9 years, 7 months ago) by sh002i
File length: 44613 byte(s)
Diff to previous 1583 , to selected 814
fixed some typos re: calls to get vs. gets
closes bug #259
closes bug #250

Revision 1583 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 14 18:02:39 2003 UTC (9 years, 7 months ago) by sh002i
File length: 44598 byte(s)
Diff to previous 1568 , to selected 814
closes bug #251: getMergedSets and getMergedProblems now call
getGlobalSets/getUserSets and getGlobalProblems/getUserProblems.

The algorithm used to merge fields is also more efficient now, and
getMergedSet/getMergedProblem have been reimplemented to call
getMergedSets/getMergedProblems.

Revision 1568 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 6 23:50:58 2003 UTC (9 years, 7 months ago) by sh002i
File length: 42570 byte(s)
Diff to previous 1541 , to selected 814
added optimized implementations for DB getOBJECTs functions.

Revision 1541 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Sep 27 19:23:27 2003 UTC (9 years, 7 months ago) by gage
File length: 42666 byte(s)
Diff to previous 1512 , to selected 814
Fixed spelling on "getMergedSets"
--Mike

Revision 1512 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 22 17:37:12 2003 UTC (9 years, 7 months ago) by sh002i
File length: 42669 byte(s)
Diff to previous 1299 , to selected 814
added getOBJECTs functions (with pod!)
-sam

Revision 1299 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 27 20:42:22 2003 UTC (9 years, 10 months ago) by malsyned
File length: 35482 byte(s)
Diff to previous 1236 , to selected 814
Added '-' to the list of valid characters in identifiers.  This
addresses bug #115

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 , to selected 814
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 , to selected 814
added (commented-out) timing code, checkFields now requires ^\d*$ in
problem_id field and assers that ID fields not be undef or blank.

Revision 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 18 21:00:15 2003 UTC (9 years, 11 months ago) by sh002i
File length: 34552 byte(s)
Diff to previous 1201 , to selected 814
removed unused TABLES constant

Revision 1201 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 18 19:13:53 2003 UTC (9 years, 11 months ago) by sh002i
File length: 34644 byte(s)
Diff to previous 1199 , to selected 814
added methods to create new instances of record classes.

Revision 1199 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 18 18:20:17 2003 UTC (9 years, 11 months ago) by sh002i
File length: 33734 byte(s)
Diff to previous 1185 , to selected 814
small fix to Timing.pm.
key fields are now checked to match m/^\w*$/.

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 , to selected 814
"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 , to selected 814
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 , to selected 814
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 , to selected 814
Fixed a bug in error reporting that was preventing answer submission.
Say your final goodbyes to bug #69
-Dennis

Revision 1096 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 23:25:09 2003 UTC (9 years, 11 months ago) by sh002i
File length: 27901 byte(s)
Diff to previous 1035 , to selected 814
*** empty log message ***

Revision 1035 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 5 22:58:42 2003 UTC (9 years, 11 months ago) by sh002i
File length: 16493 byte(s)
Diff to previous 1023 , to selected 814
Fixed (again) the GlobalTableEmulator.
-sam

Revision 1023 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 5 14:39:49 2003 UTC (9 years, 11 months ago) by gage
File length: 16491 byte(s)
Diff to previous 1012 , to selected 814
added =cut
near end of DB.pm file.
before
1;

(I thought I had already commited this????)
--Mike

Revision 1012 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 4 18:36:17 2003 UTC (9 years, 11 months ago) by sh002i
File length: 16484 byte(s)
Diff to previous 958 , to selected 814
began to document and add sanity checks.
-sam

Revision 958 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 30 21:37:15 2003 UTC (9 years, 11 months ago) by sh002i
File length: 14332 byte(s)
Diff to previous 956 , to selected 814
fixed several stupid errors.
-sam

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 , to selected 814
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 , to selected 814
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 931 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 28 19:21:04 2003 UTC (9 years, 11 months ago) by sh002i
File length: 10544 byte(s)
Diff to previous 923 , to selected 814
changed the Schema interface (to include a reference to $db) and changed
DBI connect to connect_cached.
-sam

Revision 923 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 28 01:27:38 2003 UTC (9 years, 11 months ago) by sh002i
File length: 10469 byte(s)
Diff to previous 916 , to selected 814
additional work on DB system and SQL backend.
Record:: classes now support a can() method.
fixed some other stuff.
-sam

Revision 916 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 27 23:43:47 2003 UTC (9 years, 11 months ago) by sh002i
File length: 10430 byte(s)
Diff to previous 914 , to selected 814
fixed call to get() on line 281.
-sam

Revision 914 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 27 23:37:57 2003 UTC (9 years, 11 months ago) by sh002i
File length: 10422 byte(s)
Diff to previous 909 , to selected 814
fixed a logic error in addUserProblem
-sam

Revision 909 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 27 20:11:18 2003 UTC (9 years, 11 months ago) by sh002i
File length: 10419 byte(s)
Diff to previous 904 , to selected 814
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 904 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 26 22:13:34 2003 UTC (9 years, 11 months ago) by sh002i
File length: 10129 byte(s)
Diff to previous 874 , to selected 814
More SQL work. Appears to be working, after very limited testing. See
forthcoming email for details.
-sam

Revision 874 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 20 23:08:03 2003 UTC (10 years ago) by sh002i
File length: 10111 byte(s)
Diff to previous 814
initial work on SQL backend. untested.
-sam

Revision 814 - (view) (download) (as text) (annotate) - [selected]
Modified Wed Apr 23 06:37:19 2003 UTC (10 years ago) by sh002i
File length: 10102 byte(s)
Diff to previous 808
implemented getGlobalUser{Set,Problem}.
-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 , to selected 814
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 , to selected 814
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)
Diff to selected 814
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.

  Diffs between and
  Type of Diff should be a

Sort log by:

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9