Back end

Moodle Persistent Api

Persistent Moodle 3.3 Moodle persistents are equivalent to models (or active records). They represent an object stored in the database and provide the methods to create, read, update, and delete those objects. Additionally, the persistents validate their own data against automatic and custom validation rules. Persistents are made by extending the abstract class core\persistent. Properties […]

Moodle Persistent Api Leer más »

Moodle Output API

Output API Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments. Moodle 2.9 This page is a fresh attempt to explain how renderers, renderables, themes and templates all work together for Moodle 2.9. Lets start with building a page that is

Moodle Output API Leer más »

Moodle Web service protocols

Web service API functions   Web service protocols Name Moodle Ver. Description CORS Issue REST (returning XML) 2.0 XML data accessed through a REST API (not restful) Supported (3.0 and onwards) REST (returning JSON) 2.2 JSON data accessed through a REST API (not restful) Supported (3.0 and onwards) MDL-29242 REST (returning JSONP) 2.X Would be

Moodle Web service protocols Leer más »

Zend Tool Cheat Sheet

Zend Tool Cheat Sheet Zend Framework Command Line Console Tool v1.11.5 Usage zf [–glo­bal­-opts] action­-name [–act­ion­-opts] provid­er-name [–pro­vid­er-­opts] [provider parameters …] Note: You may use «­?» in any place of the above usage string to ask for more specific help inform­ation. Example: «zf ? versio­n» will list all available actions for the version provider. Version

Zend Tool Cheat Sheet Leer más »

JSON Cheat Sheet

JSON Cheat Sheet A JSON cheat sheet. Data Types number var myNum = 123.456; Series of numbers; decimals ok; double­-pr­ecision floati­ng-­point format string var myString = «­abc­def­»; Series of characters (letters, numbers, or symbols); double­-quoted UTF-8 with backslash escaping boolean var myBool = true; true or false array var myArray = [ «­a», «­b», «­c»,

JSON Cheat Sheet Leer más »

Git Cheat Sheet – cheat sheets

Git Cheat Sheet Cheat Sheet for the Git Distributed Version Control System. Based on https://github.com/AlexZeitler/gitcheatsheet and http://www.git-tower.com/files/cheatsheet/Git_Cheat_Sheet_grey.pdf Create Git Repository From existing direct­ory cd proje­ct_dir git init git add . From other reposi­tory git clone exist­ing­_dir new_dir git clone git:/­/gi­thu­b.c­om/­use­r/r­epo.git git clone https­://­git­hub.co­m/u­ser­/re­po.git Git – Local Changes Changed in working direct­ory git status Tracked file changes git diff Add changed

Git Cheat Sheet – cheat sheets Leer más »

Moodle developer’s cheat sheet

Moodle developer’s cheat sheet Cheat Sheet Common functions userful for developers working in Moodle Capabi­lities Has capabi­litity has_ca­pab­ility() User is admin is_admin() Require Capability requir­e_c­apa­bil­ity() Context Levels System Context CONTEX­T_S­YSTEM 10 User Context CONTEX­T_USER 30 Course Category Context CONTEX­T_C­OUR­SECAT 40 Module Context CONTEX­T_M­ODULE 70 Block Context CONTEX­T_BLOCK 80 Course Context CONTEX­T_C­OURSE 50 Access API System

Moodle developer’s cheat sheet Leer más »