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

What's hot

Industry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for AngularIndustry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for Angular
Jai Prakash Mishra
 
ORACLE ADF training
ORACLE ADF trainingORACLE ADF training
ORACLE ADF training
Dennis Martin
 
Rachna_Vadala_Resume_updated
Rachna_Vadala_Resume_updatedRachna_Vadala_Resume_updated
Rachna_Vadala_Resume_updatedRachna Vadala
 
Haridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
Haridas_Resume_ASP.NET_MVC_5+_Yrs_ExpHaridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
Haridas_Resume_ASP.NET_MVC_5+_Yrs_ExpHaridas R
 
Resume_Vinay_Sharma_Asp.Net
Resume_Vinay_Sharma_Asp.NetResume_Vinay_Sharma_Asp.Net
Resume_Vinay_Sharma_Asp.NetVinay Sharma
 
Shatrughna singh 2.9 years _of_experience
Shatrughna singh 2.9 years _of_experienceShatrughna singh 2.9 years _of_experience
Shatrughna singh 2.9 years _of_experience
Shatrughna Singh
 
Deepak_Raghav Resume done
Deepak_Raghav Resume doneDeepak_Raghav Resume done
Deepak_Raghav Resume doneDeepak Raghav
 
Creativity and-skill-to-java-app-development
Creativity and-skill-to-java-app-developmentCreativity and-skill-to-java-app-development
Creativity and-skill-to-java-app-developmentDeepika Chaudhary
 
Ionic and Azure
Ionic and AzureIonic and Azure
Ionic and Azure
laloving
 
Rahul(1.7+ yr.expDotNet)
Rahul(1.7+ yr.expDotNet)Rahul(1.7+ yr.expDotNet)
Rahul(1.7+ yr.expDotNet)Rahul Jangir
 
Virendra-Mishra-Resume without SEBIZ
Virendra-Mishra-Resume without SEBIZVirendra-Mishra-Resume without SEBIZ
Virendra-Mishra-Resume without SEBIZVirendra Mishra
 
Build java-ee-applications-with-adf
Build java-ee-applications-with-adfBuild java-ee-applications-with-adf
Build java-ee-applications-with-adf
Amit Sharma
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
Abhishek Sur
 
iOS-iPhone documentation
iOS-iPhone documentationiOS-iPhone documentation
iOS-iPhone documentationRaj Dubey
 

What's hot (20)

N.R
N.RN.R
N.R
 
Resume-Sudhanshu ASP.NET
Resume-Sudhanshu ASP.NETResume-Sudhanshu ASP.NET
Resume-Sudhanshu ASP.NET
 
Industry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for AngularIndustry-Standard Web Development Techniques for Angular
Industry-Standard Web Development Techniques for Angular
 
ORACLE ADF training
ORACLE ADF trainingORACLE ADF training
ORACLE ADF training
 
Rachna_Vadala_Resume_updated
Rachna_Vadala_Resume_updatedRachna_Vadala_Resume_updated
Rachna_Vadala_Resume_updated
 
Haridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
Haridas_Resume_ASP.NET_MVC_5+_Yrs_ExpHaridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
Haridas_Resume_ASP.NET_MVC_5+_Yrs_Exp
 
SIVA_RESUME@2016-1(1)
SIVA_RESUME@2016-1(1)SIVA_RESUME@2016-1(1)
SIVA_RESUME@2016-1(1)
 
Resume_Vinay_Sharma_Asp.Net
Resume_Vinay_Sharma_Asp.NetResume_Vinay_Sharma_Asp.Net
Resume_Vinay_Sharma_Asp.Net
 
Shatrughna singh 2.9 years _of_experience
Shatrughna singh 2.9 years _of_experienceShatrughna singh 2.9 years _of_experience
Shatrughna singh 2.9 years _of_experience
 
Deepak_Raghav Resume done
Deepak_Raghav Resume doneDeepak_Raghav Resume done
Deepak_Raghav Resume done
 
Creativity and-skill-to-java-app-development
Creativity and-skill-to-java-app-developmentCreativity and-skill-to-java-app-development
Creativity and-skill-to-java-app-development
 
Amitre11feb
Amitre11febAmitre11feb
Amitre11feb
 
Resume
ResumeResume
Resume
 
Ionic and Azure
Ionic and AzureIonic and Azure
Ionic and Azure
 
Rahul(1.7+ yr.expDotNet)
Rahul(1.7+ yr.expDotNet)Rahul(1.7+ yr.expDotNet)
Rahul(1.7+ yr.expDotNet)
 
Virendra-Mishra-Resume without SEBIZ
Virendra-Mishra-Resume without SEBIZVirendra-Mishra-Resume without SEBIZ
Virendra-Mishra-Resume without SEBIZ
 
udhay
udhayudhay
udhay
 
Build java-ee-applications-with-adf
Build java-ee-applications-with-adfBuild java-ee-applications-with-adf
Build java-ee-applications-with-adf
 
Building a bot with an intent
Building a bot with an intentBuilding a bot with an intent
Building a bot with an intent
 
