[system] / trunk / webwork2 / lib / WeBWorK / DB.pm Repository:
ViewVC logotype

Log of /trunk/webwork2/lib/WeBWorK/DB.pm

Parent Directory Parent Directory


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

Revision 6288 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 31 15:47:52 2010 UTC (9 years, 7 months ago) by glarose
File length: 69288 byte(s)
Diff to previous 6270
Relax error checking on user_id.  This allows user_id values to
look like set-level proctor ids (that is, to prepend set_id:
and append ,g), which isn't what we want for the user_id check
in most cases, but shouldn't be a significant difficulty.  The
ideal is to know something about the set for which we're checking
the id, but that requires sending more information into DB than
we're sending now.

Revision 6270 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 19 01:44:05 2010 UTC (9 years, 8 months ago) by gage
File length: 69493 byte(s)
Diff to previous 5981
added definition of sub  check_user_id

Revision 5981 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Jan 25 22:11:07 2009 UTC (10 years, 11 months ago) by gage
File length: 69349 byte(s)
Diff to previous 5702
moving exception catching to DB instead of DB::Schema

Revision 5702 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 18 19:20:55 2008 UTC (11 years, 7 months ago) by glarose
File length: 68906 byte(s)
Diff to previous 5648
Implement Danny Glin's fix for set_location entries being left when
a set was deleted.

Revision 5648 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 29 19:24:48 2008 UTC (11 years, 8 months ago) by sh002i
File length: 68858 byte(s)
Diff to previous 5414
added comments about future exception handling scheme

Revision 5414 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 25 18:16:34 2007 UTC (12 years, 4 months ago) by sh002i
File length: 67119 byte(s)
Diff to previous 5319
forward-port (sh002i): Resolve bug #1293 by actually throwing a
RecordExists exception from NewSQL::Std.

Revision 5319 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Aug 13 22:59:59 2007 UTC (12 years, 5 months ago) by sh002i
File length: 67217 byte(s)
Diff to previous 5192
updated copyright dates

Revision 5192 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 19 21:02:15 2007 UTC (12 years, 6 months ago) by sh002i
File length: 67218 byte(s)
Diff to previous 4923
(1) added methods for setting table (2) added dump_tables/restore_tables

Revision 4923 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 4 15:06:01 2007 UTC (12 years, 9 months ago) by glarose
File length: 63636 byte(s)
Diff to previous 4919
Add set-level proctor login password for proctored gateway/quiz
assignments, improve handling of proctor keys and permissions for
proctored assignments, bug fixes for recently added features.

This commit
 - adds the ability to specify a set-level proctor for proctored
   gateway/quiz assignments.  this is done by adding a proctor with
   a username "set_id:setName", where "setName" is the name of the
   set, adding a "restricted_login_proctor" field to the set tables
   in the database, and allowing Authen::Proctor and
   ContentGenerator::LoginProctor to appropriately deal with this
   possibility.
 - updates proctor permissions and status in global.conf.dist,
   changing the old "proctor_quiz" permission level (3) into two
   levels, "proctor_quiz_login" and "proctor_quiz_grade".
   wwdb_upgrade includes a stanza to make this change to proctors
   that already exist in courses.
 - adds a "Proctor" status in %statuses in global.conf, with no
   valid behaviors.  this allows the creation of proctor users
   in a course who have the permissionLevel to login (and thus
   proctor), but not to access the course.
 - improves GatewayQuiz explanatory messages when scores or work
   are hidden.
 - improves GatewayQuiz proctor key management, especially for
   tests with more than one allowed attempt.  this includes
   adding a deleteAllProctorKeys() method to DB.pm.
 - updates Instructor Tools, UserList.pm and ProblemSetDetail
   to deal with set-level proctoring.  c.f. the note below about
   the ramifications of these changes.
 - updates ProblemSetList to deal with new problem set fields
   set_locations and set-level proctors that are located in a
   different database table than the set data.
 - fixes bugs in UserList and ProblemSetDetail dealing with the
   setting of hide_score, hide_score_by_problem, and
   time_limit_cap.

This update hides set-level proctor users from the classlist
editor (UserList.pm) and instructor tools (Index.pm) interfaces.
They can be created, modified, and deleted at the homework sets
editor page (ProblemSetDetail.pm) only, and there only implicitly:
we never indicate that a user is being created or modified behind
the screen.

