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
0
votes
1 answer

Function mod_scorm_insert_scorm_tracks "Invalid parameter"

I have problem with a WebService function for moodle callen "mod_scorm_insert_scorm_tracks" This function is used for inserting track information (i.e. star time) of a user in his SCORM progress. Part of the estructure of this function is scoid=…
rfcabal
  • 121
  • 1
  • 4
  • 17
0
votes
1 answer

Uploading files and folders in a course programatically in Moodle

I need to upload files and folders into a course in moodle from a zip file, I have been searching and I found how to upload files. I try to upload, and the files are uploaded correctly into the database and in the file repository, but this files are…
Joacer
  • 568
  • 13
  • 32
0
votes
3 answers

Moodle setting permission has no effect

I configured REST webservice on Moodle 3.0.5 to use function core_course_get_courses which is supposed to return a response containing basic info about all available courses. This is the URL I've been…
Đuro Mandinić
  • 693
  • 1
  • 8
  • 26
0
votes
1 answer

Moodle course completion status not updating in mobile app

I am created new course and some topics in course , set course tracking settings via Admin side . Added permission to the user's to manually closed the status (read/view status) for lessons (Course lessons). In web application the status shows…
Varun Sreedharan
  • 517
  • 8
  • 28
0
votes
3 answers

How to crete New Web Service inside moodle?

I am go through the service module inside moodle , how can i add my own function and class for handling some operations such as enrolling and register . is it possible or not
Varun Sreedharan
  • 517
  • 8
  • 28
0
votes
0 answers

Using MOODLE to create users and enroll them in courses via Webservice API

How to enroll a user to a particular course through web service API, I have token, user credential and course details.How to create the request ? I am try to implement enrollment to a course like this var domainname = 'http://localhost/moodle'; var…
Varun Sreedharan
  • 517
  • 8
  • 28
0
votes
1 answer

Moodle registration form change action url

I am trying to customize the signup form in moodle. I have modified moodle\login\signup_form.php to add additional fields. Now I want to change the action url of the form. Because my signup form is on the home page and I want to change the action…
Akhilesh
  • 1,243
  • 4
  • 16
  • 49
0
votes
1 answer

WSO2 - Api Manager - Passing Post Body Params as URL query strings to Moodle

We're implementing WSO2-AM to handle access to some internal APIs from our Moodle LMS we wish to expose to the internet. I am configuring the access to this LMS via WSO2 but I've run into an issue I can't resolve. I realise WSO2 documentation is…
vortex
  • 73
  • 1
  • 9
0
votes
3 answers

Parse moodle XML to C# (dotnet) object

I am trying to deserialize XML response received from moodle web services. I could parse it into a dotnet object if it had distinct named attributes like id, shortname, idnumber etc. But it has got an array of KEY attributes with actual field name…
Danish
  • 694
  • 1
  • 7
  • 15
0
votes
0 answers

Use email based self registration in webservice

I am trying to register a user using webservice and was successful in creating the user. Now I want to use the email based self registration as auth plugin. By default 'manual' registration is used. So I changed $user1->auth = 'manual'; to…
Akhilesh
  • 1,243
  • 4
  • 16
  • 49
0
votes
0 answers

Moodle assign role on registration

I am trying to customize moodle. I have installed moodle on my xampp server. I have added some new fields to the registration form using user profile fields. Now I want to add a role, for example 'student' to the user on registration.I don't want to…
Akhilesh
  • 1,243
  • 4
  • 16
  • 49
0
votes
2 answers

get data from Moodle Database from code

I have a question on how I can extract data from Moodle based on a parameter thats "greater than" or "less than" a given value. For instance, I'd like to do something like: **$record = $DB->get_record_sql('SELECT * FROM {question_attempts} WHERE…
0
votes
1 answer

How "Technical Project" in moodle Works?

After Installation of this plug-in(Technical Project) When I goes to the technical Project setting from (site administration >> plug-ins >> activity modules >> technical project) I am getting this page. My question is that how can i test all of its…
Mohib
  • 3
  • 2
0
votes
1 answer

send request with data from external server to Moodle

is it possible to send POST request from external server to Moodle and then, already in Moodle, doing some actions with data and save to DB(DB table created by local plugin). Have any possibilities to do that? Thanks all for help.
Matt Bearson
  • 228
  • 5
  • 19
0
votes
2 answers

Moodle - Plugin to create forms

I'm new to Moodle and there is a new project in my office that I want to do. What I want to do is to create a plugin that helps you create forms. For example, if I want to create a simple register form within Moodle or a simple questions form, the…
iRynoh
  • 69
  • 7