The Primary Instance of a course is a special nomination that can be given to one instance of each course at a time. It gives the instance a special URL that has the course name slug twice instead of having the course name slug followed by the instance name slug. The main use case is to be able to get a shareable link that will always point to the most recent course instance. This way links to Lovelace courses from other sites will not become obsolete whenever a new course instance is created.
Lovelace Exam¶
Lovelace Exam is a task type that allows you to create and easily manage exam style assignments with multiple questions in one submission form. The task will be initialized with a question pool file. Whenever you need to hold an exam instance (called Attempt in the terminilogy), you will simply generate a new individual exam attempt for the existing task. Students can only see the exam questions when an attempt is open for answering. These attempts can be generated for individual students, or as general exams for the entire course instance.
Questions in exams are randomized from the pool for each attempt, with logic that avoids duplicate questions on subsequent attempts when possible. When the randomizaton happens, first random categories are chosen from the available ones, and then one previously unused question from within each category is selected for the exam script.
This document goes through the steps of creating an exam task, and managing attempts for the exam.
Creating an Exam¶
Exams are created like other tasks using the management site. An easy way is to use the editing widgets to create a new exam by choosing "Embedded page" and "Multiple choice exam" from the forms.
After creating the exam, choose "Edit this exercise" to get into the management site. Here you can upload your question pool file(s) for all languages you want the exam to be available in. These are YAML files that contain your categories, and the individual (mutually alternative) questions within the categories.
Exam File Syntax¶
A short example exam, or exam-ple if you will:
The top-level keys in the document are category handles. These are logical identifiers that will not be shown anywhere but are used for operations like mapping individual answers back to questions when evaluating an exam answer. They must be unique within the exam, and also identical in all alternative language files. The values of these keys are question category objects.
Category Object¶
A category object is a collection of questions that are mutually overlapping and thus should never be asked in the same exam. They are also of similar value, and should therefore be of similar difficulty to maintain fairness - especially when individual exams for each student are used. Category objects have 1 mandatory and 1 optional key:
alternatives
: Will be an array of individual questions within the category, see question object belowvalue
: The point value of questions in this category. (optional, defaults to 1)
Question Object¶
Question object represents an actual question that will be presented in the exam. These have several keys that are explained below.
question
: The question text that will be displayed in the exam. This field supports most forms Lovelace markup, except embedded tasks for obvious reasons. If including images or files, they must exist in advance.summary
: A short description that summarizes the question. This will be displayed in exam result screens etc. where rendering the full question would take too much space.type
: Question type. Currently available types are:- radio: a normal multiple choice question, with radio button (i.e. one correct answer)
- checkbox: a checkbox question where student needs to check all correct choices
correct
: A string indicating the correct answer, for existing question types it is a concatenation of the single character choice keys that need to be chosen (see next).choices
: An object with single character keys starting from 'a', and values that show the corresponding answer text. Answer text is a raw string and cannot contain Lovelace markup.
Other Exam Settings¶
The other settings for exams are the same as other tasks. However due to the nature exams, there are a couple of specific configurations that should be mentioned. If you want the exam task to behave like exams generally do where students only get to answer once before seeing the results, there are two main ways to achieve this. The first way is to make an exam that is not evaluated immediately but can be answered to multiple times, with these settings:
This approach is good for general exams that are taken by the whole course within a specific, relatively short time frame. It allows students to revisit their answers after submitting, and the exam is only graded when you use the batch grading tool for the task. Because you can choose to only grade the latest answer, there is no reason to limit how many times the exam can be answered here.
The second way is to make an exam that can only be answered once, but is automatically evaluated on the spot.
This approach is good for individual exams in a continuous course instance where students will be asking to take the exam at different times. This way they will know their result immediately, and you do not need to worry about grading their exam later.
Managing Exam Attempts¶
Once you have an exam task ready, you can open up attempts for students to take the exam. This is done from the exam attempt management panel, which can be opened from the task's left hand toolbox. This view shows existing attempts, some tools for them, and a button to create a new attempt.
Creating a New Attempt¶
A new attempt is made by pressing the add button underneath the table, and filling in the form that pops up. This form only has four fields that are relatively straightforward:
- The first two fields define when the exam can be seen and answered. Outside of this time window, the start exam button on the task doesn't do anything.
- The number of questions allows you to choose how many categories from the question pool file will be included in the exam. The included categories will be chosen randomly, unless the maximum number is chosen. In the latter case, all categories will be included.
- The last field sets the exam's target "audience" - either a single student on the course instance, or the whole course instance.
Attempt Settings¶
Attempt settings only allow you to change the time window of the exam. If you need to change the number of questions, you need to generate a new attempt. This settings form also includes a checkbox to refresh the exam to the latest version. To protect the integrity of exams and their answers, the exam script will always be fixed to the moment of the attempt's creation. Even if you upload a new file, all existing attempts will keep using the file from back when they were created. This behavior is intended. However, if you know you need to update a question because you had e.g. the wrong answer as correct, then you can force-refresh the exam by using this option. Please be aware that the structure of the question pool file cannot change, and attempting to do so will result in undetermined behavior (likely errors). You can only change the singular values of existing keys in the file.
Preview Attempt¶
This button brings up a preview of the exam, allowing you to check what questions were selected in randomization, and how they will look when rendered into the exam answer form.
Delete Attempt¶
This will delete the attempt, and all answers that have been submitted to it so far. If your goal is to only make the attempt unanswerable, you can simply close it by changing the timing window.