iOS-iPhone documentation
iOS-iPhone documentationiOS-iPhone documentation
iOS-iPhone documentation
 

Similar to API-Driven Development in Moodle

CV 5 years exp. in UI Front End Developer
CV  5 years exp. in UI Front End DeveloperCV  5 years exp. in UI Front End Developer
CV 5 years exp. in UI Front End Developer
PUSHPRAJ MISHRA
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Ashwin Date
 
Javatraining
JavatrainingJavatraining
Javatraining
THINK IT Training
 
Ranjeet Mishra_JAVA_3+year exp
Ranjeet Mishra_JAVA_3+year expRanjeet Mishra_JAVA_3+year exp
Ranjeet Mishra_JAVA_3+year expRanjeet Mishra
 
9 Best Tools to Leverage for Progressive Web App Development
9 Best Tools to Leverage for Progressive Web App Development9 Best Tools to Leverage for Progressive Web App Development
9 Best Tools to Leverage for Progressive Web App Development
codecraftcrew
 
Waqar Ahmed CV
Waqar Ahmed CVWaqar Ahmed CV
Waqar Ahmed CVSSUET
 
Biswajit-Resume-PHP-Drupal
Biswajit-Resume-PHP-DrupalBiswajit-Resume-PHP-Drupal
Biswajit-Resume-PHP-DrupalBiswajit Jena
 
Shivam Sharma resume(.Net Developer)
Shivam Sharma resume(.Net Developer)Shivam Sharma resume(.Net Developer)
Shivam Sharma resume(.Net Developer)
Shivam Sharma
 
MohitKumarGupta_Resume
MohitKumarGupta_ResumeMohitKumarGupta_Resume
MohitKumarGupta_Resume
Mohit Kumar Gupta
 
SHIVRAJSresumeSyracyse (1)
SHIVRAJSresumeSyracyse (1)SHIVRAJSresumeSyracyse (1)
SHIVRAJSresumeSyracyse (1)shivraj srinivas
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
SharePointRadi
 
{Re}designing a Developer Portal
{Re}designing a Developer Portal{Re}designing a Developer Portal
{Re}designing a Developer Portal
Pronovix
 

Similar to API-Driven Development in Moodle (20)

CV 5 years exp. in UI Front End Developer
CV  5 years exp. in UI Front End DeveloperCV  5 years exp. in UI Front End Developer
CV 5 years exp. in UI Front End Developer
 
Resume_Ravichandra Thota
Resume_Ravichandra ThotaResume_Ravichandra Thota
Resume_Ravichandra Thota
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014
 
Javatraining
JavatrainingJavatraining
Javatraining
 
BhaskarCV
BhaskarCVBhaskarCV
BhaskarCV
 
Ranjeet Mishra_JAVA_3+year exp
Ranjeet Mishra_JAVA_3+year expRanjeet Mishra_JAVA_3+year exp
Ranjeet Mishra_JAVA_3+year exp
 
9 Best Tools to Leverage for Progressive Web App Development
9 Best Tools to Leverage for Progressive Web App Development9 Best Tools to Leverage for Progressive Web App Development
9 Best Tools to Leverage for Progressive Web App Development
 
Waqar Ahmed CV
Waqar Ahmed CVWaqar Ahmed CV
Waqar Ahmed CV
 
Biswajit-Resume-PHP-Drupal
Biswajit-Resume-PHP-DrupalBiswajit-Resume-PHP-Drupal
Biswajit-Resume-PHP-Drupal
 
Bharat
BharatBharat
Bharat
 
Shivam Sharma resume(.Net Developer)
Shivam Sharma resume(.Net Developer)Shivam Sharma resume(.Net Developer)
Shivam Sharma resume(.Net Developer)
 
MohitKumarGupta_Resume
MohitKumarGupta_ResumeMohitKumarGupta_Resume
MohitKumarGupta_Resume
 
Shailendr Singh
Shailendr SinghShailendr Singh
Shailendr Singh
 
Sravan Kumar Resume
Sravan Kumar ResumeSravan Kumar Resume
Sravan Kumar Resume
 
J developer, oracle adf introduction
J developer, oracle adf   introductionJ developer, oracle adf   introduction
J developer, oracle adf introduction
 
Resume_Abhishek_3years
Resume_Abhishek_3yearsResume_Abhishek_3years
Resume_Abhishek_3years
 
ResumeWithPassport
ResumeWithPassportResumeWithPassport
ResumeWithPassport
 
SHIVRAJSresumeSyracyse (1)
SHIVRAJSresumeSyracyse (1)SHIVRAJSresumeSyracyse (1)
SHIVRAJSresumeSyracyse (1)
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
 
{Re}designing a Developer Portal
{Re}designing a Developer Portal{Re}designing a Developer Portal
{Re}designing a Developer Portal
 

Recently uploaded

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 

Recently uploaded (20)

Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 

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') ) ) }
  • 16. API Endpoints http://moodle.server/webservice/rest/server.php?wsfunction=get_quiz_questions An API endpoint is a URL with some parameters. &wstoken=SECURITYTOKEN;
  • 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