SlideShare a Scribd company logo
API Driven
Development in
Moodle
Bharat Pareek
Dhawal Bargir
Mission: Improve Open Source UI & UX
Default Layout
Remui Layout
Next Challenge: Grading UX
Design Solution
By Pass: Without Changing Moodle core
Rapid
Grader
Front-end
Moodle
DB
Moodle
API
Wait, What’s an API?
Google
Maps
in Uber
Request : Start and End Location and Time
Response: Distance, Traffic, etc
When API plugin development is needed?
● Connecting to an external software
● When overriding existing feature does not give you the
required control.
Amazing Moodle API
Mobile Apps
Web Clients {....}
React
Angular
GET / POST
JSON / XML
API Gateway
API Clients
Food items
in order
Order placed
message
Current Grading Interface
Moodle
Edwiser RapidGrader Interface
Easily distinguish between
graded/non graded users
Easily navigate between questions
API Development in Moodle
External service description
Think it of like a file where we
need to register our APIs.
External functions
External functions are used to
create API endpoints
API Calls
Call the API endpoint and
process the response received.
03
01 02
Know more about it:
https://docs.moodle.org/dev/External_services_description#Service_discovery
https://docs.moodle.org/dev/External_functions_API#Overview
External Service description
Registering your API endpoint in db/services.php file of a Moodle plugin.
<?php
$functions = array(
'block_grader_get_quiz_questions' => array(
'classname' => block_graderexternalapi',
'methodname' => get_quiz_questions
)
);
External Functions
Methods which are stored in externallib.php that can be accessed by external programs like an API client.
/**
* Describes the structure of parameters for the function.
*/
public static function get_quiz_questions_parameters() {
return new external_function_parameters(
array (
'attemptid' => new external_value(PARAM_INT, 'Attempt ID.', VALUE_DEFAULT, 0),
)
);
}
/**
* Get attempt questions
**/
public static function get_quiz_questions($attemptid) {
// business logic
return $questions;
}
/**
* Describes the structure of the function return value.
*/
public static function get_quiz_questions_returns() {
new external_single_structure(
array(
'number' => new external_value(PARAM_INT, 'Question Number'),
'status' => new external_value(PARAM_RAW, 'Question Status')
)
)
}
API Endpoints
http://moodle.server/webservice/rest/server.php?wsfunction=get_quiz_questions
An API endpoint is a URL with some parameters.
&wstoken=SECURITYTOKEN;
Precautions you need to take?
Security
System monitoring
Thank you for Listening
Quiz to jog your memory http://edwiser.org/api-quiz
You win products from Edwiser
Any Questions?
Thank you!

More Related Content

PPT
MCA Projects topics,Btech final year projects,Final year engg projects,BE fin...
DOCX
Resume_JyotiBagali_Sitecore_MVC&ASP.Net_2.8yrsExp
PPTX
MCA 6th Sem Project Report
DOC
SANGEETA_AngularJS_Developer
PPTX
Home management WebApp presentation
PPTX
Share point 2013 new features
DOCX
Ashok cv_1
DOC
MCA Projects topics,Btech final year projects,Final year engg projects,BE fin...
Resume_JyotiBagali_Sitecore_MVC&ASP.Net_2.8yrsExp
MCA 6th Sem Project Report
SANGEETA_AngularJS_Developer
Home management WebApp presentation
Share point 2013 new features
Ashok cv_1

What's hot (19)

DOCX
Resume-Sudhanshu ASP.NET
PDF
Industry-Standard Web Development Techniques for Angular
PPTX
ORACLE ADF training
DOCX
Rachna_Vadala_Resume_updated
DOC
Haridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
DOC
SIVA_RESUME@2016-1(1)
DOCX
Resume_Vinay_Sharma_Asp.Net
DOC
Shatrughna singh 2.9 years _of_experience
DOCX
Deepak_Raghav Resume done
PDF
Creativity and-skill-to-java-app-development
DOC
Amitre11feb
DOC
Resume
PPTX
Ionic and Azure
DOC
Rahul(1.7+ yr.expDotNet)
PDF
Virendra-Mishra-Resume without SEBIZ
DOCX
PDF
Build java-ee-applications-with-adf
PPT
Building a bot with an intent
PDF
iOS-iPhone documentation
Resume-Sudhanshu ASP.NET
Industry-Standard Web Development Techniques for Angular
ORACLE ADF training
Rachna_Vadala_Resume_updated
Haridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
SIVA_RESUME@2016-1(1)
Resume_Vinay_Sharma_Asp.Net
Shatrughna singh 2.9 years _of_experience
Deepak_Raghav Resume done
Creativity and-skill-to-java-app-development
Amitre11feb
Resume
Ionic and Azure
Rahul(1.7+ yr.expDotNet)
Virendra-Mishra-Resume without SEBIZ
Build java-ee-applications-with-adf
Building a bot with an intent
iOS-iPhone documentation
Ad

Similar to API-Driven Development in Moodle (20)

PDF
Postman 101 for Students
PPTX
Moodle and xAPI: The story so far
 
