yetanalytics / lrs

Protocols, specifications, and logic for building an xAPI Learning Record Store (LRS) in Clojure(Script).
https://www.yetanalytics.com/lrs
Apache License 2.0
4 stars 1 forks source link

LRS-34 Statement Rendering/Browsing #30

Closed milt closed 3 years ago

milt commented 3 years ago

LRS-34 /statements UI/browser interface

This PR adds the ability for the LRS to render the GET method of the /statements route as html if provided with the Accept: text/html header.

The functionality can be toggled with the :com.yetanalytics.lrs.pedestal.interceptor/enable-statement-html key in the service map.

If authentication is implemented and html rendering is enabled, :com.yetanalytics.lrs.pedestal.interceptor/www-auth-realm will specify the basic auth realm for browser auth. Users will get a login/pass browser dialog and then be able to browse.

By default the server will render full html pages, but fragments can be requested with the unwrap_html=true query param.

Data Attributes

Adds the following html data attributes to rendered JSON:

milt commented 3 years ago
kelvinqian00 commented 3 years ago

Guess more cleanup is in store:

Screen Shot 2021-08-02 at 5 18 34 PM