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
votes
2 answers

How to enroll user in particular course in moodle

i need your help to enroll user in particular course on the basis of quiz complete what i need to do is i want to show to button when student complete the particular quiz on the course page where student already enrol i have sucessfully show that…
-1
votes
1 answer

Need A Value of id of url inside a box

i am a newbie having difficulty in this. i did not getting a value of ID In A box for Update Inside A Box. update code
-1
votes
1 answer

How can i show source code of moodle webserivce

In which file or under which folder path (moodle folder) can I get the source code of the web service? THX
D-T
  • 45
  • 3
-1
votes
2 answers

core_user_create_user and moodle webservice setup not working

I have done everything needed to setup webservices on my moodle 3.11 instance, including roles/capabilities/user. However sending a test request always gives { "exception": "dml_missing_record_exception", "errorcode": "invalidrecord", "message":…
-1
votes
1 answer

Is the sending of data to moodle REST API limited?

I'm using moodle 3.5, I'm trying to send an array of 2308 (user/corresponding cohort) to the external function 'core_cohort_add_cohort_members' by POST, the answer of the API is : array(3) { ["exception"]=> string(27)…
Theopep
  • 11
  • 5
-1
votes
1 answer

How can I get rid of the click off event on an autopicker with tags in a moodle form?

I am using the autocomplete element from the Moodle Form API on a Moodle form. I preload the autocomplete element with a list, set multiple to true, and tags to true. This allows the user to add elements to the list if they don't already exist. A…
-1
votes
1 answer

MySQL error I can't understand, grademax error

Error that happened recently with my moodle that I can't solve, I don't know what to do. I know I need to change something from my MySQL, but I don't know what. The error is affecting only one Moodle course, causing students to neither see the issue…
-1
votes
2 answers

Giving course management permission to teacher in Moodle CMS

I want to give course management(Add new course) permission to teacher in Moodle CMS. Admin already have this permission under Site Administration. How will I give this permission to Teacher. Thanks in advance.
-2
votes
2 answers

Is it possible to create one course in moodle and add many other courses to it?

I am asked by a client to create one course on moodle and add many other courses to it for one instructor to handle it. So that the teacher can grant students access to it at anytime he wants
Atsa'am
  • 27
  • 5
-2
votes
2 answers

Problem with logo in a footer of Moodle website

I replaced Moodle logo with a logo of my web place keeping the same file name and file size and the new logo shows up when I run my website in Firefox or Edge, but the logo doesn't show up in Chrome, Brave and maybe other web browsers. What I…
Laki
  • 99
  • 1
  • 3
  • 15
-2
votes
1 answer

I want to select a record from moodle database

I want to select id from moodle database where name is equal to some variable.I am trying this statement but so far its not working. $questionname= $DB->get_record_sql('SELECT id FROM {question} WHERE name = ?',…
Usman Qadeer
  • 157
  • 1
  • 12
-3
votes
1 answer

Get data from report with Moodle Webservice API

I'm trying to the all the questionnaire data from the report in Moodle at https://xxxxx/mod/questionnaire/report.php?instance=1266&action=dwnpg&group=0 This URL can download all the responses from Questionnaire submitted. How can I download this…
-3
votes
1 answer

I'm tiring to create a new user in Moodle using auth_email_signup_user but I'm not sure how to format the request

I have a few required custom profile fields that are date pickers and checkboxes. and I'm not sure what type to put them as in the request the only example the documentation has is one with type string. I keep getting the response { "exception":…
1 2 3
21
22