Repository navigation
v0.3.0 - Beta release
Pre-release
Pre-release
First beta of AI LMS. Since the v0.2.0 alpha this release adds paid courses, course prerequisites and lessons in order, instructor marking and reports, a Tavus avatar tutor, new admin lessons pages, time zones and multi-instance deployment, and much more.
It reworks the admin and lesson layouts, improves email and includes a substantial round of security fixes.
| v0.2.0 → v0.3.0 | |
|---|---|
| Commits | 85 |
| Pull requests merged | 28 |
| Contributors | 4 |
| Automated tests | 488 → 1,184 |
| Files changed | 541 |
✨ Highlights
- Paid courses with Stripe. Sell courses by card, with access granted on payment and admin tools for manual grants, revocations and refunds (#116).
- Prerequisites and lessons in order. A course can require other courses to be completed before students enrol (#41), and can unlock its lessons one at a time.
- Instructor marking and reports. Instructors have their own marking queue and reports for the courses they own.
- Automatic progress. Lessons without a quiz complete themselves once their materials are done, and progress shows partial completion.
- Faster image loading. Uploaded images are automatically resized and served as WebP (#127).
- Tavus avatar tutor. Tavus avatars can be a lesson's AI tutor, alongside ChatBar and Anam (#135).
- New admin navigation. Admin pages now have a left sidebar, grouped into Content, People and Configure (#128).
- Admin lessons pages. Reorder a course's lessons by drag and drop, and browse every lesson across courses with search and filters (#134).
- Better email. A built-in mail relay, email diagnostics, and password emails in the recipient's own language.
- Multi-instance deployment. Run several LMS instances on one server (#126), with new backup, restore, export and health-check tools.
- Time zones. Dates and times show in each user's time zone, detected from the browser.
🎨 Layout and interface
Improvements
- Faster image loading (#127). Images are resized to the size they're shown at and served as WebP, for example a 653 KB screenshot becomes 98 KB. It applies to cover images, posters, materials, lesson text, avatars and the logo. Uploads are unchanged, and images in private courses are now cached by the browser.
- Admin sidebar (#128). The admin top bar had grown so crowded that its links overlapped on laptop screens. From 1024px wide, admin pages now have a fixed left sidebar grouped into Content, People and Configure, with the current page highlighted. "Back to site", your email and sign-out sit at the bottom. On smaller screens, a slim top bar opens the same menu as a drawer.
- Image crop tool (#49). An "Adjust image" dialog crops and sizes uploads to the recommended dimensions: covers 728×320, posters 1280×720, logo 512×512 and certificates A4.
- Lesson page: a left sidebar for progress and navigation, a progress button, and restyled progress indicators.
- The site header stays at the top of the screen on every page. On small screens only the avatar is shown.
- Lesson position breadcrumb in the lesson page and editor (#122), and the browser tab reads "Lesson 3 of 12: Title". Course edit pages get a subject → course breadcrumb.
- Locked lessons and courses share one padlock icon and one dialog that explains what to complete first.
- Materials open by default, and each student's open or closed choice is remembered. Materials can use a horizontal-scroll layout.
- Course and lesson cards show images at a consistent 728×320 shape (#55).
- "Recently published" on the landing page has Subjects / Courses / Lessons buttons to switch the list. Subjects appear only if enabled.
- The instructor menu item is renamed Marking and moved under My courses. It shows a badge while answers are waiting to be marked.
- A show/hide toggle has been added to password fields (#121).
- Danger zone for deletes (#136). Delete buttons for courses, lessons, materials, subjects and tags have moved out of lists and page headers into a Danger zone at the bottom of each edit page. Each opens a dialog that says what the delete removes, or why it's blocked (purchases, access grants, certificates, prerequisites, or a subject that still has courses).
- Page links on paginated tables are restyled as pills, with the current page highlighted.
- Course pages have an "Add lesson" button for people who can edit the course.
Fixes
- Quiz cropping: in one-question-at-a-time quizzes, opening the AI tutor panel narrowed the column and cut off answer choices. The quiz now resizes to fit.
- The lesson progress ring no longer shows an arc at 0%.
- Fixed a blank page when opening a course from admin (#54).
- The intro video no longer scrolls the page automatically when it ends.
- Answered quiz questions show a neutral "Answered" label instead of a green ✓, which looked like "correct".
🎓 Students
- Certificates. Completing a course opens a dialog with View certificate and Download PDF, the completion date and the time taken. Profile has a new My certificates section, and course cards show a certificate footer. A certificate stays available once issued.
- My learning is redesigned as cards with completion bars.
- Automatic lesson completion. A lesson without a quiz completes once its materials are done, so there's no "Mark complete" step. The progress ring and course % show partial progress (materials 20%, quiz 80%, capped at 99% until complete), not just 50% or 100%.
- Next lesson button (#67). After completing a lesson, students see "Next lesson →", or "Back to course" on the last lesson.
- Smoother progress (#125). Marking a material complete happens in place and collapses it, and the quiz unlocks once the last material is complete, all without a page reload, so a half-answered quiz isn't lost. Progress no longer drops to 0 when a material later becomes required.
- Prerequisites. Courses with unmet prerequisites show the required courses, and Enrol or Buy opens a dialog linking to them.
- Video. "Video — external URL" materials now embed YouTube (including Shorts and live) and Vimeo. Before, these didn't play. Other links show an "Open video" button.
- Language. Visitors who aren't signed in see the site in their browser's language.
- Avatar tutors (Anam and Tavus) have a microphone mute button. When the student switches tab, the microphone is muted straight away, and if the tab stays hidden past a timeout the session ends, which saves avatar minutes.
- ChatBar is now a material type. ChatBar conversations can use a two-column layout and a poster image.
- The "Download file" link under uploaded videos is now shown only in the editor.
🧑🏫 Instructors and admins
- Marking and reports.
- The marking queue shows the oldest 20 pending answers per lesson, and you can score them in place.
- Lesson reports have one row per free-text question, linking to a page that filters by pending, failed, passed or all, with student search.
- "Report" links on course and lesson pages.
- A "N answers waiting" banner on the home page (instructors) or dashboard (admins).
- Counts leave out AI-marked lessons and students who are no longer enrolled.
- Payments.
- Admin → Payments handles manual access grants and revocations (with a reason) and retries.
- Enrolling a user in a paid course requires a grant reason.
- Switching a course from free to paid grants access to students already enrolled.
- Unenrolling from a paid course archives the enrolment.
- Users and courses with purchases can't be deleted.
- A refund or a lost dispute removes access, but certificates are kept.
- Checkout is card-only, in EUR, USD, GBP or JPY.
- Tavus avatar tutor (#135). Choose Tavus Avatar as a lesson's AI tutor and enter a Tavus API key, a PAL/persona ID, an optional face/replica ID and conversation context for the lesson. Credentials are checked against Tavus on save, and the key is encrypted and masked on the form. Each student gets a private conversation that starts only when they click Ask AI tutor. Only the instructor's context text is sent to Tavus, never course or lesson titles.
- Avatar tutor settings. Admin → Site settings → Integration sets the exact Anam and Daily SDK versions (checked against npm on save; Anam no longer loads
@latest) and the hidden-tab timeout (default 30 seconds). - Admin lessons pages (#134).
- Each course has a lessons page ("Manage all lessons" on the course edit page) with drag-to-reorder, video source and AI tutor columns, and View, Edit, Report and Publish/Unpublish actions.
- A new Lessons sidebar entry lists every lesson across courses, with title search and course, subject and status filters.
- Publishing or unpublishing from these pages returns you to the page you came from.
- The questions and materials pages show the lesson breadcrumb, and course editors can reorder materials there.
- Prerequisites. Only published courses can be prerequisites, and circular chains are rejected. Admin force-enrol has a "Skip prerequisite check" option.
- Learning order. Courses have an optional learning order number, and the public and admin course lists can sort by it or by publication date. The admin list now sorts by publication date by default.
- Lessons in order. Turn on "sequential lessons" for a course to unlock each lesson once the earlier ones are complete. It's off by default.
- Lesson section order. Choose the order of a lesson page's sections (introduction, AI tutor, materials, progress, quiz results, quiz and rating) for each lesson, using up/down buttons or drag and drop. A reset button restores the default order.
- Time zones. Publish dates and times are entered in your own time zone (they were UTC), and a tooltip on the field says which one.
- AI design pages (#139) are redesigned: request suggestions, a description and pricing for the selected model, usage tooltips, full-size preview links and dark theme colours. A follow-up revision starts with a blank request, showing the previous one as a placeholder, and keeps the parent revision and model.
- AI-designed materials accept video assets (mp4, webm or ogg, up to 100 MB) as well as images, with drag-and-drop.
- Users can be imported from a CSV file. The import sends no emails: use "Send password setup" for each user.
- Lessons can be deleted from the lesson edit page (#114).
- A subject's slug can only be set when the subject is created, because it's part of public web addresses.
- Deleting a user asks for confirmation and warns that their certificates are deleted too, so the certificates' verification links stop working.
- Terminology labels have been checked and fixed throughout.
- The ChatBar name is shown when you enter an API token.
- Site settings show the running app version with a link to its commit, the copyright and license, and a "What's new" link.
- Only instructors and admins can own courses. Existing courses owned by students are reassigned to the first admin during the upgrade.
- Minor: "Insert HTML" is no longer offered when editing an existing material, and the "Edit" link is removed from the admin users list.
- Built-in mail relay. Deployments can now send email through their own outbound mail server (Postfix, in a separate container), so an external provider is optional. Deploy switches an instance to the relay when it has no SMTP host, or only a localhost one with no credentials. Existing provider settings, such as SendGrid, are kept.
- Email diagnostics.
bin/check-emailchecks the server's mail connection, and--providerstests which external providers (SendGrid, Mailjet) it can reach. - Emails in the recipient's language and time zone. Password emails follow the recipient's language rather than that of whoever triggered them, and show times in the recipient's time zone.
- Clearer password emails. Users who have never signed in get a "set your password" email rather than a "reset" one. Emails carry the brand name in the subject and sender.
- Each instance on a shared server has its own mail relay (#126).
🐛 Fixes
- Quiz scoring: True/False answers were always marked wrong, and a blank Points value scored as 1 (#69).
- Course completion counted draft lessons, so some courses could never reach 100%. Only published lessons count now.
- Completing a course is now permanent: lessons added later don't take the completion away. They still count for students who haven't finished.
- Updating an existing lesson rating didn't work (#46).
- Admins could overwrite existing scores, including AI marks. Hand marking is now limited to unscored free-text answers on lessons that aren't AI-marked, with a score from 1 to 10.
- Accounts that hold a certificate can now be deleted (#115).
- The "copy material" dialog kept its old selections after being cancelled. Closing it now restores the material type and clears the choices, and Copy is enabled only once a source material is selected (#139).
- Signing in from a course page now returns you to that course, with password sign-in and with Kinde, including organization SSO (#138).
- Deleting a course that had issued certificates caused a server error. The delete is now blocked, and the dialog says why.
- Quiz preview for editors (#137). Course owners and admins who weren't enrolled couldn't see the quiz on lessons with required materials. They now see it with a preview notice. Submitting still asks them to enrol, so nothing is saved, and the lesson page no longer shows them the "Enrol now" banner.
- Fixed materials that could not be edited (#40).
- HTML materials keep more of their inline CSS (grid, gap, shadows, clamp and similar), so pasted layouts are no longer flattened.
- A saved AI model API key that can't be decrypted now shows a clear message and can be replaced. Failed AI design generations show a readable error.
- Terminology settings: after renaming a term (for example Course to Module), the field headings showed the new name, so it was unclear which term each field changed. Headings now always show the original terms, in the order Subject, Course, Lesson, Quiz.
- Fixed a server error when a profile update with a new avatar was rejected.
- Fixed SSL errors when loading content from a URL.
- Saving a course with a blank title now shows only "Title can't be blank", instead of extra, confusing errors about the slug (the URL name).
🔒 Security
20 security fixes. Every v0.2.0 instance should upgrade.
All security changes
Access control
- Students could open the question management pages, which show quiz answer keys. Those pages now require edit rights on the lesson.
- Students could enrol in courses they weren't allowed to see. Enrolling now requires access to the course.
- Ratings could be edited or deleted through another lesson's URL, or left on lessons the student couldn't see.
- Lesson locks (prerequisites and lessons in order) are enforced on the server for lessons, materials, documents and acknowledgements, not just hidden in the page. Guests can no longer open lessons in public courses that have prerequisites.
- Paid-course lessons, materials, quizzes and files are blocked without access. Protected files are served through the app.
- Certificate templates and non-cover course files are visible only to people who can edit the course.
- New access: instructors can see the names, emails, answers and progress of students on the courses they own, for marking and reports.
Credentials
- The saved ChatBar API key was included in the lesson form's HTML, and the Anam key and ChatBar material tokens were shown as plain text. They are now password fields that never show the saved value, and they're checked when saved (#68).
- New installs get their own
SECRET_KEY_BASEinstead of a shared key.
Sign-in and SSO
- SSO sessions are bound to the user, organization, verified connection and token expiry, including for protected files and Action Cable.
- Kinde token checks are stricter: issuer, audience, subject, expiry and signature are all verified, and state and nonce are single-use and expire after 10 minutes.
- Kinde sign-in only links to an existing local account when its email is verified (#118), and never takes over an account already linked to another provider. Changing your email clears its verified status. CSV-imported accounts are marked as verified.
- Organization SSO requires a signed connection claim that matches the organization.
- Users in organizations that require SSO can't sign in, change or reset a password. Other Kinde-linked users keep their local password. SSO-linked accounts can't change their email.
- Only email and password changes ask for your current password. Other profile edits no longer do.
Other
- Revoked certificates are kept and rejected, rather than deleted.
- Spreadsheet exports, including the admin users and courses CSVs, are protected against formula injection.
- Signed-in pages aren't stored by the browser or proxies, and the service worker no longer caches signed-in pages or protected images.
- Marking pages only redirect back to known marking pages, which blocks open redirects.
- Avatar uploads are checked for file type (PNG, JPEG, GIF or WebP) and size (under 5 MB).
See SECURITY_REVIEW.md for details.
⬆️ Upgrading from v0.2.0
Before you upgrade
- Take a rollback backup with v0.2.0's tools, and keep them. v0.3.0 uses a new backup format (a single
ai-lms-clone-*.tar.gz), and its restore can't read v0.2.0 backups (database-*.sql.gz+storage-*.tar.gz). To roll back, restore with the v0.2.0 release. - Back up
shared/.env. It holdsSECRET_KEY_BASE. Without it, encrypted values (Stripe and AI model keys) can't be read, and a restore needs the source instance's secrets. - Set the new Kinde settings. Set
kinde.access_token_audience, andkinde.connection_id_claimif you use organization SSO. If these are missing, sign-in fails closed. See "Kinde rollout requirements" inSECURITY_REVIEW.md. - Plan for existing password users and Kinde. Only accounts already linked to a provider are marked as email-verified. Other existing users must complete a password reset or setup link before Kinde sign-in can link to their account.
Deploying
- Single-instance servers: redeploy once without
--instancebefore adding named instances. This moves HTTPS to a shared edge Caddy (ai_lms_edge-caddy-1instead ofai_lms-proxy-1) and keeps your certificates. Expect a brief HTTPS outage. Allow about 1 GB of RAM per instance. - DNS check. Deploy now checks that each domain points directly at the server, and requires
https://DOMAIN/upto respond within 5 minutes. Behind Cloudflare or another proxy, use--skip-dns-check. - Migrations run during deploy. This release adds 15: course prerequisites, ChatBar material fields and layout, material layout, learning order, section order, enrolment completion dates, certificate revocation, payments, email verification, a pending-answers index (built concurrently), sequential lessons, user time zones, reassigning student-owned courses, and avatar tutor settings (Tavus, SDK versions and the hidden-tab timeout). Existing completions aren't backfilled.
- Courses owned by students are reassigned to the first admin (the oldest admin account), because only instructors and admins can own courses now. The migration log lists each course it moves. Reassign them in Admin → Courses if needed.
- Ruby 3.4.13 (was 3.4.2). The Docker image already uses it. If you build outside Docker, install it before deploying.
- libvips must be installed on the host for WebP image variants. The Docker image already includes it. Existing images are converted the first time they're shown, so the first page views after upgrading may be a little slower and use more CPU.
- Outbound access check. At the end of the deploy, the app checks it can reach ChatBar (
configs.anddashboard.chatbar-ai.com), Anam (api.anam.ai), Tavus (tavusapi.com) and Stripe (api.stripe.com). It only warns: if a line fails for a service you use, allow outbound HTTPS to that host. Saving credentials now says when the server can't connect, instead of "try again shortly".
After you upgrade
- Email (if you use the built-in relay). Set up A/PTR, SPF and DMARC records for the sending hostname, and arrange DKIM signing, which the relay doesn't do. Then run
bin/check-emailand send yourself a password reset. Queued mail is not included in backups. - Stripe (only if you sell courses).
- Add cron jobs for
rake payments:recover(every minute) andrake payments:prune_events(daily). Live checkout needs a recent heartbeat from the first. - Point a webhook at
/stripe/webhook, pinned to API version2026-10-28.endive. - Use an HTTPS App URL.
- See
docs/course-payments-operations.md.
- Add cron jobs for
- Expect re-sign-ins. Users of mandatory-SSO organizations must sign in again, and browsers pick up the new service worker on their next visit.
Operations: new tools and notes for server admins
- New tools:
bin/backup,bin/export,bin/restoreandbin/local-clonebin/check-deploycompares the running containers withmainbin/redeploy-alldeploys the current commit to every instance on a server, one at a time and with a single SSH password prompt.--dry-runshows which instances would change.bin/instancesshows health, memory and disk per instancebin/accountcreates an account over SSH
bin/deploykeeps its SSH connection alive during long steps and never asks for a password again during cleanup.- Backups and exports stop the web and worker containers while they run, so schedule them for quiet times.
- Native (non-Docker) restores need a database role with
CREATEDB, and no other database connections. - Never set
LOCAL_BACKUP_TEST=1in production. It turns off forced HTTPS and email. - The version in Settings shows only when deployed with
bin/deployor whenAPP_REVISIONis set.
⚠️ Known limitations
- Runs on Rails 7.2.4, the final 7.2 release. Rails no longer provides security fixes for 7.2, and an upgrade to Rails 8 is planned (see S8 in
SECURITY_REVIEW.md). - Files from private courses can stay in a viewer's browser cache for up to an hour after their access is revoked.
- The lesson token API (
/api/lessons/:token) returns 403 for paid courses, so anonymous widget embeds of paid lessons don't work. - ChatBar material embed tokens are visible in the page to students, as any embed token is.
- Tavus limits each avatar conversation to 30 minutes. The LMS doesn't store Tavus transcripts.
Full changelog: v0.2.0...v0.3.0