Tagging Problems: Difference between revisions

From WeBWorK_wiki
Jump to navigation Jump to search
(New page: The NPL uses information embedded in WeBWorK problems as comments. The comments can appear anywhere in the file, although typically they are inserted near the top or at the very bottom of...)
 
(update contact info for OPL)
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
The NPL uses information embedded in WeBWorK
The OPL uses information embedded in WeBWorK
problems as comments.  The comments can appear anywhere in the file,
problems as comments.  Although the comments can appear anywhere in the file,
although typically they are inserted near the top or at the very
best practice is to insert them at the top of the file.
bottom of the file.


== Example ==
== Example ==
Line 8: Line 7:
A typical set of tags are:
A typical set of tags are:
<pre>
<pre>
## DBsubject('Calculus')
## DBsubject(Calculus - single variable)
## DBchapter('Limits and Derivatives')
## DBchapter(Limits and continuity)
## DBsection('The Derivative as a Function')
## DBsection(Evaluating limits - factoring)
## KEYWORDS('calculus', 'limits', 'derivatives')
## Level(2)
## TitleText1('Calculus')
## KEYWORDS('limits', 'factoring', 'rational function')
## EditionText1('5e')
## TitleText1(Calculus)
## AuthorText1('Stewart')
## EditionText1(5e)
## Section1('2.9')
## AuthorText1(Stewart)
## Problem1('22')
## Section1(2.9)
## Author('Jeff Holt')
## Problem1(22)
## Institution('UVA')
## Author(Jeff Holt)
## Institution(UVA)
## Language(en)
</pre>
</pre>
Each line is a tag.  The structure of a tag must be:
Each line is a tag.  The structure of a tag must be:
<pre>
<pre>
## Tagname('tag value')
## Tagname(tag value)
</pre>
</pre>
starting at the first character of the line, one tag per line.  The
starting at the first character of the line, one tag per line.  The
only exception is <code>Keywords</code> where a comma-separated list
only exception is <code>Keywords</code> where a comma-separated list
of values is allowed.
of values is allowed.  Quotation marks are also not required, ''except'' for keywords.


== Required Tags ==
== Required Tags ==
Line 33: Line 34:
are <code>DBsubject</code>, <code>DBchapter</code>,
are <code>DBsubject</code>, <code>DBchapter</code>,
and <code>DBsection</code>.   
and <code>DBsection</code>.   
These serve to place the problem in the [http://hobbes.la.asu.edu/Holt/chaps-and-secs-new.html hierarchical
These serve to place the problem in  
  framework] of the database.  They are essentially a generic
