KB1273 - WeBWorK: Copying Homework Sets Between Courses

Tags webwork

Sometimes, it's necessary to copy a Homework Set from one WeBWorK course to another (for example, re-using a collection of useful problems without needing to search for each problem again in the Open Problem Library).

To copy a Homework Set from one WeBWorK course to another, we must export set(s) from one course, and import them into another course.

Here are the steps to follow:

First, you will archive and download the Homework Set(s) from the first course:

  • Go to the WeBWorK course with the content you want to copy from, and click on "Homework Sets Editor"
  • Select "Export" and pick the sets you want to export (or select all) and click "Take Action!".
    (The export function creates a "set definition file" (.def) for each selected Homework Set.  Each .def file has a filename matching the name of the homework set, and contains the assignment name, dates, and references to the problems being used in the set. The .def files are saved in the templates directory of the course.)
  • Go to the File Manager
  • Make sure the "templates" folder is listed, and select all .def file(s) you want to export. 
  • Click the "Make Archive" button on the right. A  .tgz archive file will be created.  You should see the new ".tgz" file listed below your .def file, using a similar file name. (A .tgz file is an archive, similar to a zip archive, that contains all the Homework Set definition files.)
  • Download the .tgz file to your computer by selecting the .tgz file and clicking the "Download" button.

Next, you will upload the archive file into the second course, and unpack ("import") it into place:

  • Go to your second WeBWorK course, and go to "File Manager".
  • Click "Choose file", select the .tgz file from your computer, and click the "Upload" button. Now your archive is physically uploaded, but still needs to be unpacked and imported into the second course.
  • To import your newly-uploaded .def file(s), go to "Homework Sets Editor", select the "Import" tab, select "Multiple Sets", and select the .def file(s) from the list, and click "Take Action".
  • Edit the assignment due dates and homework sets as needed.