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

How to change user image in moodle with REST api

I am using Moodle 2.7.4. I am writing a web application that uses moodle REST APIs. But I couldn't find an API to change User profile picture. Can anybody tell me what the API is and its docs. PS: I know we can upload file with…
Harikrishnan
  • 3,664
  • 7
  • 48
  • 77
2
votes
1 answer

MOODLE Error reading from database

I have problem transferring the Moodle e-learning to another server the error is not helpful, I have tried changing the file: moodle/lib/dml/mysqli_native_moodle_database.php Change @@default_storage_engine to @@storage_engine, the moodle…
Lara Vel
  • 21
  • 1
  • 2
2
votes
1 answer

Mark Moodle activity as complete from within the Activity

We are using Moodle 3.1.1 and trying to find a way to "Mark activity Complete" (via a link or button) from within each activity instead of going back to main course/topics page and checking the "Mark complete" checkbox next to each Activity. The…
2
votes
2 answers

Get course contents using webservice

I am using Moodle 3.1+. I am trying to get the course contents using webservice. I have created a course with activity 'lesson'. Now when I try to get the contents of the course using webservice 'core_course_get_contents', I am getting the…
Akhilesh
  • 1,243
  • 4
  • 16
  • 49
2
votes
1 answer

Moodle get course information + all lessons through Api

I am trying to collect all information related to Moodle course (course + lessons) Using Moodle Api I got the course information, but gets only some basic information, I want course details and its lessons (created under course) Eg : var…
Varun Sreedharan
  • 517
  • 8
  • 28
2
votes
1 answer

Creating a LTI provider for Moodle

I'm trying to create a LTI provider for Moodle. The things that I need from Moodle - course name, students and teachers, as well as enabling a single sign on (getting the session, token, cookie...) I did a research and saw that Moodle 3 supports LTI…
Yonatan
  • 1,319
  • 4
  • 13
  • 32
2
votes
1 answer

Adding CSS class to form element in Moodle

I create forms in Moodle by extending the moodle moodleform class and calling the addElement() or createElement() methods. For example, I create a select element this way: $mform->addElement('select', 'mySelect', 'Select title' , $list); Where…
Aldo Paradiso
  • 911
  • 2
  • 15
  • 30
2
votes
1 answer

Getting Angular to work with a Moodle webservice

I am building an application to get Json data from a Moodle web service, and using AngularJs to display the data in the app. There are multiple functions on the Moodle webservice, so I need multiple controllers in the Angular app. I am using Visual…
Yvonne Aburrow
  • 2,602
  • 1
  • 17
  • 47
2
votes
0 answers

Auto login via moodle ( SAML )

I'm using Django 1.6 for a backend and I've created a web application of meta player. I used OAuth2 for login. Now I'd like to integrate my web Application in a moodle site, so here comes the question: How can I login to this web app via moodle…
Yuqing Wei
  • 289
  • 1
  • 3
  • 12
2
votes
2 answers

Moodle function to edit contents

Moodle API has functions like core_course_create_courses() core_course_duplicate_course() core_course_get_contents() These all work fine. Is there a way to set and edit the contents of a course? We are syncing our SIS (Student Information…
2
votes
1 answer

How to return data using cURL call

This returns a token, like: {"token":"260e5b8adf74af6be5dfa250c5ad93c8"} And I want just want the content part: 260e... Which I think I can get it by using $getInfo['token'],…
Arnau Guadall
  • 327
  • 1
  • 4
  • 17
1
vote
0 answers

Problem: Cannot run existing moodle source code

I downloaded the source code and database of a website developed with moodle. I imported the database locally with the same credentials and just modified the configuration file as follows:
1
vote
1 answer

Moodle Sessions Error Preventing Admin User Creation on Fresh Install

While installing Moodle, in https://mylms.com/user/editadvanced.php?id=2, after filling out the form to create the first admin account, the page redirects to give the following error message "Your session has most likely timed out. Please log in…
Khan
  • 11
  • 1
1
vote
1 answer

Web (Rest/SOAP) API for Moodle Question Bank

I need to make a different front-end I need good API interface for Question Bank/Question Engine? I didn't find much details on this.. Can someone help?
1
vote
1 answer

How to resolve the appearance of span in mobile phone when using Moodle App

When you view a quiz in the moodle mobile app, the line of code appears with class sr-only in span. How to resolve it in Moodle 4.1 ? Click to view the error The page display well in web browser. I have tried to figure out which page results to…
danimo
  • 11
  • 2
1 2
3
21 22