Log of /branches/gage_dev/webwork2/lib/WeBWorK/DB.pm
Parent Directory
Revision
6288 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon May 31 15:47:52 2010 UTC (2 years, 11 months ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 69288 byte(s)
Diff to
previous 6270
,
to
selected 1663
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
4923 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 4 15:06:01 2007 UTC (6 years, 1 month ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 63636 byte(s)
Diff to
previous 4919
,
to
selected 1663
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
4918 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 30 19:07:55 2007 UTC (6 years, 1 month ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 63442 byte(s)
Diff to
previous 4912
,
to
selected 1663
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
4904 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Mar 27 17:04:02 2007 UTC (6 years, 1 month ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 63384 byte(s)
Diff to
previous 4886
,
to
selected 1663
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
4690 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 1 17:06:40 2006 UTC (6 years, 5 months ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 48273 byte(s)
Diff to
previous 4648
,
to
selected 1663
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
4558 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 6 21:17:40 2006 UTC (6 years, 7 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 46178 byte(s)
Diff to
previous 4557
,
to
selected 1663
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
3848 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Dec 22 18:46:25 2005 UTC (7 years, 5 months ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 76068 byte(s)
Diff to
previous 3640
,
to
selected 1663
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 (7 years, 8 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 75066 byte(s)
Diff to
previous 3485
,
to
selected 1663
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 (7 years, 9 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 74287 byte(s)
Diff to
previous 3398
,
to
selected 1663
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
3377 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 14 13:15:27 2005 UTC (7 years, 10 months ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 75857 byte(s)
Diff to
previous 3284
,
to
selected 1663
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
3052 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Dec 19 00:53:27 2004 UTC (8 years, 5 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 59102 byte(s)
Diff to
previous 3050
,
to
selected 1663
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
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
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 49964 byte(s)
Diff to
previous 1681
,
to
selected 1663
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
1663 -
(
view)
(
download)
(
as text)
(
annotate)
-
[selected]
Modified
Tue Dec 9 01:12:32 2003 UTC (9 years, 5 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
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 (9 years, 5 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 47502 byte(s)
Diff to
previous 1657
,
to
selected 1663
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
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
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 44598 byte(s)
Diff to
previous 1568
,
to
selected 1663
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
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
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 35479 byte(s)
Diff to
previous 1226
,
to
selected 1663
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
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
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 32821 byte(s)
Diff to
previous 1108
,
to
selected 1663
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
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
Original Path:
trunk/webwork2/lib/WeBWorK/DB.pm
File length: 14155 byte(s)
Diff to
previous 953
,
to
selected 1663
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
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.