Note
EdX offers full support for this tool.
This section describes how to include surveys in your course.
You can include surveys in your course to collect learner responses to multiple questions.
For a survey, you configure multiple question and multiple possible answers. The set of answers is used for each question in the survey. If you need to ask only one question, use the Poll Tool.
The following example survey has three questions, each with the same three possible answers.
After learners submit their answers to the survey, they see the survey results that have been gathered at this time, unless the survey has been configured to hide results.
Before you can add a survey to your course, you must enable the survey tool in Studio or OLX (open learning XML).
To enable the survey tool in Studio, you add the "survey"
key to the
Advanced Module List on the Advanced Settings page. (Be sure to
include the quotation marks around the key value.) For more information, see
Enabling Additional Exercises and Tools.
Alternatively, you can use OLX to enable the survey tool.
To enable the survey tool, you edit the XML file that defines the course structure.
Open the XML file for the course in the course
directory. In the course
element’s advanced-modules
attribute, add the string survey
.
For example, the following XML code enables the survey tool.
<course advanced_modules="["survey",
"poll"]" display_name="Sample Course"
start="2015-01-01T00:00:00Z">
...
</course>
You must enable the survey tool before you add the component.
On the Course Outline page, open the unit where you want to add the survey.
Under Add New Component click Advanced, and then select Survey.
The new component is added to the unit, with the default survey that contains three answer fields and three questions.
In the new component, select Edit.
In the Display Name field, enter the name for the component.
In the Feedback field, enter text that learners see after they submit responses.
In the Private Results field, to hide survey results from learners, select True. If you leave the default value, False, learners see survey results after they submit responses.
In the Maximum Submissions field, to allow learners to submit responses more than once, change the value. Enter 0 to allow unlimited responses.
Note
If you allow learners to submit responses more than once, you should set Private Results to True. Otherwise, learners will be able to change their responses after seeing others’ responses.
Configure answers for the survey. Each answer is displayed to learners as a column, with a radio button they can select. Each answer is used for each survey question.
Configure questions for the survey. Each question is displayed to learners in the left-most column.
Select Save.
To add a survey XBlock in OLX, you create the survey
element. You can embed
the survey
element in the vertical
element, or you can create the
survey
element as a stand-alone file that you reference in the vertical.
The following example shows the OLX definition for a survey with two questions.
<survey
url_name="unique identifier for the survey"
xblock-family="xblock.v1"
questions="[
["unique code for question 1",
{
"img": "Static URL to image",
"img_alt": "Alternative text for image",
"label": "Text of question 1"
}
],
["unique code for question 2",
{
"img": "Static URL to image",
"img_alt": "Alternative text for image",
"label": "Text of question 2"
}
]
]"
feedback="Feedback displayed to learner after submission"
private_results="false"
block_name="Display name for survey"
max_submissions="1"
answers="[
[
"Unique identifier for answer 1",
"Answer text"
],
[
"Unique identifier for answer 2",
"Answer text"
]
]"
/>
The following table describes the attribute of the survey
element.
Attribute | Description |
url_name |
The unique identifier of the survey. |
xblock-family |
The XBlock version used. Must be xblock.v1 . |
questions |
An array of questions in the survey. Each question has a unique identifier, and a dictionary that defines values for the following names.
Each question must have a value for |
answers |
An array of answers in the survey. Each answer has a unique identifier, and a dictionary that defines values for the following names.
Each answer must have a value for |
feedback |
The text shown to learners after they submit a response. |
private_results |
Whether the survey results are shown to learners (true ) or not
(false ). |
block_name |
The display name for the survey. |
max_submissions |
The number of times a learner can submit survey answers. Use 0 to
allow unlimited submissions. If you use a value other than 1 , set
private_results to true . Otherwise, learners will be able to
change their responses after seeing others’ responses. |
Do not publish a survey until you have completed and tested it. You should avoid changing a survey after learners have begun using it.
If you must edit a survey after learners have submitted answers, take into account the following implications.
When you view the survey as a course staff member, you can view results of the survey inside the course.
Select View results in the survey.
The results of the survey are then displayed.