Help
QuestionEditor
This component shows the editor for a single question attached to an assessment item. This is the component that is shown for editing a single question in the "Questions" tab when an author opens an item from the Syllabus, ItemEditor or AssessmentEditor components.
Preview
Properties
ParameterTypeMeaning
EnrollmentIdStringID of the enrollment for which to edit the assessment question. This should be an author enrollment. The enrollment implies a user, course and section.
ItemIdStringID of the assessment item to edit.
QuestionIdStringID of the assessment question to edit.
ShowSaveBooleanSpecify true for the component to show the "Save" button; specify false to hide the button. Default is true.

If you hide the button, ensure that code exists that calls the saveComponent method to save progress.
ShowCancelBooleanSpecify true for the component to show the "Cancel" button and to fire the Frame API's componentcancelled event. Specify false to hide the button. Default is true.
ShowAdvancedBooleanSpecify true for the component to show the "Advanced Edit" link; specify false to hide the link. Default is false.

If this parameter is set to true, the component fires an advancededitclicked event on the Frame API with these parameters:
  • id - The ID of the component firing the event
  • data - Object containing information about the state of the component firing the event. This object provides the following properties:
    • enrollmentId - ID of the enrollment for which the assessment question is being edited.
    • courseId - ID of the course for which the assessment question is being edited.
    • itemId - ID of the assessment item being edited.
    • questionId - ID of the assessment question being edited.
    • questionXml - Current XML representation of the question being edited.
The advancededitclicked has no default handler. If this parameter is set to true, another component on the page must listen to and handle the event.
ShowPropertiesBooleanSpecify true for the component to show the "Properties" link. Specify false to hide the link. Default is true.
ShowFeedbackBooleanSpecify true for the component to show the "Edit Feedback" link. Specify false to hide the link. Default is true.
ShowEditFeedbackBooleanSpecify true for the component to show the "Edit Feedback" buttons and to display feedback along with question and answer. Specify false to hide the buttons and feedback. Default is false.
AllowEditLinkedQuestionsBooleanSpecify true for the component to allow editing the questions that link questions refer to. Specify false to not allow the editing. Default is false.
Events
To listen to events, call addListener on the Frame API.
EventDescription
componentcancelledFires when the editor is cancelled. ShowCancel must be true for this event to fire.
componentsavedFires after a question has saved.
Methods
To call methods, call callComponentMethod on the Frame API.
isEditFeedbackVisible
Determines if the edit feedback UI is visible
Syntax
isEditFeedbackVisible() : Boolean
Returns
true if the edit feedback UI is visible, false otherwise.
showEditFeedback
Shows/hides the edit feedback UI
Syntax
showEditFeedback(Boolean show) : void
Parameters
  • showtrue to show the edit feedback UI, false otherwise.
Returns
void
See Also
AssessmentEditor Syllabus ItemEditor Frame API saveComponent componentsaved componentcancelled