Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Technical Research LMS Moodle Misc.

IT-REX-Platform edited this page Dec 21, 2020 · 1 revision

Moodle

Useful Links

Moodle Developer Reference

Basic Plugin Tutorial / Overview: https://docs.moodle.org/dev/Tutorial

Core APIs Overview (mit Erklärung): https://docs.moodle.org/dev/Core_APIs

APIs

API layers: https://docs.moodle.org/dev/External_services_security

  • External server interface (SOAP, REST, RSS, etc.)
  • Public PHP api (need to verify all parameters and access control, ...)
  • Low level internal api (fast, basic param validation, no access control, strict rules)

Web services api (SOAP): https://docs.moodle.org/dev/Web_services_API

Hierarchien extrahieren

Nutzer

Auth: https://docs.moodle.org/dev/Authentication_plugins

Privilegien

https://docs.moodle.org/dev/Access_API

When implementing access control always ask "Does the user have capability to do something?". It is incorrect to ask "Does the user have a role somewhere?".

  • Roles: https://docs.moodle.org/dev/Roles
  • Example capability: moodle/course:managegroups
    • e.g. create groups into moodle course
    • function has_capability($capability, context $context, $user = null, $doanything = true)

Kurse

Navigation / Hierarchie: https://docs.moodle.org/dev/Navigation_API

Grafische Übersicht Tree: https://docs.moodle.org/dev/images_dev/9/9c/Moodle-IA.png

Membership:

Enrolment api: https://docs.moodle.org/dev/Enrolment_API

Nutzer für Kurse:

  • function is_enrolled(context $context, $user = null, $withcapability = '', $onlyactive = false)
  • function get_enrolled_users(context $context, $withcapability = '', $groupid = 0, $userfields = 'u.*', $orderby = '', $limitfrom = 0, $limitnum = 0)

Enrolled users may fully participate in a course. Active user enrolment allows user to enter course. Only enrolled users may be group members. Grades are stored only for enrolled users.

Inhalte extrahieren

Daten einfügen

Im Zweifelsfall bleibt die Data Manipulation API (high level abstraction für RDBMSes): https://docs.moodle.org/dev/Data_manipulation_API

  • Queries schreiben
Clone this wiki locally