# GatewayQuiz Assignment Problems

> (back to) Main GatewayQuiz Documentation

In general, any problem that can be used in a regular homework assignment may be used in a GatewayQuiz assignment. There is one exception to this rule, viz., problems that use `NAMED_ANS_RULE`

, which are not compatible with GatewayQuiz assignments. And GatewayQuiz assignments also allow problems to be selected from problem groups, as described below.

## Problem Groups in GatewayQuiz Assignments[edit]

In some cases where GatewayQuiz assignments are used, it is desirable to have the problem that a student works drawn from a bank of possible questions. For example, in a *gateway test* over differentiation, the test may be defined to include one product rule question, one quotient rule question, two chain rule questions, etc. Rather than try to code all possible product rule questions into one problem, we might have a large number of different problems that require the product rule, and select one of those for each version of the GatewayQuiz that a student takes.

This is accomplished for GatewayQuiz assignments by first defining the group of problems (say, product rule problems) as a homework set (which may be a set assigned to users, but is more likely to be a set that is created in the course but then never assigned to anyone). This set will contain all product rule problems from which a problem is to be selected for each version of the GatewayQuiz assignment. Thus, we might define a set called `product_rule`

that contains all of the product rule problems we want for our differentiation gateway test.

Then, in the GatewayQuiz assignment, the *Source File* for the problem is specified as `group:setName`

, e.g., `group:product_rule`

. Then when a user who is assigned the gateway/quiz starts a new set version, the version will include a randomly selected problem from the indicated set. If two problems are included from the same group, that is, if we specified `group:product_rule`

for the source file of two of the problems in our differentiation gateway, the two problems that are selected will be different (that is, duplicate problems will not be selected when a new set version is created).

A more detailed explanation of this process is given in the Selecting Problems from Problem Groups document.

*Up to: table of contents*

## NAMED_ANS_RULE and Other Problem Types[edit]

An unfortunate consequence of the manner in which GatewayQuiz assignments keep track of the problems on the assignment is that they rely on being able to keep track of the names that WeBWorK assigns to the answer blanks in the assignment. This means that problems that use `NAMED_ANS_RULE`

cause unsurmountable problems for the GatewayQuiz module, and they thus cannot be used in GatewayQuiz assignments.

However, there are a couple of positive points that should be made about this restriction. It does * not* apply to problems using

`ans_array`

or `parserMultiAnswer`

(see, for example, the multi-answer problem code snippet or cvs documentation for multi-answer problems). Most problems that currently use `NAMED_ANS_RULE`

can probably be rewritten as multi-answer problems or by using custom answer checkers (c.f. also, the MathObject custom answer checker), which are compatible with GatewayQuiz assignments.
*Up to: table of contents*