Note: Creating Custom Questions is an advanced feature. Contact Pearson Connexus support (844-597-3224) or the account manager for more information.
Pearson Connexus provides various predefined question types (e.g., multiple choice, matching, short answer, true/false). To use a question that does not fit the predefined types, create a Custom Question.
Custom Questions can have one or more of five possible rendering modes:
- Active: The user is currently taking the exam.
- Review: The user is reviewing the answers and feedback from the exam.
- Print: The Teacher is printing a paper copy of the exam.
- PrintKey: The Teacher is printing a paper copy of the exam with the correct answer key.
- Template: An author is creating a new custom question of this type. This mode provides a question template for the new question.
Custom Questions indicate which of these modes they control. In the simplest case, a custom question controls only one, usually the Active mode.
Defining Custom Questions
Define Custom Questions with XML and store them as a course resource, or return it from a web service call on an externally hosted server.
The <custom>
XML tag lets Teachers pick which question behaviors they want to customize using this format:
<custom>
<body[mode="string"]>html</body>
...<display>string</display>
[<score>url</score>]
[<publicdata>string</publicdata>]
[<privatedata>string</privatedata>]
<version>string</version>
</custom>
For example, a Teacher could provide a custom display for multiple-choice questions while still using standard, built-in scoring and reporting; or the Teacher could implement all aspects of the question, including rendering, grading, and printing.
Review the table to learn which elements/attributes are definable and what they are.
Element | Attribute | Description |
---|---|---|
custom/body | The HTML and Javascript render the question, store student answers, and optionally score them. To retrieve and store data, it calls Custom Question JavaScript API methods such as CQ.getInfo , CQ.setAnswer , and CQ.onBeforeSave .The HTML may contain:
document.write . |
|
mode (optional) | A comma-separated list of rendering modes is available for this body tag. Possible values to include are:
|
|
custom/display | A comma-separated list of rendering modes is supported by the custom question. Possible values include:
|
|
custom/score (optional) | The URL to the web service scores this question. If the score element is omitted, the question uses standard or client scoring. | |
custom/publicdata (optional) | This attempts to send specific public data to the client for use with CQ.getInfo . This data is also sent to any subsequent server requests, like grading. This is only used if the mode is Active. |
|
custom/privatedata (optional) | This attempts to send specific public data to the server for subsequent calls, including grading. This is only used if the mode is Active. | |
custom/version | This is the Custom Question version. Custom Questions can use this version to correctly render reviews when the version changes. |
Scoring Custom Questions
Custom Questions can implement their own grading algorithm. For example, a Teacher can develop a crossword-puzzle question that is scored according to how many across and down answers are correct.
Scoring can occur either in the client-side JavaScript or on an external server via the web service API. In either case, the custom question JavaScript stores student answers by calling CQ.setAnswer.
There are three possibilities for returning scores:
- If no score is assigned, the exam engine assumes the question is manually graded (like an essay question) and sends it to the Teacher for grading.
- The client-side scorer also specifies a score in that call.
- The web-service scorer returns the score using the following Score Response XML format:
<custom>
<responsetype="submission"foreignid="string"pointspossible="double"
[pointscomputed="double"]/>
</custom>
Element | Attribute | Description |
---|---|---|
custom/response | pointspossible | These are the points possible for this response. This should be the same value as specified by the input post. |
pointscomputed | These are the points achieved as determined by any auto-grading process. If omitted, the question is given to the Teacher to grade. |
Hosting External Custom Questions
To host questions on a web server other than Pearson Connexus, implement the Custom Question web service API on the server. Because the web-service request contains most question information, externally-hosted Custom Questions typically do not call the CQ.getInfo JavaScript method. However, they do still call CQ.setAnswer to store student responses.