Log of /branches/gage_dev/webwork2/lib/WeBWorK/Utils
Directory Listing
Revision
6944 -
Directory Listing
Modified
Mon Jul 18 20:09:53 2011 UTC (22 months ago) by
gage
commit merge with trunk (localization files)
Revision
6939 -
Directory Listing
Modified
Mon Jul 18 19:16:04 2011 UTC (22 months ago) by
gage
add localizing files -- merge with trunk
Revision
6842 -
Directory Listing
Modified
Thu Jun 9 15:38:22 2011 UTC (23 months, 1 week ago) by
gage
updates from trunk
Revision
6702 -
Directory Listing
Modified
Sun Feb 6 14:48:17 2011 UTC (2 years, 3 months ago) by
gage
import from trunk
-- fix lock and release lock lines
(cosmetic change -- it doesn't matter what you call the lock)
Revision
6701 -
Directory Listing
Modified
Sun Feb 6 14:47:11 2011 UTC (2 years, 3 months ago) by
gage
add initNonNativeTables
to handle depths, location and location_address tables
Revision
6655 -
Directory Listing
Modified
Tue Dec 28 17:49:32 2010 UTC (2 years, 4 months ago) by
gage
changed all occurences of "published" to "visible" and of "unpublished" to "hidden"
also modified database.conf.dist so that visible is aliased to "published".
thus the database reference remains "published" but everything else is changed.
Next project: create an easy automatic upgrade of tables to change field name from
"published" to "visible" and then change back the database.conf.dist
Revision
6443 -
Directory Listing
Modified
Tue Sep 28 00:03:21 2010 UTC (2 years, 7 months ago) by
gage
Factored out some of the grading aspects in Grades.pm and StudentProgress.pm
The grade_sets routines in those two files are not quite compatible yet but they are getting closer.
In tandem with this I also created a module for WebworkSOAP.pm which ships grades for gateway quizzes
to Moodle in addition to grades from homework sets. It chooses the last of the versioned sets
if one has taken more than one auiz. (A useful enhancement would be to change this to allow one to take the
maximum of the tests taken.)
In the process I commented out the "Ind" Indicator column in the displays since this does little except
confuse people.
There is still room for more consolidation among the grading routines in Grades.pm, StudentProgress.pm,
Scoring.pm and probably Statistics.pm and WebworkSOAP.pm
Revision
6333 -
Directory Listing
Modified
Sat Jul 10 00:34:48 2010 UTC (2 years, 10 months ago) by
gage
Allow the path for storing the archive file to be specified in the options parameter
Revision
6299 -
Directory Listing
Modified
Tue Jun 22 14:46:58 2010 UTC (2 years, 10 months ago) by
gage
test development branch
Revision
6149 -
Directory Listing
Modified
Sat Oct 17 15:53:19 2009 UTC (3 years, 7 months ago) by
apizer
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Implement a Reduced Scoring Period. The Reduced Scoring Period is a period before the due date during which all additional work done by the student counts at a reduced rate.
Revision
6089 -
Directory Listing
Modified
Thu Jul 30 20:40:31 2009 UTC (3 years, 9 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
replaced %WeBWorK::SeedCE with
get_SeedCE($ce)
because, if the webwork server hasn't been run recently
%WeBWorK::SeedCE might not be defined.
and addcourse will fail
Revision
6043 -
Directory Listing
Modified
Thu Jun 4 01:37:44 2009 UTC (3 years, 11 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
update certain tmp files for courses automatically -- this reduces the number of error messageswhen viewing old courses.
Revision
6003 -
Directory Listing
Modified
Wed Feb 11 03:30:56 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Added ability to automatically create html_temp directory -- which is often missing if the
course hasn't been used when preparing course for archival.
Revision
5986 -
Directory Listing
Modified
Wed Feb 4 03:15:51 2009 UTC (4 years, 3 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Added code to check the directory structure of the courses (make sure all standard
directories are present and have rwx privileges available to the webserver.
No automatic repair of the directory structure is performed. (We'll see how annoying that is.)
Revision
5244 -
Directory Listing
Modified
Wed Aug 8 00:33:07 2007 UTC (5 years, 9 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Fix bug in keyword searching caused by not updating the name of related
tables in recent problem library database changes.
Revision
5221 -
Directory Listing
Modified
Thu Jul 26 18:53:08 2007 UTC (5 years, 9 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Construct additional course environments using %WeBWorK::SeedCE, which
will always have all necessary values in it. The old way broke when we
moved the definitions of $webwork_courses_* and $webwork_htdocs_* out of
global.conf and into webwork.apache[2]-config (and therefore into
SeedCE).
Revision
5201 -
Directory Listing
Modified
Sat Jul 21 16:30:38 2007 UTC (5 years, 10 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
don't use hardwired mysql and mysqldump commands.
find the location of these commands in global.conf (i.e. the course environment)
Revision
5029 -
Directory Listing
Modified
Mon Jun 25 12:10:49 2007 UTC (5 years, 10 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Changes to make unarchiving possible with a choice names for the unarchived files.
To do: Provide updating of the database. Currently there may be difficulties if the database is upgradedbetween the time the course is archived and the course is unarchived.
The behavior with sql_moodle data schemas has not been tested.
Revision
4926 -
Directory Listing
Modified
Mon Apr 9 21:01:51 2007 UTC (6 years, 1 month ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Bug fixes. $urlPath->arg("setID") isn't always defined in our calls to
Authz::invalidIPAddress, and FormatRecords needs to know about versioned
sets. The latter fixes the bug in Hardcopy that just (didn't) get fixed
with the previous (not well enough tested) fix.
Revision
4835 -
Directory Listing
Modified
Mon Mar 5 19:07:45 2007 UTC (6 years, 2 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
replace system() calls with readpipe() calls -- arguments are escaped
and stdout/stderr are captured, and exit status is reported accurately.
Revision
4758 -
Directory Listing
Modified
Tue Jan 30 21:35:28 2007 UTC (6 years, 3 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
alternate implementation of DelayedMailer that uses Mail::Sender rather
than Net::SMTP. This is somewhat more flexible, but currently doesn't
play well with Safe.pm. (I forget exactly how, but I have it on record
somewhere.)
Revision
4676 -
Directory Listing
Modified
Mon Nov 27 18:36:21 2006 UTC (6 years, 5 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
wrapper for Mail::Sender that restricts the arguemnts that can be passed
to various "dangerous" methods. It is designed for use with
RestrictedClosureClass and Safe::Hole.
NOTE THAT THIS CLASS DOESN'T PROVIDE SAFETY ON ITS OWN. READ THE
COMMENTS FOR MORE INFO.
Revision
4539 -
Directory Listing
Modified
Fri Sep 29 19:39:55 2006 UTC (6 years, 7 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
use $db->rename_tables for course renaming, remove addCourseHelper,
deleteCourseHelper, copyCourseDataHelper and associated infrastructure.
still have to do something about archive/unarchive -- they are not only
mysql specific, but they rely on the database being local, on the
default port, and named "webwork". :P
Revision
4535 -
Directory Listing
Modified
Fri Sep 29 16:52:23 2006 UTC (6 years, 7 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
use $db->create_tables and $db->delete_tables, check for dblayout
existence even if we're using the default dblayoutname, make regex and
error message match for course id checking, removal of "sql" specific
information from POD, formatting fixes, additional warnings about bad
course existence checking code.
Revision
4521 -
Directory Listing
Modified
Mon Sep 25 22:35:05 2006 UTC (6 years, 7 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
use a single username/password for connecting to the SQL database. this
means that only one DBI handle is created instead of two, and the
Driver's connect/disconnect methods are no-ops.
Revision
4395 -
Directory Listing
Modified
Thu Aug 24 21:07:51 2006 UTC (6 years, 8 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Added class to protect objects from evil prying problem code.
Uses the closure-as-object technique to protect the self hash of the
underlying object from problem code. All that the problem code sees is a
blessed coderef. The coderef is a closure over the underlying object and
the list of allowed methods. You can invoke the coderef directly, with
the name of the method to invoke as the first argument, but the class
also provides an AUTOLOAD routine that calls the coderef for you, so you
can continue to use the class as usual.
Revision
4129 -
Directory Listing
Modified
Thu Jun 15 14:48:19 2006 UTC (6 years, 11 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Implemented unarchiving function to complement archiving function.
Archive exports the course database to courseName/DATA and then tas and gzips the directory courseName to
courseDirectory/courseName.tar.gz
Unarchive allows one to choose files of the type courseDirectory/courseName.tar.gz and then
ungzip, untar them to courseDirectory/courseName -- the database record in courseName/DATA is
then loaded into the webwork database.
So far there is only minimal error checking about whether all or part of the course exists when unarchiving.
There are not yet features for archiving and then deleting a course -- these two operations have to be done
separately for now.
Revision
4115 -
Directory Listing
Modified
Wed May 31 18:41:23 2006 UTC (6 years, 11 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Fixed bug for selecting problems from the ProblemLibrary database. Problems which have no associated textbook were mucking things up, even if no textbook was selected.
Revision
4084 -
Directory Listing
Modified
Thu May 18 19:32:53 2006 UTC (7 years ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
modifications necessary to support moodle tables:
* respect non_native flag in dbLayout
With these changes, courses with the sql_moodle dbLayout can be created,
deleted, renamed, and archived using the WeBWorK course management
tools.
Revision
4083 -
Directory Listing
Modified
Thu May 18 19:32:41 2006 UTC (7 years ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
modifications necessary to support moodle tables:
* respect non_native flag in dbLayout
* don't attempt to add users if user table is non_native
* rather than checking for the string "sql_single" in renameCourse and
archiveCourse, and erroring out otherwise, we check to see if there is
a copyCourseDataHelper or archiveCourseHelper implementation
(respectively). new getHelperRef subroutine helps with this.
With these changes, courses with the sql_moodle dbLayout can be created,
deleted, renamed, and archived using the WeBWorK course management
tools.
Revision
3975 -
Directory Listing
Modified
Thu Jan 26 21:45:42 2006 UTC (7 years, 3 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
forward-port from rel-2-2-patches: (make addCourse, deleteCourse more
robust.
- pre-check permissions before trying to mkdir/rmtree
- treat creation errors on directories other than the root as warnings
- treat deletion errors on all directories as warnings
- treat sql_single "drop table" errors as warnings
- supress DBI's error reporting for command-line addcourse/delcourse)
Revision
3973 -
Directory Listing
Modified
Wed Jan 25 23:13:56 2006 UTC (7 years, 3 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
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
3892 -
Directory Listing
Modified
Mon Jan 9 23:57:28 2006 UTC (7 years, 4 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
I've modified the renameCourse code to simply issue a warning when a
course directory (other than the course root dir) is not movable. I've
also added error checking for some of the more common reasons for
directories to not be movable, so that the warning message is more
informative.
Resolves bug #943.
Originally committed to branch rel-2-2-dev.
Forward-ported without modification to HEAD.
Revision
3552 -
Directory Listing
Modified
Tue Aug 23 22:53:25 2005 UTC (7 years, 8 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Allow snippets of html (or Tex) to be specified in global.conf to be inserted right before/after the body of a problem. A commented out example which produces boxed problem in HTML is given. In this approach, the added parts are not used for problems rendered in the Library Browser or Problem Set Detail.
This addresses bug 817. This solution may not be suitable for inclusion of needed bits for modes such as asciimath or tth because the those bits of html are probably needed for display in the Library Browser. It is hard to distinguish bits which are always wanted, and those which are only wanted for use by Problem.
To make use of this, you need to update your global.conf, and make the corresponding pg update.
Revision
3528 -
Directory Listing
Modified
Sun Aug 14 16:52:11 2005 UTC (7 years, 9 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Add the beginnings of a facility for archiving a course. This method uses mysqldump
and therefore will work only with a mysql database. Many things are still hardwired
In particular mysqldump is hardwired.
The database name is hardwired to "webwork"
Archiving consists of dumping the tables associated to the course to a file
$courseID/DATA/$courseID_mysql.database (this file can be used
to created a new database for the course. it will not overwrite existing
tables however.)
Then the entire course directory is tarred and gzipped and placed
in the courses directory with the naem $courseID.tar.gz
Currently nothing is deleted from the database and no directories are deleted.
So the implementation is fairly safe, but not yet very useful for course management.
There is not yet a facility for automatically importing the archived course.
Revision
3415 -
Directory Listing
Modified
Wed Jul 27 18:48:50 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Fixed bug for problem library version 2 - now it can select problems from
all sections, or all chapters and all sections, etc.
Revision
3404 -
Directory Listing
Modified
Tue Jul 26 17:35:54 2005 UTC (7 years, 9 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Lots of indentation fixup, and started adding code for new and improved
problem library. Still compatible with current "Problem Library".
Revision
3377 -
Directory Listing
Modified
Thu Jul 14 13:15:27 2005 UTC (7 years, 10 months ago) by
glarose
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
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
3290 -
Directory Listing
Modified
Wed Jun 15 21:46:12 2005 UTC (7 years, 11 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
This change affects course creation using mysql. Field types are now
determined by DB/Record/*.pm in the function SQL_TYPES. Key fields
which are text are set to binary types (blobs) so that indexing on those
fields is case sensitive. The net result should be fast database access
while still having it be case-sensitive in the searching.
Revision
3234 -
Directory Listing
Modified
Fri May 20 16:27:43 2005 UTC (8 years ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Import and Export now create gzipped files in the template directory
of the admin course. These files can than be downloaded using
the FileManager. The export and import process are still VERY slow, but
at least it no longer matters if your browser times out.
Revision
3059 -
Directory Listing
Modified
Tue Dec 21 04:41:03 2004 UTC (8 years, 5 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Added course renaming to CourseManagement, CourseAdmin.
It works like this:
- move the course directory
- move any course subdirectories that are still at their old locations
(like if they were outside the course directory)
- create a new database using addCourseHelper()
- copy the course data into the new course database using
copyCourseDataHelper() (INSERT INTO $new SELECT * FROM $old)
- delete the old course database using deleteCourseHelper()
TODO:
* write helpers for gdbm and sql layouts
* write command-line script
Revision
2835 -
Directory Listing
Modified
Mon Sep 27 19:21:54 2004 UTC (8 years, 7 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
added dbLayoutSQLSources function to get a hash mapping DBI sources to
the username and password of the source and the tables that use the
source.
Revision
2777 -
Directory Listing
Modified
Mon Sep 13 19:34:54 2004 UTC (8 years, 8 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
disabled "sid_open", "sid_due", and "sid_answer" formats, since they
don't currenly work with timezones.
We need to find some way to get the timezone information in there
without messing up the interface. One option is to actually have the
database system aware of the timezone and propgate that information on
to the Set and UserSet Record classes. Then, add formatted pseudo-fields
to those record classes that encapsulate the date conversions. Hm, that
would be cool.
Eventually, it would be nice if the date accessors returned DateTime
objects instead of epochs, but that is for later.
Revision
2450 -
Directory Listing
Modified
Wed Jul 7 14:37:32 2004 UTC (8 years, 10 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Changed the misnamed problem_header to hardcopy_header which is a more accurate
description of the variables use.
Hardcopy.pm now consults hardcopy_header as opposed to set_header
This addresses some of the concerns in bug #556
Revision
2255 -
Directory Listing
Modified
Sat Jun 5 19:20:13 2004 UTC (8 years, 11 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
If there is an error, other than "course exists" then the directory tree
is cleared. This corrects a behavior in which the creation of the new
course would fail half way through, but the directory tree would remain
-- this made it appear as if the course existed.
-- This fix is still somewhat fragile.
Revision
2228 -
Directory Listing
Modified
Sun May 30 02:35:06 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Make the message blank when the user doesn't want problems rendered. Different modules may want different messages anyway.
Revision
2224 -
Directory Listing
Modified
Fri May 28 23:13:14 2004 UTC (8 years, 11 months ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Changed interface to renderProblems to be key=>value pairs to make it easier to extend options. New option is displayMode, which is allowed to be 'None' if you don't really want the problems rendered.
Revision
2148 -
Directory Listing
Modified
Sat May 22 01:08:09 2004 UTC (9 years ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
added ability to import the contents of another course's templates
directory when creating a new course. this is supported in bin/addcourse
with the --templates-from=COURSEID switch and in the web interface with
an additional form field.
Revision
1993 -
Directory Listing
Modified
Mon May 3 20:44:24 2004 UTC (9 years ago) by
jj
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Initial import. This may not be the right destination, especially as its
database methods become more integrated with the ones already in WeBWorK.
Revision
1945 -
Directory Listing
Modified
Mon Apr 5 03:58:30 2004 UTC (9 years, 1 month ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
preliminary web-based course creation support
try it -- create a course called "admin" the usual way and then visit it
in your browser.
Revision
1823 -
Directory Listing
Added
Mon Mar 1 00:49:25 2004 UTC (9 years, 2 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils
Added utility modules for sorting lists of records and formatting
records as strings (WeBWorK::Utils::SortRecords and ::FormatRecords,
respectively).
These modules are important because they not only know how to sort or
format records, they can also be queried for a list of sorts or formats
suitable for display, i.e. in popup menus near the list of records.
These modules are being used as the basis for a module which
encapsulates a "record list" widget.