Revision 4919 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Apr 2 19:55:14 2007 UTC (12 years, 9 months ago) by glarose
File length: 63202 byte(s)
Diff to previous 4918
Finally patch addUserProblem to use grok_vsetID.

Revision 4918 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 30 19:07:55 2007 UTC (12 years, 9 months ago) by glarose
File length: 63442 byte(s)
Diff to previous 4912
Some bugfixes, preliminary commit of relax_restrict_ip function.  this
commit
 - adds relax_restrict_ip and hide_score_by_problem columns to the set
	and set_user tables
 - adds the corresponding fields to the Set and UserSet DB Records
 - patches 'no location' handling in the location management routine
	in CourseAdmin.pm
 - improves Authz->checkSet's handling of the case of location
	restriction when no addresses exist for a location, makes it
	use any cached set that may be available, and makes it honor
	relax_restrict_ip
 - corrects a typo and some comments in DB.pm
 - allows ip restriction fields in ProblemSetList when importing from
	or exporting to set definition files
 - updates ProblemSetDetail.pm to handle the relax_restrict_ip field

The relax_restrict_ip function has not been well tested.
hide_score_by_problem isn't yet used.

Revision 4912 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 29 15:12:49 2007 UTC (12 years, 9 months ago) by glarose
File length: 63567 byte(s)
Diff to previous 4910
Update checkKeyfields to allow IP masks of the form [address]/[mask]

Revision 4910 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 28 18:32:11 2007 UTC (12 years, 9 months ago) by glarose
File length: 63382 byte(s)
Diff to previous 4904
Follow up commit of IP address restriction code.  This adds IP address
location management to CourseAdmin.pm, corrects a typo for location
address management in DB.pm, and makes ProblemSetDetail.pm prettier
when displaying locations for restrictions.

Revision 4904 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 27 17:04:02 2007 UTC (12 years, 9 months ago) by glarose
File length: 63384 byte(s)
Diff to previous 4886
Preliminary commit of code to restrict access to assignments by client
IP address.  This commit adds the database tables for IP address
restriction, updates check_modules.pl to require Net::IP for address
matching, adds database calls in DB.pm for manipulating locations and
addresses, and adds location restriction to the set editing in
ProblemSetDetail.

This commit does not add actual restriction to sets, nor the ability
to create locations to which to restrict access.

Revision 4886 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 15 22:08:17 2007 UTC (12 years, 10 months ago) by glarose
File length: 56243 byte(s)
Diff to previous 4852
Make getAllMergedProblemVersions and getAllProblemVersions order returned
data by problem ID.

Revision 4852 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Mar 7 17:43:57 2007 UTC (12 years, 10 months ago) by sh002i
File length: 56172 byte(s)
Diff to previous 4849
re-throw unrecognized exceptions

Revision 4849 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Mar 6 22:02:28 2007 UTC (12 years, 10 months ago) by glarose
File length: 55911 byte(s)
Diff to previous 4830
Correct addkey to allow for proctor grading keys, restore ordering to
listSetVersions.

Revision 4830 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Mar 4 22:21:54 2007 UTC (12 years, 10 months ago) by sh002i
File length: 55711 byte(s)
Diff to previous 4821
remove old versioning methods that are no longer used by any client code

Revision 4821 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 2 23:28:52 2007 UTC (12 years, 10 months ago) by sh002i
File length: 56400 byte(s)
Diff to previous 4819
explain seemingly nonsensical line of code

Revision 4819 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 2 23:25:35 2007 UTC (12 years, 10 months ago) by sh002i
File length: 56304 byte(s)
Diff to previous 4818
reorder sections so that they're in the same order as the tables in database.conf
i think the database.conf order makes more sense, anyway. this will make
it easier for me to find things.

