How Do I Save Customized Courses?

So, you’ve customized your WeBWorK problem sets and you want to save them for future use — but how?

The best thing to do is to only preserve the sets that you’ve customized because the course coordinator may make changes to the “standard” sets that are distributed at the start of each semester. Being more selective requires keeping track of which sets you’ve customized, and is slightly more complicated as a result — but there is benefit to doing so. By replacing only the sets which you’ve customized, you can make sure that the unmodified sets are up-to-date with any improvements made to the “standard” sets.

Here are the steps you need to follow in order to save your customized problem sets:

  1. Go to the File Manager and make sure that any pre-existing “.def” files are deleted (there shouldn’t be any, so we are just making sure). This is to ensure that all of your sets are preserved without any additional problem sets sneaking in unexpectedly.
  2. Go to the Hmwk Sets Editor and select the “export” tab. Choose the sets that you wish to preserve by using the checkboxes to the left of each problem set. Click “take action” and you will be asked to confirm the list of sets to export, click “take action” again.
  3. Go back to the file manager, you will now see newly-created files (one for each set you selected in the previous step) named “setSet_Name.def”. Select ALL of these using shift+click (or cmd+click).
  4. Advanced: if you have modified any individual problems, or written any of your own problems, you will also need to select the folders in which you saved them – edits to pre-existing problems are saved to “local/” by default, while newly-written problems are saved to “setSet_Name/” by default.
  5. Once you’ve selected all of the “.def” files (and maybe some folders, such as “local/”), click on the “Make Archive” button. This will create a file whose name matches your course name and ends with “.tgz” (e.g. MAT####-Semester-LastName-Section#.tgz)
  6. Select the new .tgz file and click download. Save this file to your local computer and remember where you put it. You do not need to open this file on your local machine.

You can now upload this archive file to any course that is created for you in the future. When you upload it to a new course using the File Manager, WeBWorK will automatically unpack the archive for you and you will see all of your .def files (as well as any folders that you might have included from the “advanced” step above).

You will be able to use these .def files to import your custom sets in the new course. If the new course already contains problem sets (it will, because of the way that our course creation process is scripted), then you will need to delete any pre-existing sets before you import your custom sets. If you selectively exported your sets, choosing only those that you modified, then instead of deleting ALL of the pre-existing sets, you should ONLY delete those sets that overlap with your customized ones.

So, when you receive login info for a new course and you want to restore your custom sets, the workflow is as follows:

  1. Go to File Manager, click “choose file” and find the .tgz archive that you downloaded from the process above. Click “upload” to upload your archive into WeBWorK. When this process completes, you should see a green bar with a message about how many files were unpacked from the archive, and you should find your .def files displayed in the File Manager.
  2. Go to Hmwk Sets Editor. Delete any pre-existing sets by using the “delete” tab, changing the dropdown from “no sets” to “selected sets” and then select the sets by using the checkboxes to the left of each set name and then “take action”. Select only the sets that you are going to replace with your own “.def” files.
  3. Now select the “import” tab, change the first dropdown to “multiple sets” and use shift+click (cmd+click) to select the sets you want to import. Your custom .def files will be at the top of the list. (Any .def file in the list which contains a “/” is not one of your custom .def files)
  4. Once you’ve selected your custom .def files, click “take action”. You should see a green bar with a message stating how many sets were imported, and you’re done!

Note: If you accidentally delete a set, you can ALWAYS restore it by using the “import” tab and then searching through the list of .def files. On our server, the “standard” version of each set is available as “setDefs/Course/setSet_Name.def”. So if you are teaching Precalculus and you accidentally deleted the “Functions – Notation” set, you can restore it by importing “setDefs/1375/setFunctions_-_Notation.def”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.