Releases: saylordotorg/moodle-local_ai_course_assistant
v3.4.4: Admin settings restructure + curl filelib fixes
What is new in v3.4.4
Admin settings restructure and a batch of latent curl bug fixes. No database migration, no new configuration, no capability changes. Drop in upgrade from 3.4.3.
Admin settings split into 7 focused pages
The single scrolling settings page and the obsolete JS based tab hack are gone. Replaced with a native SOLA admin category containing 7 settings pages:
- General: enabled toggle, remote config URL, version banner
- AI Provider & Models: provider, API key, model, temperature, system prompt, max tokens, history, starter editor link, token analytics link
- Content & RAG: RAG toggle, embedding provider and API, chunk and top-k tuning, performance content caps, RAG admin link
- Safety & Moderation: quiz hide, off-topic detection, wellbeing, integrity checks
- Engagement: study plans, email and WhatsApp reminders, voice and realtime mode, surveys, usability testing, practice scoring rubrics
- Branding & UI: institution name, display name, welcome message, chat greeting, display mode, position, avatar, colors
- Integrations & Delivery: FAQ and Zendesk, Redash export, CDN frontend delivery, plugin self update
Plus 7 editor and tool pages (Starter Editor, Survey Editor, Usability Testing Editor, Rubric Editor, RAG Index, Plugin Updates, Integrity Checks) all listed under the same SOLA category.
All 92 existing setting fields and their saved values are preserved.
Bug fixes
-
Fatal class
\\curlnot found on update_admin.php and the rag_admin.php reindex path.\\curlis not auto loaded by Moodle. Addedrequire_once($CFG->libdir . '/filelib.php')inside every class method that creates a\\curlinstance:plugin_updater,reminder_manager,zendesk_client,embedding_provider\\base_embedding_provider,provider\\base_provider. Previously these silently failed on cold includes. -
Removed the obsolete JS tab navigation hack and duplicated top save button script from the single settings page, now redundant with the native multi page layout.
QA
- All 7 new settings pages render HTTP 200 with zero errors and zero warnings over authenticated HTTP.
- All 9 admin external pages (analytics, token analytics, rubric editor, survey editor, usability testing editor, RAG admin, update admin, integrity admin, starter settings) render cleanly.
- 18 analytics methods, survey manager, usability testing manager, rubric manager, and token cost manager smoke tested without argument or signature errors.
- All 46 lang files still lint clean. Mustache template sections still balanced.
Upgrade notes
- Any direct link to
/admin/settings.php?section=local_ai_course_assistantwill 404. Use the SOLA category or one of the new section names (local_ai_course_assistant_general,_ai,_content,_safety,_engagement,_branding,_integrations). - No DB migrations.
- No configuration changes.
- If you use CDN mode for frontend delivery, no CDN rebuild is required for this release (template and server side changes only).
v3.4.3: i18n cleanup, starter translation fix, voice precondition reorder
What's new in v3.4.3
Patch release focused on internationalisation cleanup and two UX bug fixes. No schema changes, no new configuration, no capability changes. Safe drop in upgrade from 3.4.2.
i18n cleanup
- Replaced 17 hardcoded English strings in the widget template with Moodle string lookups. Affected UI: the language suggestion banner aria labels, debug panel buttons (Refresh, Copy all, Close), voice panel title, Notes tab saved subtitle and empty state, history Saved and History tabs, LLM provider and model picker labels, and footer Usability Testing and Feedback links.
- Added 17 new
chat:*string keys to the English lang file and translated all of them into the other 45 supported languages. - Backfilled
chat:starter_help_page,chat:starter_ask_anything, andchat:starter_review_practicein 41 language files that previously fell back to English. - Approximately 925 new or backfilled translation strings across the full 46 language set.
Starter translation on language switch
- Fixed a bug where conversation starter buttons would not re-translate when the student picked a different language at runtime. The client side gate was checking
data-translatable, which the server never emitted. Switched the gate todata-builtin, which the template already emits correctly. Also addeddata-builtin="1"to the 8 fallback starter buttons rendered whenstarter_managerreturns no data.
Voice feature click fix (Conversation Practice, Pronunciation Practice)
- Fixed a bug where clicking Conversation Practice or Pronunciation Practice on a non secure context (plain HTTP served over a LAN IP) appeared to do nothing. The preconditions check ran after the UI already switched to voice mode, and the error message was routed through the chat message area which is hidden in voice mode. Reordered the checks to run before the mode switch and routed errors through the visible notification toast.
Files changed
51 files, 1,041 insertions, 54 deletions. Most of the line count is translated strings in the 46 language files.
Upgrade notes
- No DB migrations.
- No new configuration settings.
- Existing custom starters are unaffected; only built in starters change behaviour on runtime language switch.
- If you use CDN mode for frontend delivery, rebuild and redeploy cdn/dist/sola.min.js before this update will take effect in the browser.
v3.4.2: Quiz Improvements, Learning Objectives, Language Fixes
What's New
Quiz and Starters
- Starters renamed: Explain This Page (was "Help With This") and Quiz Me (was "Quiz Me On This")
- Quiz topic picker filters out non-content sections (enrollment, certificate, feedback, survey, etc.)
- Learning Objectives picker now extracts real objectives from "Unit X Learning Outcomes" pages (supports GENERICO tags, HTML lists, and plain text)
- Starter label translations updated in all 46 languages
Language and Localization
- Input placeholder translates when language is switched (15 languages)
- English Lock fixed: frontend forces English, disables picker, shows "(Locked)" label, blocks settings changes
Voice Tab
- Voice mode passes page context (pageid, pagetitle) so AI responses are relevant to the current lesson
- Fixed voice transcript ordering (user/assistant messages now appear chronologically)
- Voice tab toggle is now per-course (Inherit / Force On / Force Off in course settings)
Performance
- New admin settings: Max Content Per Resource and Max Total Content (Performance tab)
- Content stuffing defaults halved (1,500/15,000 chars) for faster AI responses
- RAG retriever caches decoded embedding vectors in memory
White Label
- Chat widget title uses configured short name instead of hardcoded "SOLA" lang string
- Admin settings organized into 16 tabs
Admin
- Tabbed settings page (General, AI Provider, RAG, Quiz, Safety, Study Plans, Branding, FAQ, Voice, Updates, CDN, Analytics Export, Integrity, Surveys, Practice Scoring, Usability Testing, Performance)
- Default avatar border color updated to #152233
Upgrade Notes
- No breaking changes. Drop-in replacement for v3.4.1.
- Requires Moodle 4.5+.
Installation
Download ai_course_assistant.zip and upload via Site Admin > Plugins > Install plugins.
v3.4.0: Analytics Dashboard Expansion
Highlights
7-Tab Analytics Dashboard
Comprehensive analytics with lazy-loaded AJAX tabs and Chart.js visualizations:
- Overall Usage — enrollment, messages/student, session duration, return rate, time-of-day/day-of-week heatmaps
- By Course — per-course breakdown with horizontal bar chart + sortable table
- AI vs Non-Users — completion rates, average grades, time to completion (pulls from Moodle grade/completion APIs)
- By Unit — per-section student counts and message volume with progression chart
- Usage Types — doughnut chart of chat/voice/quiz/practice interaction modes
- Themes — keyword extraction with concept vs navigation/UX categorization
- AI Feedback — thumbs up/down, hallucination flags, survey results, messages-to-resolution
Per-Message Rating UI
- Thumbs up/down buttons on every assistant message
- Hallucination flagging checkbox on thumbs-down
- Optional comment field for qualitative feedback
- Data feeds directly into the Feedback analytics tab
Infrastructure
- 9 new web service endpoints for AJAX data loading
- 2 new database tables:
msg_ratings(per-message ratings + hallucination flags),keywords(cached keyword extraction) - 2 new columns on messages table:
interaction_type(chat/voice/quiz/practice),cmid(course module context) - SSE done event includes
messageidfor client-side rating - Chart.js 4.4.7 vendored for chart rendering
- CSV export for all tabs
i18n
- Analytics strings translated to all 46 supported languages
Upgrade Notes
- No breaking changes. The new analytics tabs appear below the existing course management section on the analytics page.
- Historical messages will show as 'chat' interaction type (tracking starts after upgrade).
- Per-unit analytics require the
cmidfield which populates after upgrade. - Requires Moodle 4.5+ (unchanged).
Installation
Download ai_course_assistant.zip below and upload via Site Admin → Plugins → Install plugins.
v3.3.0: CDN Frontend Delivery + Avatar Refresh
Highlights
CDN Frontend Delivery
SOLA can now serve its entire frontend (JS + CSS) from an external CDN, decoupling frontend updates from Moodle plugin upgrades. Ship UI fixes and features by pushing to GitHub — no hosting provider involvement needed.
- Single JS bundle: all 10 AMD modules in one
sola.min.js(224KB) - Minified CSS:
sola.min.css(73KB, down from 108KB) - GitHub Actions auto-deploys to GitHub Pages on push
- Two new admin settings: CDN Base URL + CDN Asset Version
- Zero-risk fallback: clear CDN URL to revert to local files
Performance
- JS HTTP requests reduced from 10 → 1
- CSS 32% smaller (73KB vs 108KB)
- CDN edge caching (vs single Moodle server)
- Pre-resolved module dependencies (no RequireJS overhead)
Avatar Refresh
- New character illustrations for avatars 02–10
- Optimized from 150–423KB SVGs to 13–22KB PNGs
- Removed unused legacy pix assets
i18n
- CDN settings translated to all 46 supported languages
Upgrade Notes
- No breaking changes. CDN mode is opt-in; default behavior unchanged.
- New admin settings appear under "CDN / Frontend Delivery" section.
- Requires Moodle 4.5+ (unchanged from v3.2.x).
Installation
Download ai_course_assistant.zip below and upload via Site Admin → Plugins → Install plugins.
v3.2.3 — Remove expand button
Changes
- Removed expand/collapse header button from the chat drawer
- Cleaned up associated CSS (
.local-ai-course-assistant__drawer--expandedstate rules, icon toggle CSS) - Removed
chat:expandandchat:collapsestrings from all 46 language files - Removed
toggleExpand(),EXPAND_KEYlocalStorage, andexpandBtnreferences fromchat.jsandui.js
v3.2.2: Security Review Fixes
v3.2.2 — Security Review Fixes
Addresses all findings from the Catalyst security and code review (WR-483440, 16 March 2026).
Critical: Installation Blocker Fixed
install.xmlembedding field changed from invalidTYPE="longtext"toTYPE="text"— plugin can now be installed on fresh Moodle instances
GDPR Compliance
- Privacy provider now declares all 9 tables containing personal data (was 4)
delete_data_for_user()anddelete_data_for_users()now delete from_feedback,_survey_resp,_ut_resp,_audit, and_practice_scores- Fixed
delete_data_for_users()asymmetry — now mirrors single-user deletion (plans + reminders) export_user_data()now exports study plans, reminders, feedback, and survey responses
Code Standards (Moodle PHPCS)
- All camelCase PHP variable names converted to snake_case across 15+ files
- PHPDoc blocks added to all
classes/external/public methods - Hardcoded English strings replaced with
get_string()insse.php,tts.php,reminder_manager.php
Race Condition Fix
userid_courseidindex on_convstable changed toUNIQUEget_or_create_conversation()wrapped in try/catch for concurrent request safety- Upgrade step deduplicates existing conversations and migrates orphaned messages
Other Fixes
course_settings.phpnow uses course context instead of system context (fixes breadcrumbs)- Removed
create_demo_course.phpfrom production package
v3.2.0
What's New in v3.2.0
UX Improvements
- Toggle button as Home: Clicking the chat button while the drawer is already open shows conversation starters (acts as Home/Reset) instead of closing
- Stop button for streaming: A "Stop" button appears during AI responses, letting users interrupt long messages and keep partial text
- Voice noise reduction: Speech detection threshold raised (0.012 → 0.02) and silence window extended (1.7s → 2.1s) to reduce false triggers from ambient noise
- Editable email for reminders: Email field in the settings panel is now an editable input (was read-only); defaults to Moodle email if blank
- Specific source links: AI now strongly prefers linking to the exact course activity page rather than the generic course view
Admin Dashboard — Course Management
- Bulk actions: Enable/Disable SOLA and Usability Testing for selected courses or all courses at once
- Checkbox selection: Select individual courses or use "Select all" for bulk operations
- Course search: Filter/search input to quickly find courses by name
- Status filters: Filter course list by SOLA status (enabled/disabled) and Usability Testing status (on/off/inherit)
- Sortable columns: Click column headers to sort by course name, SOLA status, UT status, or data availability
- Per-course usability testing toggle: Three states — On (forced), Off (forced), or Inherit Global setting
- Back to All Courses: Navigation link on per-course analytics view to return to the course list
AI Insights (Analytics Dashboard)
- New "Generate AI Insights" button on the per-course analytics page
- Sends all feedback, survey, and usability testing data to the configured AI provider
- Returns structured analysis: key issues, feature requests, positive highlights, and prioritized recommendations
- Only appears when there is data to analyze
Terminology Update
- Renamed "User Testing" to "Usability Testing" throughout the entire interface — widget footer, analytics dashboard, settings, admin editor, insights, and all documentation
Institution Name Setting
- New
institution_nameadmin setting under Branding (default: "Saylor University") - System prompt, avatar labels (46 languages), and AI insights all use this setting
- Enables rebranding without code changes (e.g., Saylor Academy → Saylor University)
Language Support
- All four translation layers now at 46 languages (added Hebrew starter prompts)
- UI lang files, SUPPORTED_LANGS, STARTER_LABELS, and STARTER_PROMPTS fully aligned
Bug Fixes
- Fixed AI Insights "Class curl not found" error (missing
require_onceforlib/filelib.php) - Fixed course search JS that was incorrectly scoped inside per-course view
v3.1.0: User Testing
User Testing
In-Widget Testing Panel (Option B)
- 8 default tasks covering: concept explanation, follow-ups, quiz testing, off-topic handling, overall experience, feature wishlist, recommendation likelihood, and settings usability
- Step-through flow with progress bar, "Go to SOLA" pause button, and completion screen
- Each response auto-captures message count and session duration
- Results displayed in the analytics dashboard with per-task breakdowns
- Fully customizable via the admin task editor (drag reorder, type switching, per-course overrides)
- Per-course toggle: Enable or disable user testing per course from the analytics dashboard (On / Off / Inherit Global)
External Form Link (Option C)
- Admin configurable URL with
{{userid}},{{courseid}},{{messages}},{{session_minutes}}placeholders - Works with Google Forms, Typeform, Qualtrics, or any URL-param-based form
AI Insights (Analytics Dashboard)
- New "AI Insights" section on the per-course analytics page
- Admin clicks "Generate AI Insights" to send feedback, survey, and user testing data to the configured AI provider
- Returns structured analysis: key issues, feature requests, positive highlights, and prioritized recommendations
- Only appears when there is feedback/survey/user testing data to analyze
Institution Name Setting
- New
institution_nameadmin setting under Branding (default: "Saylor University") - System prompt uses
{{institution}}placeholder — automatically substituted - Avatar label uses the setting across all 46 language files
- Enables rebranding without code changes (e.g., Saylor Academy → Saylor University)
UX Improvements
- Toggle button as Home: Clicking the chat toggle button while the drawer is already open now acts as the Home/Reset button (shows conversation starters) instead of closing the drawer
- Stop button for streaming: A "Stop" button appears during AI response streaming, allowing users to interrupt long responses
- Voice noise reduction: Increased speech detection threshold (0.012 → 0.02) and silence duration (1.7s → 2.1s) to reduce false triggers from ambient noise; barge-in (speaking to interrupt SOLA) already supported
- Editable email for reminders: Email address field in the settings panel is now editable (was read-only); defaults to Moodle email if left blank
- Specific source links: Strengthened AI source attribution prompt to strongly prefer linking to the specific course activity page rather than the generic course view
Admin Dashboard
- Disable All / Enable All: Bulk toggle buttons on the analytics course list to enable or disable SOLA across all courses at once (with confirmation)
- Course search: Filter/search input above the course list to quickly find specific courses
- Per-course user testing toggle: New column in the course table to enable/disable user testing per course (On / Off / Inherit Global)
Language Support: 46 Languages
- Added missing Hebrew (he) to starter prompt translations
- All three translation layers now at 46 languages: UI lang files, STT/TTS support, starter labels, and starter prompts
Admin
- New "User Testing" section in plugin settings (enable toggle, external URL, editor link)
- Task editor admin page with global/per-course scoping, preview, and reset to defaults
Technical
- New tables:
_ut_tasks,_ut_resp - New web services:
get_usertesting,submit_usertesting_response,generate_insights - New files:
usertesting_manager.php,usertesting_admin.php,generate_insights.php - "User Testing" footer link appears left of "Feedback" when enabled
v3.0.3
v3.0.3
Survey Question Editor
- New admin page for creating and editing survey questions (global default + per-course overrides)
- Add, edit, delete, and reorder questions via drag or arrow buttons
- Three question types: Multiple Choice (with options editor), Open Text, Rating Scale
- Rating scale supports min/max text labels (e.g. "Not at all" / "Very happy")
- Live preview shows how students will see the survey
- Course scope selector to switch between global and per-course surveys
- Reset to defaults or remove course override
- Accessible from Plugin Settings or Moodle admin menu
Specific Source Attribution
- Source pills now show the actual activity/resource name (e.g. "From: Unit 3 Reading Assignment") and link directly to that page
- Previously showed generic "From: Course Materials" linking to the course overview
- AI uses course module IDs from the course structure to cite specific resources
Widget Feature Guidance
- System prompt now includes awareness of all settings panel features
- When students ask to set up reminders, share phone numbers, or change preferences, the AI directs them to the gear icon in the chat header
- Prevents the AI from saying "I can't collect personal information" when the feature already exists
Rating Question Fix
- Question 5 now clarifies the scale: "(1 = not at all, 5 = very happy)"
- Rating UI shows min/max text labels flanking the number buttons
- Existing surveys updated automatically on upgrade