Guided Exam Builder
Overview
Launch the standalone Guided Exam Builder experience.
Endpoints
Launch URL: /lti/launch/exam-builder
Additional Parameters
{
view_options?: {
title?: {
show: boolean;
};
description?: {
show: boolean;
};
activityType?: {
show: boolean;
}
}
}
view_options
allows you to control which fields we ask the user for while they are building their exam. If you already know what you want the user to type, consider hiding these fields and providing them to the SDK via GuidedExamBuilder.setDefaultFormData(...)
(shown below).
Events
LAUNCHED
Emitted immediately after the Campfire application finished loading.
GUIDED_EXAM_SAVED
Emitted every time the item is saved to our database, including during creation
data: {
id: string;
}
GUIDED_EXAM_CREATED
Emitted the first time an item is saved to our database.
In the Guided Exam Builder flow, we also create an Exam Config Record at the same time, which is also returned with this event. This ID will allow you to immediately administer the Exam via the Campfire Assessment flow.
data: {
id: string;
examConfigId: string;
}
GUIDED_EXAM_FORM_DATA_REQUESTED
Emitted when the user is prompted for certain data in the UI. Currently, this includes the Exam title
, Exam description
, and Exam activity type
present in the first form, but we may add the ability to provide additional fields in the future. This event allows you to programmatically fill out these fields for the user by responding with a SET_GUIDED_EXAM_FORM_DATA
in response. We have provided a convenience method to handle this flow for you called setDefaultFormData
.
data: {
fields: Array<string>
}
All Item Editor Events
Additionally, the Exam Editor may emit any of the events from Item Editor if the user launches the Item Editor while creating their exam.
Messages
SET_GUIDED_EXAM_FORM_DATA
You may emit this message ONCE in response to a GUIDED_EXAM_FORM_DATA_REQUESTED
event. It will populate the provided fields on behalf of the user in the Form UI.
{
type: "message",
name: Messages.SET_GUIDED_EXAM_FORM_DATA,
data: {
fields: [
{
field: "exam:title",
value: "My Exam",
},
{
field: "exam:description",
value: "This is an exam",
},
{
field: "exam:activityType",
value: "QUIZ",
},
]
}
}
Additional Methods
SetDefaultFormData
This method handles the call and response for setting the default metadata fields for the user in the first screen of the Guided Exam Builder flow. See the view_options
parameter if you would like to hide these fields to prevent the user from modifying their values after you set them.
service.setDefaultFormData([
{
field: "exam:title",
value: "My Exam",
},
{
field: "exam:description",
value: "This is an exam",
},
{
field: "exam:activityType",
value: "QUIZ",
},
]);