Revision 4818 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 2 23:22:28 2007 UTC (12 years, 10 months ago) by sh002i
File length: 56304 byte(s)
Diff to previous 4809
confirmed a fix by gavin -- i had said "grep" when i should have said "map".
(there's no need for the grep, in any case)

Revision 4809 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Mar 2 21:34:12 2007 UTC (12 years, 10 months ago) by glarose
File length: 56544 byte(s)
Diff to previous 4801
Correct listSetVersions to sort output.

Revision 4801 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Mar 1 22:15:24 2007 UTC (12 years, 10 months ago) by glarose
File length: 56503 byte(s)
Diff to previous 4793
Updates for new NewSQL Versioned API; update listProblemVersions,
getAllProblemVersions, getMergedProblemVersion.

Revision 4793 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Feb 22 17:44:31 2007 UTC (12 years, 10 months ago) by sh002i
File length: 55083 byte(s)
Diff to previous 4690
THIS UPDATE BREAKS CONTENT GENERATORS: split up methods for versioned
and non-versioned sets, and added new implementations for merged
versioned sets. (i'm mainly committing this so gavin can see what i've
done and give me input.)

Revision 4690 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 1 17:06:40 2006 UTC (13 years, 1 month ago) by glarose
File length: 48273 byte(s)
Diff to previous 4648
Correct addUserProblem for versioned sets.  This is probably a fix for a
problem that should be dealt with by addressing the issue of versioning
more globally in DB.pm.  For the moment this deals with the need to check
for the existence of a problem against the non-versioned set when adding
problems to a user set version.

Revision 4648 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Nov 13 17:27:51 2006 UTC (13 years, 2 months ago) by sh002i
File length: 47986 byte(s)
Diff to previous 4599
typo fix

Revision 4599 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Oct 31 18:51:18 2006 UTC (13 years, 2 months ago) by sh002i
File length: 47986 byte(s)
Diff to previous 4588
add methods that expose the "where" interface of NewSQL

Revision 4588 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Oct 25 14:20:46 2006 UTC (13 years, 2 months ago) by sh002i
File length: 47722 byte(s)
Diff to previous 4587
add schema accessor methods (ie $db->User), make gen_new more concise.

Revision 4587 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 23 17:33:20 2006 UTC (13 years, 2 months ago) by sh002i
File length: 47132 byte(s)
Diff to previous 4579
add "exists" methods, remove commented-out $where vars, fix usage of
grok_versionID_from_vsetID_sql, make getUserSetVersions behave
correctly.

Revision 4579 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 19 17:35:25 2006 UTC (13 years, 3 months ago) by sh002i
File length: 46052 byte(s)
Diff to previous 4568
move moodle session table access routines to Authen::Moodle.

Revision 4568 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 12 22:02:52 2006 UTC (13 years, 3 months ago) by sh002i
File length: 46418 byte(s)
Diff to previous 4558
yet more where clause abstractions (annoying but necessary :P)

Revision 4558 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 6 21:17:40 2006 UTC (13 years, 3 months ago) by sh002i
File length: 46178 byte(s)
Diff to previous 4557
this is the log message for the last version (v1.80): sweeping changes!

PLEASE NOTE THAT VERSION 1.80 AND LATER OF DB.PM WILL NOT WORK WITH
MOODLE UNTIL I UPDATE THE MOODLE SCHEMA MODULES (which should happen
soon).

WARNING: VERY EXPERIMENTAL CHANGES. DO NOT USE ON PRODUCTION SITES.
MAKE A BACKUP OF YOUR DATA BEFORE USING.

replaced ad-hoc argument checking with calls to checkArgs and
checkArgsRefList. this makes the code much more concise and readable.

no longer checking for existence before adding a field -- instead catch
a RecordExists exception which is thrown by NewSQL classes. this will
speed inserts of slightly.

added count* methods for all tables.

switch to using newer NewSQL methods where they'll be more efficient or
readable.

generally regularize code -- resolve indentation problems, get rid of
extraneous empty lines, etc.

rewrote getMergedSets, getMergedProblems, and getAllMergedUserProblems
to use NewSQL::Merged (via set_merged/problem_merged "tables"). The new
merge method (which is done completely withtin the database) is more
than three times as fast for normal merging and more than seven times as
fast for getAllMergedUserProblems.

Revision 4557 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 6 21:01:22 2006 UTC (13 years, 3 months ago) by sh002i
File length: 46786 byte(s)
Diff to previous 4545
*** empty log message ***

Revision 4545 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Oct 2 17:05:55 2006 UTC (13 years, 3 months ago) by sh002i
File length: 57646 byte(s)
Diff to previous 4538
put user methods first (in same order as dblayout tables in database.conf)

Revision 4538 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 29 19:37:55 2006 UTC (13 years, 3 months ago) by sh002i
File length: 57646 byte(s)
Diff to previous 4534
table renaming support

Revision 4534 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 29 16:49:47 2006 UTC (13 years, 3 months ago) by sh002i
File length: 56882 byte(s)
Diff to previous 4533
add create_tables and delete_tables methods

Revision 4533 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Sep 29 16:49:08 2006 UTC (13 years, 3 months ago) by sh002i
File length: 55981 byte(s)
Diff to previous 4527
remove partially finished and sometimes incorrect POD :(

Revision 4527 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Sep 26 15:57:41 2006 UTC (13 years, 3 months ago) by sh002i
File length: 65344 byte(s)
Diff to previous 4519
remove several useless "use Data::Dumper" lines

Revision 4519 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 25 22:26:38 2006 UTC (13 years, 3 months ago) by sh002i
File length: 65362 byte(s)
Diff to previous 4353
dymanically generate newRecord subroutines at compile time -- they're
identical except for their names and the tables they access, so they
might as well be generated. slightly more compile-time overhead,
no-to-negligible impact on runtime speed.

Revision 4353 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Aug 5 02:53:50 2006 UTC (13 years, 5 months ago) by sh002i
File length: 65445 byte(s)
Diff to previous 4128
remove vestiges of GDBM database support

Revision 4128 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jun 10 14:20:42 2006 UTC (13 years, 7 months ago) by gage
File length: 77229 byte(s)
Diff to previous 4100
Fixed spelling typo in comment

Revision 4100 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 24 23:28:24 2006 UTC (13 years, 7 months ago) by sh002i
File length: 77222 byte(s)
Diff to previous 4048
add moodlekey methods (these should go away eventually, but the current
implementation of Authen::Moodle needs them)

Revision 4048 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Apr 12 18:51:06 2006 UTC (13 years, 9 months ago) by sh002i
File length: 76693 byte(s)
Diff to previous 3973
Fix checkKeyFields to actually work with "versioned" user_id field in
key records.

Revision 3973 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jan 25 23:13:56 2006 UTC (13 years, 11 months ago) by sh002i
File length: 76073 byte(s)
Diff to previous 3848
forward-port from rel-2-2-dev: (update copyright date range -- 2000-2006.
this is probably overkill, since there are some files that were created
after 2000 and some files that were last modified before 2006.)

Revision 3848 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Dec 22 18:46:25 2005 UTC (14 years, 1 month ago) by glarose
File length: 76068 byte(s)
Diff to previous 3640
Gateway update:
 - correct error check in deleteUserSet to allow deletion of set versions
 - change countUserSets to only count non-versioned sets
 - add countUserSetVersions to count versioned sets
 - change listUserSets to not list versioned sets
 - add listUserSetVersions to list versioned sets
These should resolve bug #894.

Revision 3640 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 19 17:11:26 2005 UTC (14 years, 4 months ago) by jj
File length: 75066 byte(s)
Diff to previous 3485
Fix bug 819.  This adds a method to DB for getting all merged problems
for a (student,set) combination so that the problem value can be
correct.  See bug 819 for additional comments on how this affects
scoring when an individual student is given an override value for
"weight".

Revision 3485 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Aug 12 02:47:30 2005 UTC (14 years, 5 months ago) by sh002i
File length: 74287 byte(s)
Diff to previous 3398
added HiRes timing data to WeBWorK::Debug, removed WeBWorK::Timing. all
existing calls to the WeBWorK::Timing methods now pass the same messages
to debug().

added an option to WeBWorK::Debug to allow only certain subroutines to
log debug messages, in addition to the existing option to bar certain
subroutines from doing so.

Revision 3398 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jul 22 22:48:28 2005 UTC (14 years, 6 months ago) by jj
File length: 75868 byte(s)
Diff to previous 3377
Redo change allowing . in set names.

Revision 3377 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jul 14 13:15:27 2005 UTC (14 years, 6 months ago) by glarose
File length: 75857 byte(s)
Diff to previous 3284
Preliminary commit of changes to add Gateway module.
This adds to WeBWorK
 - the ability to create versioned, timed problem sets ("gateway tests")
   for which all problems are displayed on a single page ("versioned"
   means that students can get multiple versions of the problem set),
 - the ability to create sets that draw problems from groups of
   problems, and
 - the ability to create sets that require a proctor login to start
   and grade.
Sets can be defined as gateway tests or proctored gateway tests from
the ProblemSetDetail page.

Not quite bug-free yet.  Known bugs include handling of problem values
on the Student Progress page (I think this may be a problem with
changing from sql database format where all entries were 'text' to
sql_single in ver 2.1, where they are integer), and a division by zero
error on the grades page (which may be the same problem).

Tests with a number of attempts per version greater than one haven't
been carefully tested, nor has scoring of gateway tests.

Revision 3284 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Jun 10 16:01:29 2005 UTC (14 years, 7 months ago) by gage
File length: 59100 byte(s)
Diff to previous 3056
Bring HEAD and rel-2-1-patches in line with each other.

Revision 3056 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Dec 20 15:24:16 2004 UTC (15 years, 1 month ago) by sh002i
File length: 59096 byte(s)
Diff to previous 3052
escaped hyphen in r.e. to avoid interpretation as range operator.

Revision 3052 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sun Dec 19 00:53:27 2004 UTC (15 years, 1 month ago) by gage
File length: 59102 byte(s)
Diff to previous 3050
Changed
unless $value =~ m/^[\w-.]*$/

to
unless $value =~ m/^[.\w-]*$/

for some reason having the period at the end was causing the warning:

False [] range "\w-" before HERE mark in regex m/^[\w- << HERE .]*$/ at
/home/gage/webwork/webwork-modperl/lib/WeBWorK/DB.pm line 1974.

Revision 3050 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Dec 18 22:21:26 2004 UTC (15 years, 1 month ago) by gage
File length: 59106 byte(s)
Diff to previous 3019
allow . in login names   -- cross your fingers and hope this works.

Revision 3019 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Dec 7 16:04:18 2004 UTC (15 years, 1 month ago) by sh002i
File length: 59095 byte(s)
Diff to previous 2956
fixed incorrect error message for getUserProblems()

Revision 2956 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 22 23:06:44 2004 UTC (15 years, 3 months ago) by sh002i
File length: 59089 byte(s)
Diff to previous 2955
pod fixes

Revision 2955 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Oct 22 22:59:53 2004 UTC (15 years, 3 months ago) by sh002i
File length: 59102 byte(s)
Diff to previous 2864
POD fixes

Revision 2864 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Oct 7 01:39:45 2004 UTC (15 years, 3 months ago) by sh002i
File length: 59063 byte(s)
Diff to previous 2821
eliminate false positives in hashDatabaseOK()

Revision 2821 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Sep 23 18:45:48 2004 UTC (15 years, 3 months ago) by sh002i
File length: 58417 byte(s)
Diff to previous 2747
tiny doc fix -- new() takes a $dbLayout, not a $ce

Revision 2747 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Sep 8 06:38:59 2004 UTC (15 years, 4 months ago) by sh002i
File length: 58444 byte(s)
Diff to previous 2542
putPassword() and putPermissionLevel() now auto-create records that
don't exist by calling addPassword() and addPermissionLevel()
respectively. Closes bug #643.

Revision 2542 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Jul 20 23:21:40 2004 UTC (15 years, 6 months ago) by sh002i
File length: 58339 byte(s)
Diff to previous 2348
fixed hashDatabaseOK to actually add problem records for global_user as
well as set records. this is also being committed to the rel-2-0-patches
branch.

Revision 2348 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 17 20:11:17 2004 UTC (15 years, 7 months ago) by sh002i
File length: 57967 byte(s)
Diff to previous 2330
optimized the hell out of the database checking code

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

Revision 2328 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 16 17:13:28 2004 UTC (15 years, 7 months ago) by sh002i
File length: 54582 byte(s)
Diff to previous 2319
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 (15 years, 7 months ago) by sh002i
File length: 54520 byte(s)
Diff to previous 2312
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 (15 years, 7 months ago) by sh002i
File length: 54314 byte(s)
Diff to previous 2105
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 (15 years, 8 months ago) by sh002i
File length: 50237 byte(s)
Diff to previous 1976
comments

Revision 1976 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue Apr 27 03:37:56 2004 UTC (15 years, 8 months ago) by sh002i
File length: 50010 byte(s)
Diff to previous 1696
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 (16 years ago) by sh002i
File length: 49964 byte(s)
Diff to previous 1681
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 (16 years, 1 month ago) by sh002i
File length: 49729 byte(s)
Diff to previous 1672
- 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 (16 years, 1 month ago) by sh002i
File length: 49749 byte(s)
Diff to previous 1668
added "getAllGlobalProblems", similar to "getAllUserProblems".

Revision 1668 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri Dec 12 20:23:27 2003 UTC (16 years, 1 month ago) by sh002i
File length: 49046 byte(s)
Diff to previous 1663
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 (16 years, 1 month ago) by sh002i
File length: 48159 byte(s)
Diff to previous 1661
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 (16 years, 1 month ago) by sh002i
File length: 47502 byte(s)
Diff to previous 1657
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 (16 years, 1 month ago) by sh002i
File length: 46473 byte(s)
Diff to previous 1649
removed debugging statements

Revision 1649 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Dec 3 20:30:31 2003 UTC (16 years, 1 month ago) by sh002i
File length: 46518 byte(s)
Diff to previous 1641
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 (16 years, 2 months ago) by sh002i
File length: 45009 byte(s)
Diff to previous 1635
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 (16 years, 2 months ago) by sh002i
File length: 46279 byte(s)
Diff to previous 1589
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 (16 years, 3 months ago) by sh002i
File length: 45028 byte(s)
Diff to previous 1587
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 (16 years, 3 months ago) by sh002i
File length: 44902 byte(s)
Diff to previous 1586
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 (16 years, 3 months ago) by sh002i
File length: 44613 byte(s)
Diff to previous 1583
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 (16 years, 3 months ago) by sh002i
File length: 44598 byte(s)
Diff to previous 1568
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 (16 years, 3 months ago) by sh002i
File length: 42570 byte(s)
Diff to previous 1541
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 (16 years, 3 months ago) by gage
File length: 42666 byte(s)
Diff to previous 1512
Fixed spelling on "getMergedSets"
--Mike

Revision 1512 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Sep 22 17:37:12 2003 UTC (16 years, 4 months ago) by sh002i
File length: 42669 byte(s)
Diff to previous 1299
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 (16 years, 6 months ago) by malsyned
File length: 35482 byte(s)
Diff to previous 1236
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 (16 years, 7 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 (16 years, 7 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 1205 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 18 21:00:15 2003 UTC (16 years, 7 months ago) by sh002i
File length: 34552 byte(s)
Diff to previous 1201
removed unused TABLES constant

Revision 1201 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed Jun 18 19:13:53 2003 UTC (16 years, 7 months ago) by sh002i
File length: 34644 byte(s)
Diff to previous 1199
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 (16 years, 7 months ago) by sh002i
File length: 33734 byte(s)
Diff to previous 1185
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 (16 years, 7 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 (16 years, 7 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 (16 years, 7 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 (16 years, 7 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 1096 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon Jun 9 23:25:09 2003 UTC (16 years, 7 months ago) by sh002i
File length: 27901 byte(s)
Diff to previous 1035
*** empty log message ***

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

Revision 1023 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Thu Jun 5 14:39:49 2003 UTC (16 years, 7 months ago) by gage
File length: 16491 byte(s)
Diff to previous 1012
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 (16 years, 7 months ago) by sh002i
File length: 16484 byte(s)
Diff to previous 958
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 (16 years, 7 months ago) by sh002i
File length: 14332 byte(s)
Diff to previous 956
fixed several stupid errors.
-sam

Revision 956 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Fri May 30 21:09:19 2003 UTC (16 years, 7 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 (16 years, 7 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 931 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Wed May 28 19:21:04 2003 UTC (16 years, 7 months ago) by sh002i
File length: 10544 byte(s)
Diff to previous 923
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 (16 years, 7 months 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 916 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Tue May 27 23:43:47 2003 UTC (16 years, 7 months ago) by sh002i
File length: 10430 byte(s)
Diff to previous 914
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 (16 years, 7 months ago) by sh002i
File length: 10422 byte(s)
Diff to previous 909
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 (16 years, 7 months 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 904 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Mon May 26 22:13:34 2003 UTC (16 years, 7 months ago) by sh002i
File length: 10129 byte(s)
Diff to previous 874
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 (16 years, 8 months 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) - [select for diffs]
Modified Wed Apr 23 06:37:19 2003 UTC (16 years, 9 months 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 (16 years, 9 months 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 (16 years, 10 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 (16 years, 10 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.

  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