Problem Authoring Background Information

From WeBWorK_wiki
Jump to navigation Jump to search

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

  • Client-side
    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 (.doc, .rtf, etc.) file. All problem files have the same general format, given by this sample file.

    In the long term it will be to your advantage and others' if you adhere to the good problem coding standards suggested in this file: include problem tagging, description, and solutions.

  • Server-side
    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. (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)

Next Steps

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.