Copying a WeBWorK Course

To copy homework sets from one WeBWorK course to another, follow the procedure below.

  1. Go to the WeBWorK course with the content you want to copy from

  2. Click on Homework Sets Editor

  3. Select "Export" and pick the sets you want to export (or select all) and click "Take Action!".  The export function creates "set definition files" for each assignment.  These .def files have a filename generated from the name of the homework set and contain the assignment name, dates, and problems. The files are saved in the templates directory of the course. 

  4. Go to the File Manager

  5. Select all the .def files you want to copy (make sure you are in the templates folder)

  6. Select "Make archive" and a  .tgz file will be created.  This is an archive (like a zip file) containing all the def files.

  7. Download the .tgz file to your computer by selecting the .tgz file and clicking the "Download" button

  8. Go to the new course â†’ File Manager

  9. Upload the .tgz file.  Click "Choose file" â†’ select the .tgz file â†’ Click Upload.  The .def files are now in your new course

  10. Go to "Homework Sets Editor" â†’ Import â†’ Multiple Sets → Select the .def files â†’ Assign students as needed â†’ Click "Take Action"

  11. Edit the assignment due dates and homework sets as needed.



Check that all the problems in each set render properly.  Sometimes problems use additional files that are only located within a course's templates folder.  If a problem is missing information it will list the location it expects the files to be.  Copy the files from this location in the original course to the same location in the new course.  See additional info below.

Copying additional problem data

If there are problems that have been added to the original course that are not part of the standard problem library, you may also need to copy the "local" folder within the templates directory.  

  1. Go to the original course

  2. Go to the File Manager

  3. Select the "local" folder.

  4. Select "Make archive" and a  .tgz file will be created.  This is an archive (like a zip file) containing the local files.

  5. Download the .tgz file to your computer by selecting the .tgz file and clicking the "Download" button

  6. Go to the new course â†’ File Manager

  7. Upload the .tgz file.  Click "Choose file" â†’ select the .tgz file â†’ Click Upload.  The local files are now in your new course

Check to see if the homework sets now render properly.

Optional Clean up Step

If copied several times, your course may end up with lots of .def files in the templates directory.  If you have already imported the homework sets, you can delete the extraneous .def files using the functions in the File Manager



Ways you can contact ITS or find information:

ITS Support Portal: https://support.swarthmore.edu
Email: support@swarthmore.edu
Phone: x4357 (HELP) or 610-328-8513
Check out our remote resources at https://swatkb.atlassian.net/wiki/spaces/remote/overview
Check our homepage at https://swarthmore.edu/its