# Wiris Quizzes generic

## Levels of integration

To start with Wiris Quizzes generic, you will first need to choose how deep your integration is going to be. Thus, we define three levels of integration:

#### Level 1

For short questions types, use the **validation** web service to validate the correct answer with the answer of the student. The validation criteria will be always the mathematical equality (for example, 2+x is equal to x+2). You might or might not allow your student to input the answers using the MathType (which always includes the input syntax check).

#### Level 2

For short answer question types, you can integrate our rich assertion builder called **Wiris Quizzes Studio** to allow your authors to choose the correctness grading criteria. For example, would be a wrong answer if the author requested a simplified response. Thus, "simplified" is one of the possible criteria that can be chosen with the WIRIS Studio.

#### Level 3

Use the generation of **random questions**. You can add this feature to any question type (multiple-choice, true/false, matching, essay, etc.) in addition to the short answer question type.

## Getting started

You can visit the Wiris Quizzes generic getting started downloads to get the ready to download and use demos. Please, you can check the getting started demos in execution:

## Features

### Gaps to fill in

You can provide a template for students to use for their answer.

By default, the system provides the student a blank field in the editor. If you prefer, you can also include any initial content. You can make the content into a template for the answer, by using the custom attribute `wrs:positionable="false/true"`

. We describe how…

See the MathML for the previous formula:

All the formula is marked `wrs:positionable="false"`

; the student cannot edit or add to this part. To create the part of the answer for the student to complete, add `<mrow wrs:positionable="true"/>`

to the MathML. This will appear as a green box to the student.

### Question algorithm parameters

Wiris Quizzes allows for the possibility of adding parameters to question algorithms. This may be useful if we want to create several questions about the same mathematical expression, if we want to chain some questions (in the sense that some output from a question is used in the algorithm of the following one) or other uses.

This feature is available through the Wiris Quizzes generic integration library. Therefore the author will be able to use this feature only if the platform integration provides a way to do it. The way it must be used will heavily depend on the integration.

#### How to do it

Parameters must be defined in algorithms using the keyword *parameter*. For example:

Then, once instantiated the question, the platform integration may use the API function QuestionInstance.setParameter to overwrite the values of the parameters. The integration needs to manage where to store and find the actual parameter values for each question instance.

Following the same example, we could have the code in the platform integration:

... QuizzesBuilder builder = QuizzesBuilder.getInstance(); Question question = ... QuestionInstance instance = builder.newQuestionInstance(question); instance.setParameter("p1", "<ms>Linear polynomial</ms>"); instance.setParameter("p2", "<ms>Nonlinear polynomial</ms>"); instance.setParameter("p3", "<mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow>"); ...

When the algorithm evaluates, the values of the parameters defined in the algorithm will be overriden by the values specified by the integration. If some parameters are not specified, the values deined in the algorithm will be used.