Problem Authoring Background Information
Background Information on Problem Authoring
All WeBWorK problems are read from text files that are written in a language called PG (for Problem Generation) and stored on the WeBWorK server. Thus, to create new problems, one has to edit a file and ensure that it is on the server in a location that is accessible to WeBWorK.
Editing problems locally requires only that one have some editor to create the problem files: emacs, vi, TextEdit, NotePad, or even something like Word or WordPerfect. Be sure that you save the file that you create as a text file, not as a formatted (
.rtf, etc.) file. All problem files have the same general format, given by this sample file.
There is also a very simple built-in editor in WeBWorK that can be used to edit problems. Access to this is obtained by looking at an existing problem in the Library Browser or in an existing problem set, and then clicking the "Edit" link that appears by the problem. You can also use this editor to create new problems: edit a problem, and create a copy of it to use for your new problem. As before, it's a good idea to follow the format suggested by the sample problem file. (need information about this process?)
Ensuring Server Access
If an existing problem is edited using the built-in WeBWorK text editor, the problem that is created will be automatically put in a location that the WeBWorK server is able to find.
Problems edited on the client computer with a different editor must be moved to the server so that WeBWorK can find them. This is most easily done by uploading the file using WeBWorK's File Manager. All problem files located in the
templates directory in a course are accessible by WeBWorK for use in that course. (need link to information about library/linked problems)
A good next step is to look at the basic problem templates, and subsequently the more advanced problem examples. If you are coding a problem and are looking for a specific technique, you may want to consult the index of problem coding techniques.