moodle-ai-subsystem
Moodle AI Subsystem Integration
Integrate AI capabilities into Moodle 4.5+ using the AI Subsystem.
When to Use This Skill
- Creating AI providers (Ollama, Anthropic, OpenAI)
- Implementing AI actions
- Building AI placements in courses
- Text generation and summarization
See reference.md for complete patterns.
Provider Implementation
namespace aitool_ollama;
class provider extends \core_ai\provider {
public function get_action_list(): array {
return [
\core_ai\aiactions\generate_text::class,
\core_ai\aiactions\summarise_text::class,
];
}
}
Action Usage
$manager = \core_ai\manager::get_manager();
$action = new \core_ai\aiactions\generate_text(
contextid: $context->id,
userid: $USER->id,
prompttext: $prompt
);
$response = $manager->process_action($action);
Key Concepts
- Provider: Connection to AI service (API)
- Action: Specific AI capability (generate, summarize)
- Placement: Where AI appears in Moodle UI
More from astoeffer/plugin-marketplace
moodle-standards
Moodle coding standards with PSR-12 compliance and Frankenstyle naming. Use when developing Moodle plugins, writing PHP code for Moodle, or ensuring code quality compliance.
9psr12-moodle
Automatically validate and fix Moodle PHP code for PSR-12 compliance with Moodle-specific exceptions (lowercase_with_underscores naming, frankenstyle prefixes). Activates when working with Moodle plugin PHP files or when code standards issues are detected.
4h5p-patterns
Create interactive H5P content for Moodle and web platforms. Use when building interactive exercises, quizzes, or multimedia learning content.
2ai-gateway
Build AI gateway services for routing and managing LLM requests. Use when implementing API proxies, rate limiting, or multi-provider AI services.
2design-tokens
Manage design tokens for consistent theming across platforms. Use when defining colors, typography, spacing, or other design system values.
1chatbot-widget
Build embeddable chatbot widgets for web applications. Use when creating chat UIs, iframe embeds, or widget-based AI interfaces.
1