createUI - Methods - Feedback Aide API

Feedback Aide API Methods

createUI()

The recommended method to use the Feedback API with our predefined UI.

You would want to use this so that you can easily integrate feedback sessions with a UI, enabling various modules or turning off certain components.

Examples

const sessionUI = await feedbackSession.createUI({
    // Optional options to hide unwanted UI
    modules: {
        sources: false,
        rubric: {
            layout: 'compact'
        },
        comment: false,
        score: false,
    }
});

sessionUI.attach(document.querySelector('.my-session-01'));
await sessionUI.generateFeedback();

Arguments

  • modules object

    Options to enable or disable UI components.

    The following properties are supported.

    • stimulus boolean

      Enable or disable the stimulus/question module.

    • sources boolean

      Enable or disable the sources inside the stimulus module.

    • response boolean

      Enable or disable the response module.

    • rubric boolean | object

      Enable or disable the rubric module. Can also set the rubric display format when passed an object: { layout: 'auto' | 'full' | 'compact' }

    • legend boolean

      Enable or disable the legend below the rubric.

    • score boolean

      Enable or disable the score below the rubric module.

    • comment boolean

      Enable or disable the comment/feedback module.

    • saveButton boolean

      Enable or disable the save and submit to student buttons.

Return value

Type Promise

See FeedbackSessionUI for more information.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.