Questions tagged [moodle-api]

Moodle has a number of core APIs that provide tools for Moodle scripts.API's are already having functionality that can be reuse,and allow you to interact with Moodle system. They are essential when writing Moodle plugin, or Moodle customization.

Moodle Questions, those are about programming or development in Moodle should use this tag.

there are many core-apis those provide interaction with Moodle core system.

List of API's is

1 Most-used General APIs
    1.1 Access API (access)
    1.2 Data manipulation API (dml)
    1.3 File API (files)
    1.4 Form API (form)
    1.5 Logging API (log)
    1.6 Navigation API (navigation)
    1.7 Page API (page)
    1.8 Output API (output)
    1.9 String API (string)
    1.10 Upgrade API (upgrade)
    1.11 Moodlelib API (core)
2 Other General APIs
    2.1 Admin settings (admin)
    2.2 Availability (availability)
    2.3 Backup API (backup)
    2.4 Cache API (cache)
    2.5 Calendar API (calendar)
    2.6 Comment API (comment)
    2.7 Data definition API (ddl)
    2.8 Enrolment API (enrol)
    2.9 Events API (event)
    2.10 External functions API (external)
    2.11 Lock API (lock)
    2.12 Message API (message)
    2.13 Media API (media)
    2.14 My profile API
    2.15 Preference API (preference)
    2.16 Portfolio API (portfolio)
    2.17 Rating API (rating)
    2.18 RSS API (rss)
    2.19 Tag API (tag)
    2.20 Task API (task)
    2.21 Time API (time)
    2.22 Testing API (test)
    2.23 User-related APIs (user)
    2.24 Web services API (webservice)
3 Activity module APIs
    3.1 Activity completion API (completion)
    3.2 Advanced grading API (grading)
    3.3 Conditional activities API (condition) - deprecated in 2.7
    3.4 Groups API (group)
    3.5 Gradebook API (grade)
    3.6 Plagiarism API (plagiarism)
    3.7 Question API (question)

more about Moodle Api's https://docs.moodle.org/dev/Core_APIs

Most generally used api's are

Form API, File API, Events Api, Logging API, Data manipulation API, Navigation API (navigation) etc.

328 questions
1
vote
0 answers

How to get all the files from the Moodle assignment in a course?

I want to get all the files from an assignment in Moodle. Is there a way to get all the files? When I call core_course_get_contents from my local Moodle instance…
Simant
  • 3,142
  • 4
  • 32
  • 61
1
vote
2 answers

Create User In Moodle Using Moodle API & Node.js

Trying to create a user in moodle but all I'm getting is \n\ninvalidtoken\nInvalid token - token not found\n\n The…
Shan
  • 948
  • 1
  • 9
  • 17
1
vote
1 answer

Check if student submitted assignment via Moodle web services

I am trying to use the Moodle API (web services) to get information about (my) assignment submissions. I want to know whether I submitted an attempt for the assignment already or not. I am using the mod_assign_get_assignments function (which doesn't…
N. Rak
  • 132
  • 2
  • 12
1
vote
0 answers

convert CURL request into VBA xml Object in MS-Access

I am trying to handle moodle data from our schools MS-Access database using VBA-code to post xml.objects. I implemented the following code from an example for using the RESTful-API into my VBA-code (source…
1
vote
0 answers

Images aren't showing up on Moodle mobile

I created html e-learning using Animate CC, and I had problems when I trying it out in the Moodle app. On the content page, all bitmap images are not displayed at all, only text is displayed. here's the code I use, (elearning_c.bmp_area = function()…
Shiki
  • 11
  • 2
1
vote
1 answer

How to fetch content of Book created in Moodle using APIs?

How to fetch content of Book created in Moodle using APIs? I have tested mod_book_view_book function, but I am only getting book name, not the content of book.
1
vote
3 answers

How to debug custom plugin in Moodle

I've been asked to create a custom plugin displays course overview (course id, course name, enrolled and completed) through API. There is a report_completionoverview plugin that I can refer to and basically wanna retrieve exactly the same list via…
Lucy Hong
  • 91
  • 8
1
vote
1 answer

How to remove site registration error in moodle?

I am new to moodle, I have configured moodle on a Linux server, where there was IP address in place of the domain name. After I have replaced a subdomain name with my IP address, but then I am getting a registered site to model error. but when I…
Hardik Vyas
  • 500
  • 1
  • 7
  • 27
1
vote
1 answer

parameter value getting lost in moodle

I have a page in my moodle block which has some parameters passed in the url.This is what it looks like: http://localhost/blocks/learning_strategizer/viewlp.php?lp_id=1-2 This page(viewlp.php) is calling a form with parameters from lp_id:…
Amrita Deb
  • 165
  • 1
  • 3
  • 15
1
vote
1 answer

Login API in moodle angular 8

I need to login my user from my website to the moodle page.I have build function that create user and make enroll to course,Now i need to make auto login. I have set the "moodle_mobile_app" that have return my token of the user ,but i can find any…
Vladimir Potapov
  • 2,347
  • 7
  • 44
  • 71
1
vote
0 answers

Can i customize and add field "name as on card "

can we add field "name as on card" in moodle square payment plugin, on billing information from? In the API and example, I found the only options for : card number, cvv, exp, postal code
Muhammad Zahid
  • 355
  • 2
  • 13
1
vote
1 answer

moodle invalid response after successful userlogin

i was facing issue in moodle user was not able to logged in so i change the DB collation and user is now able to login into dashboard but i am also getting this error. Now user is able to login but this popup error is…
Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
1
vote
0 answers

I can't consume moodle services. Respond accessexception

I'm trying to consume Moodle web services but they respond accessexception. I already generated the Token and enabled the web services from the Moodle administration module. my endpoint…
1
vote
1 answer

How to trigger callback in moodle 3.6 (PHP)

We have 2 application one is main application and second is moodle 3.6, we want to trigger a callback from Moodle to our main application when a user starts a course or complete a course, How to implement this functionality. Thanks in advance.
Nithee
  • 300
  • 1
  • 12
1
vote
1 answer

Moodle uploading file issue Uncaught DOMException: Blocked a frame with origin

Im facing an issue with moodle, when trying to upload some kind of files in add question page like docx,xlsx im getting following error at console: Uncaught DOMException: Blocked a frame with origin "http://example.com" from accessing a cross-origin…
anb90
  • 73
  • 8