Course setup - automated version (perl script)

  1. First, you will have to do everything twice -- once for the main course and once for the development directory.

  2. Determine the course name, which we will call theCourse in this document. You can determine the canonical course name by running the script:
    /usr/local/webwork/courses/course-template/WeBWorK_coursename.pl
  3. As a high powered user (like root), make some directories and links:
    mkdir /usr/local/webwork/courses/theCourse
    mkdir /usr/local/webwork/courses/theCourse/html
    ln -s  /usr/local/webwork/courses/theCourse/html /var/www/webwork/theCourse
    ln -s /usr/local/webwork/courses/theCourse /usr/local/webwork/system/courses/theCourse
    	

  4. Run the WeBWorK_script.pl in /usr/local/webwork/courses/course-template and answer the questions accordingly:
    cd /usr/local/webwork/courses/course-template/
    ./WeBWorK_script.pl theCourse
    	
  5. Edit the file webworkCourse.ph:
    $Global::feedbackAddress  = 'webwork@math.wustl.edu, the_professor@math';
    $allowDestroyRebuildProbSets = 1; (if Dev directory)
    	
    (I have had trouble with the screwing up the group of this file. Make sure the group is wwcourses.)

  6. Since all new courses will have setDemo, you might want to change the open and due dates for this set in setDemo.def (in the course-template/templates/ directory) to something that makes sense.

  7. Double check that the group for all these is wwcourses

Course Setup - Setting up a new course by hand

  1. Determine the name for the course. We will call the course name theCourse throughout this document.
    cd /usr/local/webwork/courses/course-template/
    ./WeBWorK_coursename.pl
    	
  2. Create the directory and change the group
    mkdir /usr/local/webwork/courses/theCourse
    chgrp wwcourses /usr/local/webwork/courses/theCourse
    	
  3. Copy the appropriate files to the new directory. (The tar command is to preserve permissions, attributes, links, etc. It will not preserve the group ownership though. cp works fine too.):
    cd /usr/local/webwork/courses/course-template
    tar cf - . | (cd /usr/local/webwork/courses/theCourse ; tar xvf -)
    	
    Or just simply:
    cp -R /usr/local/webwork/courses/course-template/* /usr/loca/webwork/courses/theCourse 
    	
  4. Run the course setup script in the directory /usr/local/webwork/courses/theCourse:
    cd /usr/local/webwork/courses/theCourse
    course_webwork_setup.pl
    
    Hit [Enter] to continue: [Enter]
    
    Do you wish to continue? (y or n): y
    
    Do you wish to setup a "working" or a "demo" version? (w or d): w
    
    Do you want to create missing directories (if any)? (y or n): y
    
    ENTER course URL: /theCourse
    
    ENTER cgi WeBWorK URL: /cgi-bin/webwork/system
    
    ENTER course link (i.e. classID) name: theCourse
    
    ENTER group name: wwcourses
    
    Do you want to create a webworkCourse.ph file? (y or n): y
    
    Do you want to create an index.html file? (y or n): y
    
    Do you want to set the group for all directories and files? (y or n): y
    
    Do you want to set default "working" permissions for all directories and files? (y or n): y
    	
  5. Make sure the DATA directory we copied over is really empty (they should be):
    cd /usr/local/webwork/courses/theCourse/DATA/
    rm -f *
    cd .auth
    rm -f*
    	
  6. Make a link so that the webserver can find the directory:
    ln -s  /usr/local/webwork/courses/theCourse/html /var/www/webwork/theCourse
    	
  7. Make a link so that WeBWorK can find the directory:
    ln -s /usr/local/webwork/courses/theCourse /usr/local/webwork/system/courses/theCourse
    	
  8. Modify the webworkCourse.ph file. There are more places to modify as desired, but the following should be changed. Perhaps the course instructor should be in the emails too. The descriptions of what is being changed is in the file comments. (I don't know if the course setup script needs to be run again or not.)
    #  $Global::feedbackAddress  = 'apizer@math.rochester.edu,gage@math.rochester.edu';
    $Global::feedbackAddress  = 'blake@math.wustl.edu,slxiao@math.wustl.edu';
    
    #  $Global::smtpSender  = 'apizer@math.rochester.edu';
    $Global::smtpSender  = 'blake@math.wustl.edu';
    
    #$PG_environment{'PRINT_FILE_NAMES_FOR'} = ['leeza','apizer','gage'];
    #  (all admins should be listed here)
    $PG_environment{'PRINT_FILE_NAMES_FOR'} = ['blake'];
    	
  9. Clean up the webwork generated html file (this should be automated with a script, but its not yet!) (/usr/local/webwork/courses/theCourse/html/index.html)

    I just clean up the class name and erase the login stuff for practice users and erase the webwork link.

  10. Set the group setid (most importantly the template and html directories)
    chmod g+ws `find /usr/local/webwork/courses/theCourse/* -type d`
    chmod -R g+w /usr/local/webwork/courses/theCourse/*
    	

    The group is very important and more than once I've been stung by editing files to have the group change (oops! -- making things not work.). So, anytime a file is edited and changed, you might want to check group permissions (such as when you edit webworkCourse.ph).

  11. Download the class roll. This is different for development directories and normal directories. In any case, everything will have to happen in the directory theCourse/templates/ Note, at this point, nothing has really changed on the system with rolls. We need to add groups information first (next step).

    Move the newly created .lst file into the templates directory.

  12. In theCourse/templates/ directory we now run the command. After this changes to the .lst database have to be made from the web.
    import_classlist-database.pl theCourse theCourse.lst
    	
  13. Set professor permissions. TA permissions can also be set using setTAPermissions.pl.
    setProfPermissions.pl theCourse loginName
    	
  14. Login as professor and change password.
  15. Start building problem sets!