Creating a Course

The base to create a course is located in /usr/local/webwork/courses/blankCourse. The course we are going to create now will be called yourCourseName (You may replace the name “yourCourseName” with any name you like)

Each course has a UNIX user group associated with it. The group should contain any users who should be able to view or edit the course files directly (such as the professor and any teaching assistants), and the system user under which the web server runs, wwserver.

Step1. Ask Mr. Holland to create an account for yourself and create a group named yourGroupName for your course:

> groupadd yourGroupName
> usermod -G yourGroupName,all-other-groups wwserver
> usermod -G yourGroupName <your username>
> usermod –g wwserver <your_username>
> /usr/local/bin/ww restart
 
Note: This step is to be done by Mr. Holland or other system administrators.
 
Ask Mr. Holland to add a path in your .bash_profile or .bashrc file
 
PATH="/usr/local/webwork/system/scripts:$PATH";

Step 2. Log into your account and make a copy of blankCourse called yourCourseName and add some problem set templates to it. Type:

> cd /usr/local/webwork/courses
> cp -R blankCourse yourCourseName
> cd yourCourseName/templates
> cp -R /usr/local/webwork/templates/(yourcoursenumber)/set* .
 
“yourcoursenumber” is the ASU course number without sections.

Step 3. WeBWorK comes with a script which completes the setup of a new course. We'll run it now:

> cd /usr/local/webwork/courses/yourCourseName
> course_webwork_setup.pl

This script will ask you several questions about the environment in which the course will be used. Read the information given with each choice carefully. Recommended choices are as follows:

Q: Do you wish to setup a "working" or a "demo" version? (w or d)
A: w
Q: Do you want to create missing directories (if any)? (y or n)
A: y
Q: ENTER course URL
A: type “/webwork/yourCourseName” and press ENTER
Q: ENTER cgi WeBWorK URL
A: press ENTER to accept the default /cgi-bin/webwork/system
Q: ENTER course link (i.e. classID) name
A: Type “yourCourseName” and press ENTER
Q: ENTER group name
A: yourGroupName
Q: Do you want to create a new webworkCourse.ph...?
A: y
Q: Do you want to create a new index.html...?
A: y
Q: Do you want to set the group for all directories and files?
A: y
Q: Do you want to set default "working" permissions for all directories
   and files?
A: y

Step 4. We'll now make the template directory setgid so that new problems and problem sets will get the correct group and permissions.

> chmod g+s templates

Step 5. To let the WeBWorK system know that it has a new course, add a symlink to yourCourseName in the system/courses directory. If you do not do this, the WeBWorK system will not be able to access the course — this is a good way to "turn off" a course.

> ln -s /usr/local/webwork/courses/yourCourseName /usr/local/webwork/system/courses/

Step 6. Each course has a "visible" interface in the webwork directory on the web server's document root. This allows the course home page to be accessed via http://lrc.alasu.edu/webwork/yourCourseName/ rather than having to call the login script directly. As a normal user, create this link:

> ln -s /usr/local/webwork/courses/yourCourseName/html /usr/local/apache2/htdocs/webwork/yourCourseName

Step 7 Now, we're going to run some scripts to finish setting up the course:

> cd /usr/local/webwork/courses/yourCourseName/templates
> import_classlist-database.pl yourCourseName defaultClasslist.lst
> setProfPermissions.pl yourCourseName professor

There. You've finished the yourCourseName setup. The process for setting up additional courses is identical to this. To verify that you've set everything up properly, view the following URL in your browser: http://lrc.alasu.edu/webwork/yourCourseName/

You should see your newly-generated course index page. If this works, click the Login button and enter the following information:

login:    professor
password: 111-11-1111

It's a good idea to change your password immediately to prevent unauthorized access.

You should be logged in as the professor. This means you will see a link for Click Enter Professor's Page. Click on it.

Before you do anything, you have to build some sets. This will test to make sure that all of the problem rendering methods work. First, click Enter Build Problem Set Page which should be the only option you see. Then, select one or more problem sets from the list and click Build Problem Set(s). WeBWorK will report that the problem sets have been built. At the bottom of the resulting page, click Problem Sets.

Now that the sets have been built, you can test various methods of displaying them. Select a set, select PDF form and click Get_hard_copy. After a moment, WeBWorK will send you a PDF file. Acrobat may open automatically, or you may have to wrestle with your browser a bit to see it.

Next, we can check onscreen display. Select a problem set and click Do_problem_set. View several problems from the set on all three display modes: text, raw TeX source code, formatted- text, TTH output, and typeset, LaTeX2HTML output. Typeset mode takes quite some time on the first view of any problem as it has to generate images for the equations. However, subsequent views take advantage of cached temp files.

Return to the Professor's Page and now you will see a large number of utilities which you can use in administering a WeBWorK course.