Log of /branches/rel-2-3-exp/webwork2/lib/WeBWorK/Utils
Directory Listing
Revision
4657 -
Directory Listing
Modified
Wed Nov 22 17:18:09 2006 UTC (6 years, 6 months ago) by
This commit was manufactured by cvs2svn to create branch 'rel-2-3-exp'.
Revision
4539 -
Directory Listing
Modified
Fri Sep 29 19:39:55 2006 UTC (6 years, 8 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, 8 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, 8 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, 9 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 (7 years 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 (7 years 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, 1 month 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, 1 month 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, 4 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, 4 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, 5 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, 9 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, 10 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, 10 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, 10 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, 11 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 (8 years 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, 1 month 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, 8 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, 9 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, 11 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 (9 years 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
2224 -
Directory Listing
Modified
Fri May 28 23:13:14 2004 UTC (9 years 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, 1 month 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, 1 month 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, 2 months 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, 3 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.