Tiny AI Prompt Generator
Versions
Current version
1.9 (2026030501)
1.9
Plugin type: TinyMCE
Frankenstyle component name: tiny_aipromptgen
Version build number: 2026030501
Version release name: 1.9
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1, 5.2
Repository URL (Git): https://github.com/blagojevicboban/moodle-tiny_aipromptgen
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/blagojevicboban/moodle-tiny_aipromptgen/issues
Changelog
All notable changes to this project will be documented in this file.
[1.9] - 2026-03-05
Fixed
- ESLint Warnings (Nested Promises): Refactored streaming loop in
amd/src/stream.jsfrom chained.then()/ recursivepump()pattern toasync/awaitwith awhile (!result.done)loop, eliminatingpromise/no-nestingandno-constant-conditionESLint warnings. - PHPCS MoodleInternalGlobalState: Moved
define('NO_DEBUG_DISPLAY', true)to afterrequire_once('config.php')inview.phpto satisfy the Moodle CodeSniffer global-state rule. - Blank Page Bug: Removed incorrectly placed
defined('MOODLE_INTERNAL') || die()guard from the web entry-pointview.php; that check belongs only in class/library files. - AMD Build: Rebuilt
amd/build/stream.min.jsusing the Moodle-compatible Babel AMD transform (babel-plugin-transform-es2015-modules-amd-lazy) to match the exact output format expected by the CI stale-file check.
[1.8.2] - 2026-03-05
Fixed
- Stream Crash / Cache Definition Error: Fixed an issue where releasing the Moodle session early in
AJAX_SCRIPTmode caused a fatal error (The requested cache definition does not exist.core/session) by properly injecting$SESSIONglobals and disablingNO_DEBUG_DISPLAY. - Unhandled Permission Exceptions: Wrapped capability and login checks in
view.phpwith a try-catch block to gracefully intercept internal Moodle security redirects (likerequire_sesskeyandrequire_capability), displaying inline UI error messages instead of silently breaking the stream with HTTP 404 or 303 Redirects. - Capabilities Warning: Supplied the missing translation string for
aipromptgen:useto silence debug output that previously corrupted the SSE data payload.
[1.8.1] - 2026-03-04
Fixed
- Streaming 404 Error (URL Length Limit): Refactored AI streaming from GET-based
EventSourceto POST-basedfetchto bypass web server URL length limits and mod_security rules that threw 404 or 414 errors for long pedagogical prompts. - Provider Override Bug: Addressed a bug in the JavaScript streaming module where the active AI provider was inadvertently hardcoded to
ollama, ensuring that Gemini, Claude, DeepSeek, and Custom APIs now trigger their respective streaming logic correctly.
[1.8] - 2026-03-04
Fixed
- TinyMCE Plugin Initialization: Resolved
TypeError: getPluginConfiguration is not a functionby updating the plugin to use the standard TinyMCEeditor.options.getAPI for Moodle 4.x compatibility. - Improved Language Strings: Added missing
form_topicbrowseidentifier and standardized "Browse" button labels in the pedagogical form for better consistency. - Production Minification Patch: Directly patched the minified
plugin.min.jsto ensure stability in production environments where scripts are combined/minified by Moodle. - Documentation Hygiene: Wrapped long lines in
README.htmlandREADME.mdto comply with coding standards and improve maintainability.
[1.7] - 2026-03-04
Added
- Predefined Quick Templates: Admin-configurable pedagogical templates for one-click prompt generation. Includes 4 built-in defaults (Bloom's Taxonomy, Lesson Plan, Socratic Tutor, Executive Summary).
- Rate Limiting (Anti-abuse): Configurable maximum AI requests per user per hour (default: 50) using Moodle's session cache.
- Dynamic Toolbar Tooltip: Shows the active AI provider and model directly on the TinyMCE toolbar button.
- Provider Persistence: Remembers the teacher's preferred AI provider via
localStorage.
[1.6] - 2026-03-04
Added
- Configurable AI Temperature setting (0.0–2.0, default 0.7) applied to all providers.
- Configurable Max Tokens setting (default 1024) applied to all providers.
- Maps to
max_tokensfor OpenAI/DeepSeek/Claude/Custom,maxOutputTokensfor Gemini,num_predictfor Ollama.
- Maps to
[1.5] - 2026-03-04
Added
- Added support for DeepSeek API (deepseek-chat, deepseek-reasoner models).
- Added support for Custom OpenAI-compatible API endpoints (LM Studio, Groq, OpenRouter,
Together AI, vLLM, and any other service following the OpenAI API format). - Real-time SSE streaming for DeepSeek and Custom API providers.
- New admin settings for DeepSeek API key and model.
- New admin settings for Custom API endpoint URL, API key (optional), and model name.
- Automatic SSL bypass for local/private-network Custom API endpoints.
[1.4] - 2026-03-04
Added
- Added support for Google Gemini API (gemini-1.5-flash, gemini-1.5-pro etc.).
- Added support for Anthropic Claude API (claude-3-5-sonnet, claude-3-haiku etc.).
- New API configuration settings for Gemini and Claude in Moodle admin panel.
- Improved AI client with unified multi-provider request handling.
[1.3] - 2026-02-04
Fixed
- Fixed JavaScript string keys in ui.js to use underscores instead of colons, matching the language file updates from v1.2.
- Prompt generation now correctly displays localized strings instead of raw string identifiers.
[1.2] - 2026-02-04
Changed
- Refactored cURL implementation to use Moodle's
curlclass for better proxy support and security. - Renamed global functions to follow Moodle's frankenstyle naming conventions.
- Updated language string identifiers to use underscores instead of colons (Moodle standard).
- Improved CSS compliance with Moodle coding standards (removed
!important, fixed formatting). - Split JavaScript variable declarations to comply with ESLint rules.
Added
- Implemented Moodle Privacy API with null provider (plugin does not store personal data).
- Extended CI matrix to test against Moodle 4.0 through 5.0.
- Added compatibility table to README.
Fixed
- Fixed class brace placement in PHP files to comply with Moodle coding standards.
- Corrected capability name validation in plugininfo.php.
- Resolved all CSS and JavaScript linting errors.
[1.1] - 2026-02-01
Changed
- Improved context awareness: Automatically detects context (Topic and Lesson title) from the Moodle page when opening the editor.
- Refined content insertion: Fixed issues with missing line breaks when inserting plain text or raw content into the editor.
- Enhanced UX: Added visual streaming status indicators (Connecting, Receiving, Finished) in the AI response modal.
- Improved "Send to AI" feedback: Button now shows "Generating..." state for non-streaming providers.
Fixed
- Fixed breadcrumb-based topic detection to exclude common Moodle UI terms like "Settings" or "General".
- Resolved various linting and PHPDoc errors to comply with Moodle coding standards.
- Added example context to Mustache templates for better CI/CD integration.
Added
- GitHub Actions CI workflow for automated testing and linting.
[1.0] - 2026-01-31
Added
- Initial release of the Tiny AI Prompt Generator plugin.
- Seamless integration with TinyMCE editor in Moodle.
- AI-assisted prompt builder interface.
- Rich text and HTML copying capabilities.
- Configurable settings for site administrators.
1.4 (2026030400)
1.4
Plugin type: TinyMCE
Frankenstyle component name: tiny_aipromptgen
Version build number: 2026030400
Version release name: 1.4
Maturity: Stable
Supported Moodle versions: 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/blagojevicboban/moodle-tiny_aipromptgen
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/blagojevicboban/moodle-tiny_aipromptgen/issues
Changelog
All notable changes to this project will be documented in this file.
[1.4] - 2026-03-04
Added
- Added support for Google Gemini API (gemini-1.5-flash, gemini-1.5-pro etc.).
- Added support for Anthropic Claude API (claude-3-5-sonnet, claude-3-haiku etc.).
- New API configuration settings for Gemini and Claude in Moodle admin panel.
- Improved AI client with unified multi-provider request handling.
[1.3] - 2026-02-04
Fixed
- Fixed JavaScript string keys in ui.js to use underscores instead of colons, matching the language file updates from v1.2.
- Prompt generation now correctly displays localized strings instead of raw string identifiers.
[1.2] - 2026-02-04
Changed
- Refactored cURL implementation to use Moodle's
curlclass for better proxy support and security. - Renamed global functions to follow Moodle's frankenstyle naming conventions.
- Updated language string identifiers to use underscores instead of colons (Moodle standard).
- Improved CSS compliance with Moodle coding standards (removed
!important, fixed formatting). - Split JavaScript variable declarations to comply with ESLint rules.
Added
- Implemented Moodle Privacy API with null provider (plugin does not store personal data).
- Extended CI matrix to test against Moodle 4.0 through 5.0.
- Added compatibility table to README.
Fixed
- Fixed class brace placement in PHP files to comply with Moodle coding standards.
- Corrected capability name validation in plugininfo.php.
- Resolved all CSS and JavaScript linting errors.
[1.1] - 2026-02-01
Changed
- Improved context awareness: Automatically detects context (Topic and Lesson title) from the Moodle page when opening the editor.
- Refined content insertion: Fixed issues with missing line breaks when inserting plain text or raw content into the editor.
- Enhanced UX: Added visual streaming status indicators (Connecting, Receiving, Finished) in the AI response modal.
- Improved "Send to AI" feedback: Button now shows "Generating..." state for non-streaming providers.
Fixed
- Fixed breadcrumb-based topic detection to exclude common Moodle UI terms like "Settings" or "General".
- Resolved various linting and PHPDoc errors to comply with Moodle coding standards.
- Added example context to Mustache templates for better CI/CD integration.
Added
- GitHub Actions CI workflow for automated testing and linting.
[1.0] - 2026-01-31
Added
- Initial release of the Tiny AI Prompt Generator plugin.
- Seamless integration with TinyMCE editor in Moodle.
- AI-assisted prompt builder interface.
- Rich text and HTML copying capabilities.
- Configurable settings for site administrators.
1.3 (2026020403)
1.3
Plugin type: TinyMCE
Frankenstyle component name: tiny_aipromptgen
Version build number: 2026020403
Version release name: 1.3
Maturity: Stable
Supported Moodle versions: 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/blagojevicboban/moodle-tiny_aipromptgen
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/blagojevicboban/moodle-tiny_aipromptgen/issues
Changelog
All notable changes to this project will be documented in this file.
[1.3] - 2026-02-04
Fixed
- Fixed JavaScript string keys in ui.js to use underscores instead of colons, matching the language file updates from v1.2.
- Prompt generation now correctly displays localized strings instead of raw string identifiers.
[1.2] - 2026-02-04
Changed
- Refactored cURL implementation to use Moodle's
curlclass for better proxy support and security. - Renamed global functions to follow Moodle's frankenstyle naming conventions.
- Updated language string identifiers to use underscores instead of colons (Moodle standard).
- Improved CSS compliance with Moodle coding standards (removed
!important, fixed formatting). - Split JavaScript variable declarations to comply with ESLint rules.
Added
- Implemented Moodle Privacy API with null provider (plugin does not store personal data).
- Extended CI matrix to test against Moodle 4.1 through 5.1.
- Added compatibility table to README.
Fixed
- Fixed class brace placement in PHP files to comply with Moodle coding standards.
- Corrected capability name validation in plugininfo.php.
- Resolved all CSS and JavaScript linting errors.
[1.1] - 2026-02-01
Changed
- Improved context awareness: Automatically detects context (Topic and Lesson title) from the Moodle page when opening the editor.
- Refined content insertion: Fixed issues with missing line breaks when inserting plain text or raw content into the editor.
- Enhanced UX: Added visual streaming status indicators (Connecting, Receiving, Finished) in the AI response modal.
- Improved "Send to AI" feedback: Button now shows "Generating..." state for non-streaming providers.
Fixed
- Fixed breadcrumb-based topic detection to exclude common Moodle UI terms like "Settings" or "General".
- Resolved various linting and PHPDoc errors to comply with Moodle coding standards.
- Added example context to Mustache templates for better CI/CD integration.
Added
- GitHub Actions CI workflow for automated testing and linting.
[1.0] - 2026-01-31
Added
- Initial release of the Tiny AI Prompt Generator plugin.
- Seamless integration with TinyMCE editor in Moodle.
- AI-assisted prompt builder interface.
- Rich text and HTML copying capabilities.
- Configurable settings for site administrators.
1.1 (2026020101)
1.1
Plugin type: TinyMCE
Frankenstyle component name: tiny_aipromptgen
Version build number: 2026020101
Version release name: 1.1
Maturity: Stable
Supported Moodle versions: 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0, 5.1
Repository URL (Git): https://github.com/blagojevicboban/moodle-tiny_aipromptgen
Repository branch:
Repository tag:
Issue/bug tracker URL: https://github.com/blagojevicboban/moodle-tiny_aipromptgen/issues
Changelog
All notable changes to this project will be documented in this file.
[1.1] - 2026-02-01
Changed
- Improved context awareness: Automatically detects context (Topic and Lesson title) from the Moodle page when opening the editor.
- Refined content insertion: Fixed issues with missing line breaks when inserting plain text or raw content into the editor.
- Enhanced UX: Added visual streaming status indicators (Connecting, Receiving, Finished) in the AI response modal.
- Improved "Send to AI" feedback: Button now shows "Generating..." state for non-streaming providers.
Fixed
- Fixed breadcrumb-based topic detection to exclude common Moodle UI terms like "Settings" or "General".
- Resolved various linting and PHPDoc errors to comply with Moodle coding standards.
- Added example context to Mustache templates for better CI/CD integration.
Added
- GitHub Actions CI workflow for automated testing and linting.
[1.0] - 2026-01-31
Added
- Initial release of the Tiny AI Prompt Generator plugin.
- Seamless integration with TinyMCE editor in Moodle.
- AI-assisted prompt builder interface.
- Rich text and HTML copying capabilities.
- Configurable settings for site administrators.