Notes and bookmarks
Learners can keep private notes and bookmarks on the topics of a course. The data lives in the
bookmarks_notes package (api/packages/bookmarks_notes).
In the legacy React app
Section titled “In the legacy React app”- In the course player, a toolbar at the bottom of the screen has a notepad and a bookmark button.
- The notepad holds one note per topic. “Update” overwrites the note; saving an empty notepad clears it. Notes are visible only to the learner who wrote them.
- The bookmark button adds the current topic to the learner’s bookmarks, or removes it when it is already bookmarked. A message confirms each change.
/user/my-bookmarksin the profile lists all notes and bookmarks with links to the course and topic, and lets the learner delete them.
The package’s ADMIN.md walks through these screens with screenshots (taken from the original EscolaLMS app).
How it works in the API
Section titled “How it works in the API”Bookmarks and notes are one model: a note is a bookmark with a value; a bookmark has
value: null. Each entry points at a bookmarkable item through bookmarkable_type and
bookmarkable_id (the legacy app bookmarks topics).
| Endpoint | Who | What |
|---|---|---|
GET /api/bookmarks |
Signed-in learner | List own notes and bookmarks (filter by type and ids) |
POST /api/bookmarks |
Signed-in learner | Create a note or bookmark |
PATCH /api/bookmarks/{id} |
Signed-in learner | Update own entry |
DELETE /api/bookmarks/{id} |
Signed-in learner | Delete own entry |
GET, POST, PATCH, DELETE /api/admin/bookmarks |
Administrator | The same for every user’s entries |
All routes need an API token. Students get the bookmark_*-own permissions
(bookmark_create-own, bookmark_update-own, bookmark_delete-own, bookmark_list-own);
administrators get bookmark_create, bookmark_update, bookmark_delete and bookmark_list.
See the API endpoints reference for the request and response
fields.