Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
How to create a block for Moodle using PHP
Highest Rated
Rating: 4.8 out of 5(11 ratings)
63 students

How to create a block for Moodle using PHP

Step by step, detailed instructions taking you through the complete process from zero code to functioning block.
Created byChris Richter
Last updated 10/2020
English
English [Auto],

What you'll learn

  • How to create a 'block' in Moodle using PHP
  • How to setup the folder structure for a 'block'
  • How to create configuration options in a 'block'
  • How to setup the access file for a 'block'
  • How to implement a simple YouTube Playlist view in a 'block'
  • How to add global administration settings to a 'block'
  • How to implement the language file for a 'block'

Course content

3 sections15 lectures1h 25m total length
  • Introduction1:05

    Learn to build a Moodle block with PHP by creating a functional plugin, detailing folder structure, language and access files, versioning, the main block file, and settings.

  • What is a block?3:42

    Explore what a block is in Moodle, how blocks act as draggable, configurable plugins you add to dashboard areas, set visibility and permissions, and customize their position and content.

  • What are we going to create?3:13

    Build a Moodle PHP block that displays a YouTube playlist viewer via a web service, configurable per instance with a playlist id and video count.

Requirements

  • How to program in PHP
  • Have access to a development environment with PHP and Moodle installed
  • Have a basic understanding of Moodle and how it is used

Description

This course will take you through the complete process of developing a Moodle block. A 'block' is a special type of plugin that is used in Moodle that can be added to pages, dashboards and other display areas in Moodle. A 'block' has a unique set of requirements when developing in Moodle that will be covered in this course.

It is highly recommended that you have PHP, HTML, JavaScript and CSS experience before attempting to create a block in Moodle but it is not essential that you have worked in Moodle before.

This course will teach you the basic structure and requirements of a 'block', then take you through the actual process of:

  • Creating a fully functioning block

  • Adding the core files

  • Managing plugin versions

  • Adding the access file

  • Adding instance configuration options

  • Adding global config options

  • Adding the language file for the block

  • Completing a YouTube playlist RSS reader function to demonstrate the block

  • Publishing the plugin to your Moodle LMS

The block process is recorded using Moodle 3.9 but the code can be used in Moodle 3.7.2.

This course is primarily for PHP developers, but if you have understand other programming languages you should be able to easily transfer your programming knowledge to PHP and to this course.

Who this course is for:

  • Moodle developers and administrators with PHP skills