PDF
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
PPTX
Adobe Acrobat Pro DC 2025.001.20432 Crack + Serial Key
PDF
Adobe Acrobat Pro DC 2025.001.20432 Crack free Download
PDF
apidevelopment-250316174151-ce087222-250328054658-db40e0f2.pdf
PDF
Adobe Acrobat Pro DC 2025.001.20432 Crack free Download
PDF
Adobe Acrobat Pro DC 2025.001.20432 Crack free Download
PPTX
Adobe Acrobat Reader Download Free - 2025.001.20432
PPTX
Microsoft Office Professional Plus Greek 2025
PPTX
Nitro PDF Pro Enterprise Crack Download (Latest 2025)
PPTX
Adobe Acrobat Pro DC 2025.001.20432 Crack + Serial Key
PPTX
Microsoft Office 2021 free download of full version with crack
PPTX
Ratiborus KMS Tools Portable Download (Latest 2025) Crack
PPTX
KMSAuto++ 1.9.9 Free Download 2025 Crack
PPTX
Download DaVinci Resolve Studio 19.1.3 Free crack
PDF
Design Science MathType 7.8.2.441 Free Download crack
PDF
Adobe Acrobat Pro DC Download (Latest 2025) Pre-Activated crack
PPTX
IONISx – The Story of an API
PDF
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Postman 101 for Students
Moodle and xAPI: The story so far
 
How to Develop APIs - Importance, Types, Tools, Terminology, and Best Practic...
Adobe Acrobat Pro DC 2025.001.20432 Crack + Serial Key
Adobe Acrobat Pro DC 2025.001.20432 Crack free Download
apidevelopment-250316174151-ce087222-250328054658-db40e0f2.pdf
Adobe Acrobat Pro DC 2025.001.20432 Crack free Download
Adobe Acrobat Pro DC 2025.001.20432 Crack free Download
Adobe Acrobat Reader Download Free - 2025.001.20432
Microsoft Office Professional Plus Greek 2025
Nitro PDF Pro Enterprise Crack Download (Latest 2025)
Adobe Acrobat Pro DC 2025.001.20432 Crack + Serial Key
Microsoft Office 2021 free download of full version with crack
Ratiborus KMS Tools Portable Download (Latest 2025) Crack
KMSAuto++ 1.9.9 Free Download 2025 Crack
Download DaVinci Resolve Studio 19.1.3 Free crack
Design Science MathType 7.8.2.441 Free Download crack
Adobe Acrobat Pro DC Download (Latest 2025) Pre-Activated crack
IONISx – The Story of an API
Guide To API Development – Cost, Importance, Types, Tools, Terminology, and B...
Ad

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
Teaching material agriculture food technology
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
Encapsulation_ Review paper, used for researhc scholars
Programs and apps: productivity, graphics, security and other tools
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
Unlocking AI with Model Context Protocol (MCP)
Teaching material agriculture food technology

API-Driven Development in Moodle

  • 2. Mission: Improve Open Source UI & UX
  • 7. By Pass: Without Changing Moodle core Rapid Grader Front-end Moodle DB Moodle API
  • 8. Wait, What’s an API? Google Maps in Uber Request : Start and End Location and Time Response: Distance, Traffic, etc
  • 9. When API plugin development is needed? ● Connecting to an external software ● When overriding existing feature does not give you the required control.
  • 10. Amazing Moodle API Mobile Apps Web Clients {....} React Angular GET / POST JSON / XML API Gateway API Clients Food items in order Order placed message
  • 12. Edwiser RapidGrader Interface Easily distinguish between graded/non graded users Easily navigate between questions
  • 13. API Development in Moodle External service description Think it of like a file where we need to register our APIs. External functions External functions are used to create API endpoints API Calls Call the API endpoint and process the response received. 03 01 02 Know more about it: https://docs.moodle.org/dev/External_services_description#Service_discovery https://docs.moodle.org/dev/External_functions_API#Overview
  • 14. External Service description Registering your API endpoint in db/services.php file of a Moodle plugin. <?php $functions = array( 'block_grader_get_quiz_questions' => array( 'classname' => block_graderexternalapi', 'methodname' => get_quiz_questions ) );
  • 15. External Functions Methods which are stored in externallib.php that can be accessed by external programs like an API client. /** * Describes the structure of parameters for the function. */ public static function get_quiz_questions_parameters() { return new external_function_parameters( array ( 'attemptid' => new external_value(PARAM_INT, 'Attempt ID.', VALUE_DEFAULT, 0), ) ); } /** * Get attempt questions **/ public static function get_quiz_questions($attemptid) { // business logic return $questions; } /** * Describes the structure of the function return value. */ public static function get_quiz_questions_returns() { new external_single_structure( array( 'number' => new external_value(PARAM_INT, 'Question Number'), 'status' => new external_value(PARAM_RAW, 'Question Status') ) ) }
  • 17. Precautions you need to take? Security System monitoring
  • 18. Thank you for Listening Quiz to jog your memory http://edwiser.org/api-quiz You win products from Edwiser