Moodle Plugins directory: Tiny AI Prompt Generator | Moodle.org
Tiny AI Prompt Generator
TinyMCE ::: tiny_aipromptgen
Maintained by
Boban Blagojević
Tiny AI Prompt Generator is a self-contained TinyMCE plugin for Moodle. It allows teachers to build pedagogical prompts through a guided interface and generate AI responses using OpenAI or a local Ollama server, directly within the editor.
Latest release:
1 sites
12 downloads
1 fans
Current versions available: 2
Tiny AI Prompt Generator (TinyMCE Plugin)
Tiny AI Prompt Generator is a self-contained TinyMCE plugin for Moodle. It allows teachers to build pedagogical prompts through a guided interface and generate AI responses using OpenAI or a local Ollama server, directly within the editor.
Features
- Standalone Guided Builder: Easily construct prompts by selecting subjects, topics, learning outcomes, and more.
- AI Response Integration:
- OpenAI: Connect to GPT-3.5/4/4o models via API key.
- Ollama: Connect to local LLMs (like Llama 3, Phi-3, Mistral) for private, zero-cost generation.
- Real-time Streaming: Watch AI responses appear in real-time as they are generated.
- Response Modes: View and copy AI responses in multiple formats:
- RAW: Exact AI output.
- TEXT: Cleaned up plain text.
- HTML: Rendered formatting.
- HTML CODE: The underlying HTML source.
- Privacy Compliant: Implements Moodle Privacy API (null provider - no personal data stored).
Compatibility
| Moodle Version | Supported |
|---|---|
| Moodle 4.1 | ✅ |
| Moodle 4.2 | ✅ |
| Moodle 4.3 | ✅ |
| Moodle 4.4 | ✅ |
| Moodle 4.5 | ✅ |
| Moodle 5.0 | ✅ |
| Moodle 5.1 | ✅ |
Minimum PHP Version: 8.1
Installation
- Download the plugin and place it in:
lib/editor/tiny/plugins/aipromptgen - Login to Moodle as an administrator.
- Navigate to Site administration → Notifications to complete the installation.
- Go to Site administration → Plugins → Text editors → TinyMCE editor → AI Prompt Generator to configure your API keys (OpenAI) or Ollama endpoints.
Configuration
OpenAI Setup
- Obtain an API key from OpenAI.
- Enter your API key in the plugin settings.
- Choose your preferred model (default:
gpt-4o-mini).
Ollama Setup (Local AI)
- Install Ollama on your server.
- Pull a model:
ollama pull llama3 - Configure the endpoint in plugin settings (default:
http://localhost:11434). - Set the model name (e.g.,
llama3,mistral,phi3:mini).
Usage
- Open the TinyMCE editor (e.g., in a Course Page, Page resource, or Assignment).
- Look for the AI Prompt Generator icon ( 🤖 ) in the toolbar.
- Fill in the prompt details (Subject, Audience, Outcomes, etc.).
- Select your preferred AI Provider and click Send to AI.
- View the streaming response and copy or use the generated content.
Permissions
The plugin uses the following capability:
tiny/aipromptgen:use: Controls who can use the AI Prompt Generator.
Default roles with access: Manager, Course creator, Editing Teacher, Teacher.
Building from Source
If you modify the JavaScript source files, rebuild the AMD modules:
cd lib/editor/tiny/plugins/aipromptgen
grunt amd --force
Technical Requirements
- Moodle 4.1 or higher
- PHP 8.1 or higher
- TinyMCE editor enabled (standard in Moodle 4.x)
- Node.js 20+ (for building AMD modules if modifying the source)
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
© 2025 AI4Teachers | Boban Blagojević
Useful links
Contributors
Boban Blagojević (Lead maintainer)
Please login to view contributors details and/or to contact them
Comments