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
3
votes
0 answers

Running a Moodle quiz via API

I have been asked to see if we can incorporate some of our Moodle quizes on our webpage, and am having issues finding any information on this. In effect, what I want to do is allow our webserver to request the quiz from the Moodle system, either…
vrghost
  • 1,084
  • 2
  • 19
  • 42
3
votes
1 answer

Moodle SSO Using asp.net web app

Hi there i'm beginner in using moodle i want my custom website which is on ASP.net can anyone guide me that how can i add SSO feature for my website. Thank you in advance.
M.Nabeel
  • 1,066
  • 7
  • 19
3
votes
3 answers

Using Moodle create users and enroll them in courses via SQL

I need to create an external application that creates, modifies and enrol users of Moodle. I've been reading Moodle documentation but its more for front administrators that for developers. How can I do to create a user? which tables hold obligatory…
For MOodle
  • 41
  • 1
  • 1
  • 2
3
votes
2 answers

Access Moodle API from .Net Console Application

For one of my projects I need to manage some of the attributes of our Moodle, including (but probably not limited to) Creating/Updating users and managing enrolments. I need to create this interface in a .Net (4.0+) Console application, so…
Si Blight
  • 109
  • 1
  • 13
3
votes
1 answer

PHP create User in moodle via Webservice

I want so connect an external website with a moodle-system. I've already set up the webService and created a token to get access. I've followed http://www.rumours.co.nz/manuals/using_moodle_web_services.htm set up but in contrast i wanted to realise…
Jan Raufelder
  • 287
  • 7
  • 23
2
votes
0 answers

Interacting with Moodle API client to get quiz by course id

How can I interact with Moodle Api clients to get to quizzes by course id. The documentation says the mod_quiz_get_quizzes_by_courses requires a courseids array, but I don't know how to pass the array to the to Get request.
mev
  • 177
  • 5
2
votes
2 answers

Moodle Docker Web Service working but can not be called from another docker container in the same network

I am running a moodle docker container and one other container to call moodle web service function in a same network. I'm pretty sure I have set up the moodle properly because I can call moodle web service from postman. I am also aware i need to use…
rixpl
  • 31
  • 7
2
votes
1 answer

How to upgrade moodle version using cli/git?

I have a moodle site which is maintained in a personal github repository. When moodle releases a new moodle version, I need to replace files manually to upgrade moodle version in my personal repository. Is there any way, in which I can automate the…
Ahnaf
  • 149
  • 5
  • 18
2
votes
2 answers

How to configure permission to assign course in moodle API?

In moodle 3.6 the enrol_manual_enrol_user does not work every time! { "exception": "moodle_exception", "errorcode": "wsusercannotassign", "message": "You don't have the permission to assign this role (383) to this user (2) in this…
2
votes
1 answer

Moodle : is it possible to access user from javascript ONLY

My purpose is simply being able to retrieve basic user info (id, username, lastname, firstname) in javascript on ANY moodle page WITHOUT having to create a plugin. I've seen that there is a javascript global variable in Moodle : M but no user info…
Overdose
  • 585
  • 7
  • 30
2
votes
1 answer

Struggle to make the right query to the Moodle database table "mdl_logstore_standard_log" in order to export logs as it happens from the GUI

My problem is that I am trying to export a csv file from the Moodle DB "mdl_logstore_standard_log" with the exact order as the Logs page under Site Administration > Reports. The Moodle GUI report fields order One idea to achieve such a thing is…
Gizmapps
  • 59
  • 1
  • 10
2
votes
0 answers

RESTful webservice Moodle plugin Authentication fails

I am using moodle rest plugins for mobile web-services and from this tutorial I have enabled rest API and other related services as per the documentation when I try to test the web service then I got following…
2
votes
2 answers

Moodle - Site Adminstrator Block is missing

I am using moodle 3.4 Version. My moodle is not showing Site administrator in "Add a Block".Due to which i am not able to add "Site administrator Block" on my Dashboard front page. Can anyone please help me .
Chetan
  • 143
  • 1
  • 1
  • 6
2
votes
0 answers

Upload scorm packages in moodle course module using moodle rest api

I have already created a course using moodle RestAPI(function name : core_course_create_courses). then i want to upload a scorm package in moodle course module/activity. i have write some code for that,this code will create a module in that course.…
2
votes
3 answers

How to enable web services on moodle?

I have configured moodle on local host and I am trying to generate the token for authentication. I have already followed these steps : == Configuring Moodle for using the application == Administration -> Plugins -> Web Services -> External…
Badal Sharma
  • 79
  • 1
  • 4
1
2
3
21 22