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

How to read completion criteria from moodle API to use in App?

I am using core_course_get_contents I want to know the activity restriction criteria. I am getting something like this in…
Nick
  • 1,127
  • 2
  • 15
  • 40
0
votes
1 answer

Moodle URI Too Long error

I'm trying to add 10.000 users via the Moodle API in one time, but the generated URI is too long. How can I fix this problem? I know the URI is way too long, 1.750.000 characters, but I have no idea if there is an other way to do this? Thanks in…
Milan_w
  • 291
  • 2
  • 4
  • 17
0
votes
1 answer

Local Plugin to customise in messaging page

I'm new to moodle plugin development and wanted to know if its possible to let my local plugin access the messages page and edit in the specified area the arrow is pointing at , e.g i want to add the date of the latest message there . Any help…
unknown
  • 1
  • 4
0
votes
1 answer

How to fetch course price from moodle web service APIs

I am building mobile app that uses moodle web service APIs to fetch data, issue is i am not getting data for course price as well as start and end date for a particular enrolled course from the api response. Any help regarding this would be…
mirza
  • 77
  • 3
  • 11
0
votes
1 answer

How to override a Moodle core function in a plugin?

Is there a way to override in a plugin a Moodle core function ? For example, I would like to override the function get_max_upload_sizes that is called at /admin/settings/security.php:30. This function is located at /lib/moodlelib.php:6186. In a…
ben.IT
  • 1,490
  • 2
  • 18
  • 37
0
votes
2 answers

How to add a custom button with custom functionality in course Activity/Resource

Using Moodle 3.1 and being fairly new to Moodle development, I would like to know how to add a custom button or link inside each Activity/Resource within a course that would do the same job as mark complete checkbox on course view page but from…
0
votes
1 answer

Moodle web service not available for fetching quiz data

Is there any Moodle web API function available to fetch all the quiz data? I know some quiz API functions are already available but none of them give the actual quiz data. I want all question and answers included in the particular quiz. Can anyone…
0
votes
1 answer

Where does the index.html redirect to? [Moodle Mobile][Javascript]

My current tasked with adding a QR code generation functionality to Moodle Mobile's source code to add more functions. The source code that I use is from this site. As I don't have any experience in Javascript (or AngularJS which is what Moodle is…
Ryo
  • 15
  • 2
  • 8
0
votes
1 answer

Which table contains linked media details for lesson?

I have added a media file in a lesson using Lesson Settings -> Appearance -> Linked media. I need to know in which table stores the path of the linked media. I want to get the video URL and pass it to a Webservice for showing it in a mobile…
Akhilesh
  • 1,243
  • 4
  • 16
  • 49
0
votes
1 answer

Is there any Moodle API that still exists?

I'm a student, and I want to build an app based on information presented on our University Moodle service. I went to this link: Moodle api but there is a warning line there that says: Warning: This page is no longer in use. The information…
Yarden Rotem
  • 85
  • 12
0
votes
1 answer

Moodle Error - Web Services Client - No access rights in module context

I have got the following setup in Moodle: I have enabled Web Services I have enabled the REST protocol I have added a service called grades and enabled it I have added the function mod_assign_get_grades to the service I have assigned the webservice…
0
votes
1 answer

Using mod_scorm_insert_scorm_tracks

I'm interfacing my App with Moodle and I'm successfully calling mod_scorm_get_scorm_sco_tracks and mod_scorm_get_scorm_attempt_count via Ajax (XMLHttpRequest) for a given user (userid). Now I want my App to push some SCORM tracks back to Moodle. So…
lviggiani
  • 5,824
  • 12
  • 56
  • 89
0
votes
2 answers

How to change user permissions via MySQL in Moodle?

I need to change a user's role to admin in a Moodle installation (I'm not knowledgeable in Moodle whatsoever), since I've got not access to the backoffice or admin tools. I can only access the database. I've been looking at the several tables and…
Sasha Fonseca
  • 2,257
  • 23
  • 41
0
votes
1 answer

Moodle: Using the returnto query parameter to redirect back to my local plugins index after course edit

tl;dr; Trying to link the 'save and return' button when editing/deleting a course to my local plugins index.php instead of moodles default redirect for these features, moodle allready has a returnTo query parameter so i was thinking if that could be…
DenLilleMand
  • 3,732
  • 5
  • 25
  • 34
0
votes
2 answers

Auto assign student role to new registred user in Moodle

I need to assign student role to all users by default who are registering our Moodle site through registration form from frontend. How we can assign student role by default. Note : If admin is creating new account or uploading bulk users they can…
stefun
  • 1,261
  • 3
  • 24
  • 54