Skip to content
Back to skills

Moodle External Api Development

ASecurity

Create custom external web service APIs for Moodle LMS. Use when implementing web services for course management, user tracking, quiz operations, or custom plugin functionality. Covers parameter validation, database operations, error handling, service registration, and Moodle coding standards.

  • 508 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 7, 2026
developmentjavascriptgojavasqlapidatabasebackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add Dokhacgiakhoa/antigravity-ide --skill moodle-external-api-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Moodle External Api Development?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Moodle External Api Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dokhacgiakhoa-moodle-external-api-development/badge)](https://www.skillsdirectory.com/skills/dokhacgiakhoa-moodle-external-api-development)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
version: 4.1.0-fractal
name: moodle-external-api-development
description: Create custom external web service APIs for Moodle LMS. Use when implementing web services for course management, user tracking, quiz operations, or custom plugin functionality. Covers parameter validation, database operations, error handling, service registration, and Moodle coding standards.
---

# Moodle External API Development

This skill guides you through creating custom external web service APIs for Moodle LMS, following Moodle's external API framework and coding standards.

## When to Use This Skill

- Creating custom web services for Moodle plugins
- Implementing REST/AJAX endpoints for course management
- Building APIs for quiz operations, user tracking, or reporting
- Exposing Moodle functionality to external applications
- Developing mobile app backends using Moodle

## Core Architecture Pattern

Moodle external APIs follow a strict three-method pattern:

1. **`execute_parameters()`** - Defines input parameter structure
2. **`execute()`** - Contains business logic
3. **`execute_returns()`** - Defines return structure

## Step-by-Step Implementation

## 🧠 Knowledge Modules (Fractal Skills)

### 1. [Step 1: Create the External API Class File](./sub-skills/step-1-create-the-external-api-class-file.md)
### 2. [Step 2: Define Input Parameters](./sub-skills/step-2-define-input-parameters.md)
### 3. [Step 3: Implement Business Logic](./sub-skills/step-3-implement-business-logic.md)
### 4. [Step 4: Define Return Structure](./sub-skills/step-4-define-return-structure.md)
### 5. [Step 5: Register the Service](./sub-skills/step-5-register-the-service.md)
### 6. [Step 6: Implement Error Handling & Logging](./sub-skills/step-6-implement-error-handling-logging.md)
### 7. [Complex Database Operations](./sub-skills/complex-database-operations.md)
### 8. [Working with Course Modules](./sub-skills/working-with-course-modules.md)
### 9. [Access Restrictions (Groups/Availability)](./sub-skills/access-restrictions-groupsavailability.md)
### 10. [Random Question Selection with Tags](./sub-skills/random-question-selection-with-tags.md)
### 11. [1. Via Moodle Web Services Test Client](./sub-skills/1-via-moodle-web-services-test-client.md)
### 12. [2. Via curl](./sub-skills/2-via-curl.md)
### 13. [3. Via JavaScript (AJAX)](./sub-skills/3-via-javascript-ajax.md)
### 14. [1. "Function not found" Error](./sub-skills/1-function-not-found-error.md)
### 15. [2. "Invalid parameter value detected"](./sub-skills/2-invalid-parameter-value-detected.md)
### 16. [3. SQL Injection Vulnerabilities](./sub-skills/3-sql-injection-vulnerabilities.md)
### 17. [4. Permission Denied Errors](./sub-skills/4-permission-denied-errors.md)
### 18. [5. Transaction Deadlocks](./sub-skills/5-transaction-deadlocks.md)
### 19. [Simple Read API (Get Quiz Attempts)](./sub-skills/simple-read-api-get-quiz-attempts.md)
### 20. [Complex Write API (Create Quiz from Categories)](./sub-skills/complex-write-api-create-quiz-from-categories.md)

Files in this skill

  • SKILL.md3 KB
  • sub-skills/1-function-not-found-error.md220 B
  • sub-skills/1-via-moodle-web-services-test-client.md371 B
  • sub-skills/2-invalid-parameter-value-detected.md194 B
  • sub-skills/2-via-curl.md420 B
  • sub-skills/3-sql-injection-vulnerabilities.md219 B
  • sub-skills/3-via-javascript-ajax.md453 B
  • sub-skills/4-permission-denied-errors.md210 B
  • sub-skills/5-transaction-deadlocks.md1.2 KB
  • sub-skills/access-restrictions-groupsavailability.md1.1 KB
  • sub-skills/complex-database-operations.md457 B
  • sub-skills/complex-write-api-create-quiz-from-categories.md1.9 KB
  • sub-skills/random-question-selection-with-tags.md931 B
  • sub-skills/simple-read-api-get-quiz-attempts.md1.4 KB
  • sub-skills/step-1-create-the-external-api-class-file.md695 B
  • sub-skills/step-2-define-input-parameters.md1.2 KB
  • sub-skills/step-3-implement-business-logic.md1.7 KB
  • sub-skills/step-4-define-return-structure.md718 B
  • sub-skills/step-5-register-the-service.md1.1 KB
  • sub-skills/step-6-implement-error-handling-logging.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.