hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
45 stars 14 forks source link

Expose logged-in LMS user basic details to the FE via config #6376

Closed acelaya closed 1 month ago

acelaya commented 1 month ago

A requirement for the LMS dashboard is that we display the logged-in user display name in the header.

This PR adds a new config entry which exposes the most basic user details for the FE to display. It currently includes only the display_name.

This information is not used yet. It will be used as part of https://github.com/hypothesis/lms/pull/6372

Testing steps.

  1. Launch an assignment
  2. Open the browser console, and inspect generated HTML.
  3. In the LMS iframe, we generate a <script />qq tag withclass="js-config"`. It should include a block like this:
    {
      "user": {
        "display_name": "Hypothesis 101 Teacher"
      }
    }