Skip to content

Student Notes: highlight & notes for lessons - #645

Draft
daonham wants to merge 15 commits into
developfrom
feature/student-notes
Draft

daonham wants to merge 15 commits into
developfrom
feature/student-notes

Conversation

@daonham

@daonham daonham commented Oct 5, 2026

Copy link
Copy Markdown
Member

Summary

Students who are enrolled in a course can highlight text in a lesson and save plain-text notes from a Notes panel on the learning page. A new backend "Student Notes" page lets admins and course instructors review those notes.

This PR currently has only the spec, plan and DB design in .claude/specs/student-notes/. The implementation will be pushed to this branch step by step.

Key decisions

  • Notes are stored in a new custom table, {prefix}learnpress_notes.
  • Phase 1 covers lessons only. The schema keeps item_type and anchor.scope so quiz support can be added later.
  • Only enrolled students can create notes, and only the owner can edit or delete them.
  • A note can be viewed by its owner, by admins, and by the course's author or co-instructors.
  • Note content is plain text.
  • A highlight's position is saved as the selected text plus some surrounding text and character offsets. If the lesson content changes and the text can no longer be found, the note becomes orphaned: it stays in the panel but no highlight is drawn.

Checklist

  • DB table + NoteDB / NoteFilter / NoteModel
  • NoteService + NoteAjax
  • Frontend panel + highlight
  • Backend Student Notes page
  • Cleanup hooks, GDPR, setting
  • Tests, PHPCS, build

🤖 Generated with Claude Code

daonham and others added 15 commits October 5, 2026 16:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Model + tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e/delete) + tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tes UI (lesson only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation) with instructor scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…table, lp-badge), remove column sorting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tablenav), view full note in ThickBox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…olored type pills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ers, previous layout/styles).

Reverts 3dab7bd, c3d36ba, b69317b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ort and erase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ault on).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…LearnPress modal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ESLint: read the selection through ownerDocument.defaultView.
- Admin list data (scope, filters, stats, options) moved from the template to NoteService::get_admin_list().
- NoteDB::order_newest_first(); single learn-press/note/can-create filter in check_can_create().
- AdminTemplate::html_tom_select(): optional id (no more str_replace on its markup).
- Remove unused lp_note_list AJAX and unused JS data keys.
- Shared launchers wrapper CourseItemLaunchersTemplate (AI Assistant const kept as deprecated alias).
- Authored courses via PostDB + CoursePostFilter; NoteModel::get_created_timestamp().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant