Editing Problem Files

From WeBWorK
Jump to: navigation, search

Prep 2011 Main Page > Web Conference 1 > Editing Problems

Contents

Instructions for Editing WeBWorK Problems

Overview

These instructions are designed to be step-by-step instructions on how to create problems in the WeBWorK PREP 2011 course that we have available for our workshop. The outline of the steps is here, and each step is explained in greater detail below.

  1. Log in to the PREP 2011 course, https://test.webwork.maa.org/webwork2/PREP_2011/.
  2. Use the File Manager to copy the sample problem to a new name, possibly in a sub-directory.
  3. Edit the file using WeBWorK's editor to create your new problem.

Detailed Instructions

1. Log in to the PREP 2011 course. This should be straightforward. The URL is https://test.webwork.maa.org/webwork2/PREP_2011/, and your username and password were e-mailed to you.

2. Use the File Manager to copy the sample problem to a new name, possibly in a sub-directory.

  1. Click the File Manager link on the left side-bar, in the Main Menu for WeBWorK. You will then see that you are in the templates directory. Notice that there is a sampleProblems subdirectory listed (at this instant, the 7th entry in the list in the select box).
  2. Click the sampleProblems subdirectory and, if you don't immediately go to that, click the View button at the top right of the actions buttons. You will then see the problem sample_problem.pg. This is the Sample Problem that Paul used in his presentation, and is a good template to modify as you work on your own problems.
  3. Copy the sample problem to a new name so that you can edit it: click on the sample problem, and then click the Copy button. Name the file something appropriate: because we are all working in the same course, it is a good idea to include some part of your username in the name of the file you create. For example, I might create a copy called "gavin_problem1.pg".

3. Edit the file using WeBWorK's editor to create your new problem. You can edit the problem from the File Manager, but it is convenient to do it from the Library Browser instead, because that allows you to also try the problem you create.

  1. Click the Library Browser link on the left side bar, in the Main Menu. This brings up the browser that lets you look at problems in this course, or in the NPL.
  2. In the Browse row, under the first bold black horizontal line, click the Local Problems link to view the problems in this course.
  3. Then click the Select a Problem Collection selector in the section below the Browse area, and select sampleProblems (or, if you put your file somewhere else, to that location).
  4. Click the View Problems button to see the problems in that directory. Then scroll down until you see your problem (look for the correct File name: I'm looking for sampleProblems/gavin_problem.pg). Then click the Edit it link.

Notes About the WeBWorK Editor

Notice that the Edit It link opens the editor in a new window (or tab).

After you have edited the file, you will need to save it. Scroll to the bottom of the editor window to do this. In that you already copied the problem to a new name, it is save to select the option Save as [TMPL]/sampleProblems/your_problem_name.pg and View. Then click the Take Action! button. Note that if you don't unclick the in another window checkbox, you will open a new tab or window with your new version of the problem. You can then go back and forth between the edit window and viewing window each time you make an edit and save the problem.

A Note About Directories

You may want to create a subdirectory in the sampleProblems directory, or in the main templates directory, in which to save your problems and work. You can also do this using the File Manager.

follow us