Log of /branches/rel-2-4-dev/webwork2/lib/WeBWorK/Utils/CourseManagement/sql_single.pm
Parent Directory
Revision
4129 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jun 15 14:48:19 2006 UTC (6 years, 11 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils/CourseManagement/sql_single.pm
File length: 16701 byte(s)
Diff to
previous 4084
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
3975 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jan 26 21:45:42 2006 UTC (7 years, 3 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils/CourseManagement/sql_single.pm
File length: 15074 byte(s)
Diff to
previous 3973
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
3528 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Sun Aug 14 16:52:11 2005 UTC (7 years, 9 months ago) by
gage
Original Path:
trunk/webwork2/lib/WeBWorK/Utils/CourseManagement/sql_single.pm
File length: 15007 byte(s)
Diff to
previous 3290
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
3059 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Dec 21 04:41:03 2004 UTC (8 years, 4 months ago) by
sh002i
Original Path:
trunk/webwork2/lib/WeBWorK/Utils/CourseManagement/sql_single.pm
File length: 12126 byte(s)
Diff to
previous 2683
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
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.