Set Definition Files

From WeBWorK
Jump to: navigation, search

A set definition file is a text file used to transferring homework set data between WeBWorK courses. It contains all the non-user-specific data pertaining to the homework set.

A set definition file consists of two sections. The first section is a line-based list of set data. The second part is a list of problems in the problem set. Blank lines are ignored, as is anything after a #.

Contents

Set data

The set data section starts at the beginning of the file. Each line of the set data section is of the form

fieldName = field value ...

The following fields are recognized:

openDate
The open date (and time) of the set; before this time students will not be allowed to view the set.
dueDate
The due date (and time) of the set; before this time students will not be allowed to submit answers for credit.
answerDate
The answer date (and time) of the set; after this time students will be allowed to view the correct answers and solutions for the problems in the set.
paperHeaderFile
Path to a PG file to use as the hardcopy header for the set. If not present, the course or system default is used. See also: Header Files and Snippets.
screenHeaderFile
Path to a PG file to use as the set header for the set. If not present, the course or system default is used. See also: Header Files and Snippets.
description
This is a description of the problem. It gets displayed to students via tooltips and is optional.

If the homework set is a gateway test, the following fields may also be present:

assignmentType
attemptsPerVersion
timeInterval
versionsPerInterval
versionTimeLimit
problemRandOrder
problemsPerPage
hideScore
hideWork
capTimeLimit

If IP restrictions are to be used, the following fields may also be present:

restrictIP
restrictLocation
relaxRestrictIP

The meanings of these fields are described in Gateway Tests and Quizzes##Set_Definition_Files_for_Gateway.2FQuiz_Assignments.

If the homework set is a Just-In-Time type set, the following fields may also be present:

restrict_prob_progression
This controls whether students must finish the current problem before they are allowed to attempt the next one. If not present the default value os 0.
email_instructor
This controls whether the course instructors are sent a notification email whenever a student fails to complete a problem after having gone through the review sequence. If not present the default value os 0.


Problem list

There are two different syntaxs for including problems into your homework. The first is the traditional method and should be used for the current release of webwork.

Version 1

The problem list section starts with the line

problemList = 

No value should follow the =. The remainder of the file is interpreted as comma-separated values. Each line represents one problem in the set. Commas are allowed in values as \,. The fields are as follows:

  1. The path to the PG source file, relative to the course templates directory.
  2. The value, or "weight", of the problem. If no value is given, a weight of 1 is used.
  3. The maximum number of attempts allowed for the problem. If no value is given or if the value is -1, unlimited attempts are allowed.


Version 2

This version is for development only. In order to use this syntax for defining problems you should start the problem list with the line problemListV2. From there it works much the same way as the set variables do above. Each line of the problem data section is of the form

fieldName = field value ...

In addition each problem block beings with the line problem_start and ends with the line problem_end. Inside a single block the following fields are recognized:

source_file
Path to a PG file to use for the problem. This field is 'required'.
value
The weight of a problem. If not present, the course or system default is used (usually 1).
max_attempts
The maximum number of attempts for the problem. If not present, the course or system default is used (usually -1 or "unlimited).
showMeAnother
The number of attempts before the showMeAnother feature becomes enabled. If not present, the course or system default is used (usually -1 or "never").
problem_id
The number of the problem. If not present, the problem will be numbered sequentially. This also supports numbers of the form "1.2.3" for Just-In-Time type sets.
counts_parent_grade
Whether this problem counts for the grade of the parent problem. This is used for Just-In-Time type sets. If not present, the course or system default is used (usually 0 or "no").
att_to_open_children
The number of attempts before the children of this problem become available. This is used for Just-In-Time type sets. If not present, the course or system default is used (usually 0).

An example problem block would look like the following

 problemListV2
 problem_start
 source_file = Library/myDefFile.def
 value = 1
 max_attempts = 2
 showMeAnother = -1
 problem_id = 2
 counts_parent_grade = 0
 att_to_open_children = 0
 problem_end
 problem_start
 source_file = Library/myDefFile2.def
 value = 2
 max_attempts = -1
 showMeAnother = 3
 problem_id = 4
 counts_parent_grade = 0
 att_to_open_children = 0
 problem_end
follow us