Documentation:WeBWorK/How to contribute to UBC Library

From UBC Wiki

How to Contribute to UBC Library

This page is primarily for WeBWorK problem authors. Please note that the workflow has been updated as of Dec 18, 2016.

So you have developed some WeBWorK questions within your local directory in your sandbox course and you would like to reuse them easily... or share them with your colleagues or even the rest of the world. It would be good to contribute them to the UBC WeBWorK Problem Library, which is a subtree of the WeBWorK Open Problem Library (OPL). You will need to send them to the OPL contrib directory first. Once they are merged into OPL, we can pull them into UBC library and they will be deployed to the UBC WeBWork production server within 24 hours. To include the problems into OPL main directory (OpenProblemLibrary directory), Someone from Open WeBWorK will need to review them before moving to OPL main directory.

Before Submitting Problems

Tag Problems

The WeBWorK OPL uses different tags to organize the problems in the library and people will also use those tags to find related problems. So it is very important to tag your problems correctly. Please follow the links below for more details:

  • Tagging Problems
  • Most Up-to-date Taxonomy: https://github.com/ubc/webwork-open-problem-library/blob/master/OpenProblemLibrary/Taxonomy and https://github.com/ubc/webwork-open-problem-library/blob/master/OpenProblemLibrary/Taxonomy2

If you have a new subject or section you would like to add to the taxonomy, please send an email to [[1]].

Organize Problems

You may want to organize your problems either by course subject and number or by problem topic so that your problems can be easily found when searched by others under "UBC Library"

  • If you would like to organize by course subject and number, the directory structure should be similar to: "MATH/MATH101/PROBLEM_NAME.pg" or "STAT/STAT200/PROBLEM_NAME.pg"
  • If you would like to organize by problem subject, the directory structure should be similar to: "setContinuity/PROBLEM_NAME.pg"

Submit Problems

We are currently using Github to manage the problem repository. You need to create an account and be able to login in order to submit your own problems.

For Non-Git Users

If you have never used git before or don't have git installed on your computer, you will need to fork the repository first. Then you can go to https://github.com/YOUR_USERNAME/webwork-open-problem-library/tree/master/Contrib/UBC and start by adding or editing your WeBWorK problems.

  • To add a new problem, click the plus (+) sign at the end of path. If you need to create the file in a new directory, you can use the following format: DIRECTORY_NAME/myproblem.pg in the "Name your file..." textbox.

Create a New File

  • To edit a file, just find the file and click on Edit button on top right corner.

Edit a File

  • Once you finish editing, PLEASE put in a commit message and description so that other people can easily understand your changes. Then click on "Commit Changes".

For Git Users

You need to fork https://github.com/openwebwork/webwork-open-problem-library first. After adding/editing the problems, commit your change and push them to your forked repository.

NOTE: Only add new problems to the Contrib directory if they are not reviewed and moved to OpenProblemLibrary. Otherwise, they will be rejected.

Sending Pull Request

If you are satisfied with your changes, you need to send a pull request (PR) to let the person who is managing OPL repo know. The PR is usually merged into the Contrib directory within a few days.

Once the PR is merged, you need to send an email [[2]] to let UBC WeBWorK administrators know that you have added/updated the OPL. Please include the PR link in the email so we know what's changed. We will pull your change down from upstream and include in the UBC repository.