createUI - Methods - Feedback Aide API

Feedback Aide API Methods

createUI()

Creates and prepares the feedback session with our predefined UI.

You would want to use this so that you can easily integrate feedback sessions with our default UI. You can further customize the interface by showing or hiding various modules or components.

Important You must call the attach() method on the returned instance when the promise resolves to render the interface on the page.

Examples

// Create the session UI instance
const sessionUI = await feedbackSession.createUI({
    enable_math_rendering: true,
    modules: {
        grader_annotations: false,
        sources: false,
        rubric: {
            layout: 'compact'
        },
        comment: false,
        score: false,
    }
});

// Render the UI into the specified container
sessionUI.attach(document.querySelector('.my-session-01'));

// Generate feedback for the current session
await sessionUI.generateFeedback();

Arguments

  • enable_math_rendering boolean

    Controls the rendering of mathematical notation (LaTeX or MathML) within the user interface.

    You would want to use this so that you can display complex mathematical expressions clearly and accurately to users.

    Note This option only applies to the response, stimulus, sources, and rubric modules.

    Default: false

  • modules object

    Controls whether specified components are used in the interface.

    The following properties are supported.

    • comment boolean

      Controls whether to show or hide the Summary of feedback module.

      Default: true

    • grader_annotations boolean

      Controls whether to show highlighted annotations over the response.

      You would want to use this to hide all grader annotations for the feedback session.

      Highlighted annotations will be shown by default when the response was graded with at least one of the annotations.grader evaluation options set to true.

      Default: true

    • justification_of_score_view string

      Controls the visibility mode for the justification of score view in the user interface.

      You would want to use this so that you can limit or expose score justifications to specific roles, such as graders or reviewers.

      Important This option must be used in combination with the justification_of_score.enabled evaluation option set to true; otherwise, it will have no effect.

      Possible values

      • "all"
      • "grader_only"
      • "review_only"
    • legend boolean

      Controls whether to show or hide the legend below the rubric that indicates whether the rating or score was selected by Feedback Aide or manually graded by a user.

      Default: true

    • response boolean

      Controls whether to show or hide the response module that contains the student's response.

      Default: true

    • rubric boolean object

      Controls whether to show or hide the rubric module.

      When defined as an object, the rubric is shown and the layout of the rubric can be customized further.

      Default: true

      The following properties are supported.

      • additional_context boolean

        Controls whether to show or hide the additional context section in the rubric.

        Default: false

      • layout string

        Controls the layout of the rubric module based on its container's width.

        Default: "auto"

        Possible values

        • "auto" - Automatically adjusts the rubric layout based on the container's width, where it will render the full contents or switch to the accordion layout.
        • "full" - Always shows the full rubric regardless of the container width.
        • "compact" - Always shows the accordion view regardless of the container width.
    • save_button boolean

      Controls whether to show or hide the Save button and the Submit scores button.

      Default: true

    • score boolean

      Controls whether to show or hide the Total score element below the rubric module.

      Default: true

    • sources boolean

      Controls whether to show or hide the sources list inside the stimulus module.

      Default: true

    • stimulus boolean

      Controls whether to show or hide the stimulus/question module.

      Default: true

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.