CourseUpgrade

From WeBWorK_wiki
Jump to navigation Jump to search
This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.

Sharing the courses directory

To use all courses under WW1 and WW2 simultaneously, the two systems must share a courses directory. If you have an existing WW1 installation, the easiest way to do this is to direct WW2 to find courses in the WW1 courses directory. To do so, change the following variables in global.conf:

change... to...
$webworkDirs{courses} the path to your WeBWorK 1 courses directory
$$courseURLs{html} the URL of your WeBWorK 1 courses directory

Sharing individual courses

You may want to allow only particular courses to be accessed via WeBWorK 2. To do this, create a symlink in the WeBWorK 2 courses directory pointing to the course's directory (in the WeBWorK 1 courses directory). The symlink should have the same name as the course.

For example:

$ cd /opt/webwork/courses
$ ls
drwxr-xr-x    4 hathaway admin         136 Jan 27 19:46 mth141
drwxr-xr-x    4 hathaway admin         136 Jan 27 19:46 mth142
drwxr-xr-x    4 hathaway admin         136 Jan 27 19:46 mth143
drwxr-xr-x    4 hathaway admin         136 Jan 27 19:46 mth161
$ cd /opt/webwork2/courses
$ ln -s /opt/webwork/courses/mth141 mth141
$ ls -l
lrwxr-xr-x    1 hathaway admin          14 Feb 15 15:24 mth141 -> /opt/webwork/courses/mth141/

Modifications to the course

Since the final release of WeBWorK 2, the system can automatically upgrade courses from WeBWorK 1. For this to work, the default database layout set in global.conf must be set to "gdbm". The first time you log into a course from WeBWorK 1, you will be prompted to upgrade the course's database to work with WeBWorK 2. These changes are backwards compatible and will not affect your ability to use the course under WeBWorK 1.

If the default database layout is not "gdbm", or you wish to upgrade courses manaually, follow the instructions below.

WeBWorK 2 represents "global" problem sets and problem separately from "user" problem sets and problem, which have been assigned to users. This allows you to create or import problem sets before assigning them to individual users. It also allows you to maintain "global" set and problem data (dates, problem values, etc.) which can be overridden for individual users without losing the defaults.

To accommodate this functionality in a backwards-compatible way, WeBWorK 2 designates a single user as the "global user". The data contained in sets and problems assigned to the global user are treated as the global values. We recommend creating a dedicated user (with no purpose) to serve as the global user. We recommend using the user ID global_user.

  1. Log into the course using WeBWorK 1, and
    1. create a user with the user ID global_user. no one will be logging in as this user, so give it a secret password.
    2. build all sets for the user.
  2. Create a file in the course directory named course.conf. Place the following lines in the file:
$dbLayoutName = 'gdbm';
*dbLayout = $dbLayouts{$dbLayoutName};

$dbLayouts{gdbm}{set}->{params}->{globalUserID} = 'global_user';
$dbLayouts{gdbm}->{problem}->{params}->{globalUserID} = 'global_user';

Yon can now open the course under WeBWorK 2. Verify that all sets are visible in the Set List in the Instructor Tools.

Accessing courses through WeBWorK 2

On the home page WeBWorK 2 installation (usually located at http://yourserver.yourschool.edu/webwork2/), a list of accessible courses is shown. You can also access a course directly by appending the course name to the WeBWorK 2 URL. For example, http://yourserver.yourschool.edu/webwork2/2004_01_MTH_141/.

-- Main.SamHathaway - 14 Feb 2004