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:
- 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.
- 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.
- 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).
- 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.
- 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)
- 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:
- 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.
- 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.
- 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)
- 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”.