Cursor rule
.cursor/rules/moodle-web-services-and-api.mdc[object Object]
Cursor rules
Quality
50/100
Scores the file, not the repository.Length
144 words
5 headings · 1 code blocksRepository
4
— · pushed 2 days agoLast changed
3 days ago
First indexed 3 days ago.123456---7name: Moodle Web Services and API Development8---910# Moodle Web Services and API Development1112## Purpose13Ensure secure, maintainable, and standards-compliant web services and APIs in Moodle.1415## Instructions16- Use Moodle's web service API for exposing functionality17- Define external functions in `db/services.php` and `externallib.php`18- Use parameter validation and capability checks in all API endpoints19- Return data in standard formats (JSON, XML)20- Document all API endpoints and parameters21- Use tokens or OAuth2 for authentication22- Log API usage and errors23- Version APIs for backward compatibility2425## Examples26```php27// File: ./db/services.php28$services = [29 'myplugin_service' => [30 'functions' => ['myplugin_get_data'],31 'restrictedusers' => 0,32 'enabled' => 1,33 ],34];3536// File: ./externallib.php37function myplugin_get_data_parameters() {38 return new external_function_parameters([39 'id' => new external_value(PARAM_INT, 'User ID'),40 ]);41}42```4344## Exceptions45- Internal-only APIs may skip authentication with justification46
Also in WisdmLabs/moodle-local_edwiserreports-free
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-ajax-and-js-integration.mdc · 4 | Cursor rules | agent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-configuration-management.mdc · 4 | Cursor rules | agent-behaviour | 36/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-database-patterns.mdc · 4 | Cursor rules | styledatabaseagent-behaviour | 54/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-error-handling.mdc · 4 | Cursor rules | agent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-events-and-callbacks.mdc · 4 | Cursor rules | agent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-file-and-media-handling.mdc · 4 | Cursor rules | agent-behaviour | 36/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-internationalization.mdc · 4 | Cursor rules | agent-behaviour | 36/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-performance-optimization.mdc · 4 | Cursor rules | performanceagent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-php-coding-standards.mdc · 4 | Cursor rules | agent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-plugin-structure.mdc · 4 | Cursor rules | archagent-behaviour | 54/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-scheduled-tasks.mdc · 4 | Cursor rules | agent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-security-practices.mdc · 4 | Cursor rules | securityagent-behaviour | 50/100 | 3 days ago | |
| WisdmLabs/moodle-local_edwiserreports-free.cursor/rules/moodle-testing-and-quality.mdc · 4 | Cursor rules | testtesting-strategyagent-behaviour | 54/100 | 3 days ago |
Diff against .cursor/rules/moodle-ajax-and-js-integration.mdc Diff against .cursor/rules/moodle-configuration-management.mdc Diff against .cursor/rules/moodle-database-patterns.mdc Diff against .cursor/rules/moodle-error-handling.mdc Diff against .cursor/rules/moodle-events-and-callbacks.mdc Diff against .cursor/rules/moodle-file-and-media-handling.mdc Diff against .cursor/rules/moodle-internationalization.mdc Diff against .cursor/rules/moodle-performance-optimization.mdc Diff against .cursor/rules/moodle-php-coding-standards.mdc Diff against .cursor/rules/moodle-plugin-structure.mdc Diff against .cursor/rules/moodle-scheduled-tasks.mdc Diff against .cursor/rules/moodle-security-practices.mdc Diff against .cursor/rules/moodle-testing-and-quality.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