the [https://raw.githubusercontent.com/openwebwork/webwork-open-problem-library/main/OpenProblemLibrary/Taxonomy2 hierarchical framework] of the database.  They are essentially a generic textbook, chapter, and section for finding the problem.
  textbook, chapter, and section for finding the problem.


  By following the link to the hierarchical framework, you can see the
Problems should also have a <code>Level</code>.  Levels are described in [[Problem Levels]].
  values currently in use.  If you are tagging problems which don't
 
  seem to fit any of the categories which already present, use values
By following the link to the hierarchical framework, you can see the
  which seem appropriate, and then send the problems
values currently in use.  If you are tagging problems which don't
  to [http://math.la.asu.edu/~jj John Jones] as soon as
seem to fit any of the categories which already present, use values
  you can so that the new values can be incorporated into the official
which seem appropriate, and then send the problems
  listing linked to above.
to [https://www.citytech.cuny.edu/faculty/KParker K. Andrew Parker] as soon as
you can so that the new values can be incorporated into the official
listing linked to above.


== Optional Tags ==
== Optional Tags ==
Line 49: Line 51:
Other tags have the following meanings:
Other tags have the following meanings:
<ul>
<ul>
<li> <code>Keywords</code>: a list of keywords to facilite searching.
<li> <code>MO</code>: value is 1 if the problem uses Mathobjects for answer checking, otherwise omit, or set to 0
<li> <code>Static</code>: value is 1 if the problem is static, i.e., does not change based on random parameters
<li> <code>KEYWORDS</code>: a list of keywords to facilitate searching.
   Keywords themselves should not contain commas or quotation marks.
   Keywords themselves should not contain commas or quotation marks.
   We maintain a list of [http://hobbes.la.asu.edu/Holt/keywords.html all keywords currently in use].  If you have a keyword which seems
   We maintain a list of [http://hobbes.la.asu.edu/Holt/keywords.html all keywords currently in use].  If you have a keyword which seems
Line 64: Line 68:
   text, then use <code>TitleText1</code> etc. for the first
   text, then use <code>TitleText1</code> etc. for the first
   text, <code>TitleText2</code> etc. for the second text, and so on.
   text, <code>TitleText2</code> etc. for the second text, and so on.
   In this way, a single .pg file can be cross-referenced to many texts.
   In this way, a single <code>.pg</code> file can be cross-referenced to many texts.


<li> <code>Language</code>: code from [https://en.wikipedia.org/wiki/ISO_639-1 ISO 639.1] for the language in which the problem is written (English, French, German, etc.)  If left out, the default is English.


<li><code>Author</code> The name of the problem's author, if you are
<li><code>Author</code>: name of the problem's author, if you are
   certain of who wrote the problem.
   certain of who wrote the problem.
<li><code>Institution</code> The name of the institution where the
<li><code>Institution</code>: name of the institution where the
   problem was written, but only if you are certain of where it was
   problem was written, but only if you are certain of where it was
   written.
   written.
</ul>
</ul>
[[Category:Authors]]
[[Category:Problem_Libraries]]

Latest revision as of 18:56, 1 August 2022

The OPL uses information embedded in WeBWorK problems as comments. Although the comments can appear anywhere in the file, best practice is to insert them at the top of the file.

Example

A typical set of tags are:

## DBsubject(Calculus - single variable)
## DBchapter(Limits and continuity)
## DBsection(Evaluating limits - factoring)
## Level(2)
## KEYWORDS('limits', 'factoring', 'rational function')
## TitleText1(Calculus)
## EditionText1(5e)
## AuthorText1(Stewart)
## Section1(2.9)
## Problem1(22)
## Author(Jeff Holt)
## Institution(UVA)
## Language(en)

Each line is a tag. The structure of a tag must be:

## Tagname(tag value)

starting at the first character of the line, one tag per line. The only exception is Keywords where a comma-separated list of values is allowed. Quotation marks are also not required, except for keywords.

Required Tags

The only required tags are DBsubject, DBchapter, and DBsection. These serve to place the problem in the hierarchical framework of the database. They are essentially a generic textbook, chapter, and section for finding the problem.

Problems should also have a Level. Levels are described in Problem Levels.

By following the link to the hierarchical framework, you can see the values currently in use. If you are tagging problems which don't seem to fit any of the categories which already present, use values which seem appropriate, and then send the problems to K. Andrew Parker as soon as you can so that the new values can be incorporated into the official listing linked to above.

Optional Tags

Other tags have the following meanings:

  • MO: value is 1 if the problem uses Mathobjects for answer checking, otherwise omit, or set to 0
  • Static: value is 1 if the problem is static, i.e., does not change based on random parameters
  • KEYWORDS: a list of keywords to facilitate searching. Keywords themselves should not contain commas or quotation marks. We maintain a list of all keywords currently in use. If you have a keyword which seems to deserve a quotation mark, such as L'Hopital's rule, just omit the quotation marks so it becomes LHopitals rule.
  • TitleText1, EditionText1, AuthorText1, Section1, and Problem1. This is a cross-reference to particular problem(s) in a textbook. The value of Problem1 can be a space separated list of values, as in Problem1("2 3 4"). If you want to cross-reference a WeBWorK problem to more than one text, then use TitleText1 etc. for the first text, TitleText2 etc. for the second text, and so on. In this way, a single .pg file can be cross-referenced to many texts.
  • Language: code from ISO 639.1 for the language in which the problem is written (English, French, German, etc.) If left out, the default is English.
  • Author: name of the problem's author, if you are certain of who wrote the problem.
  • Institution: name of the institution where the problem was written, but only if you are certain of where it was written.