Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Moodle 3.x Developer's Guide
Moodle 3.x Developer's Guide

Moodle 3.x Developer's Guide: Build custom plugins, extensions, modules and more

eBook
$9.99 $39.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Moodle 3.x Developer's Guide

Moodle Plugins - What Can I Plug In?

Having readied our development environment and explored the thought processes that support building a Moodle plugin, in this chapter we will be investigating the types of
plugin Moodle supports. Remember that the "M" in Moodle stands for modular; if there is a feature you need that Moodle doesn't support then we can build a plugin to implement it. Any aspect of the user experience can be enhanced and/or modified by a plugin. In this chapter, we will be mapping out the most common user journeys through the platform, from initial log on (authentication), through being assigned to courses (enrolment), and ultimately completion reporting.

As described in the previous chapter, we will be taking an Agile approach to plugin development, and that means we will be working with user stories (a description of what our work needs to achieve...

Managing users

Getting users onto courses is a two-step process. Firstly, a user needs to have a user account created in Moodle--the authentication step. Next, they need to be given access to a course through course enrolment. Both of these steps are supported--and can be enhanced--by plugins. Let's start by looking at authentication.

Authentication

Log in to your development Moodle as an administrator and, from the Site administration menu, slide down to Plugins, then Authentication, and then click on Manage authentication:

The Manage authentication page lists the available authentication plugins (together with general configuration settings further down the page):

Check out the Moodle docs for details of the authentication...

Managing courses

Moodle courses are where learning takes place, and in order to ensure Moodle is as flexible a learning tool as possible, the Moodle platform has been designed to allow developers to provide as much course design flexibility as possible through the plugin system. We start this section by investigating how plugins might be used to alter the standard Moodle course layout.

Course layout

Moodle comes supplied with four standard course layouts:

  • Weekly
  • Topics
  • Social
  • Single activity

The course format is specified from the Course format page:

For example, setting a course to a Topics format containing five sections will configure a course to display three columns: a central column where teaching interactions can...

Course content

In this section, we consider the types of interaction that an instructional designer (ID) might want the learner to engage in. Developing new learner interactions is described in much more detail in Chapter 5, Creative Teaching - Developing Custom Resources and Activities. In the meantime, let us look at the types of interaction Moodle supports out of the box and how to select the correct type of interaction based on the requirements presented to us by the ID.

Moodle supports two basic types of learner interaction: resources and activities. Let's start by looking at resources.

Resources

A Moodle resource plugin transmits information to the learner--it expects nothing in return. A resource plugin expects...

Reporting and analytics

Once students have been introduced onto the platform and have started to learn, we need to be able to report on, among other things, the activities students have been undertaking. Luckily, Moodle also takes a modular approach to report development. Both course and site administrator report scripts are to be found in the report folder:

Take a look in the documentation at https://docs.moodle.org/dev/Reports for details on the general structure of reports. Whenever you are querying the database, it is vital to remember the following:

We will be learning how to create custom reports in Chapter 9, Moodle Analytics.

Look and feel

Each plugin can be provided with its own /styles.css script to customise that plugin's look and feel. Over and above that, Moodle provides a flexible plugin-based theming framework--check out the Moodle directory at https://docs.moodle.org/dev/Themes. A new Moodle theme is possibly one of the more complicated plugin types you might need to develop. Go to Eclipse and navigate the PHP Explorer to the theme folder:

The trick to developing a new Moodle theme is to take a pre-existing theme and modify it to your requirements. Take a look in the Moodle plugins directory (https://moodle.org/plugins/browse.php?list=category&id=3) for third-party themes.

Let's take a look at the general structure of a Moodle theme plugin. In Eclipse, open the theme/canvas folder:

In the previous screenshot, you will see two folders that have been expanded: layout and style...

Managing users


Getting users onto courses is a two-step process. Firstly, a user needs to have a user account created in Moodle--the authentication step. Next, they need to be given access to a course through course enrolment. Both of these steps are supported--and can be enhanced--by plugins. Let's start by looking at authentication.

Authentication

Log in to your development Moodle as an administrator and, from the Site administration menu, slide down to Plugins, then Authentication, and then click on Manage authentication:

The Manage authentication page lists the available authentication plugins (together with general configuration settings further down the page):

Check out the Moodle docs for details of the authentication process at https://docs.moodle.org/dev/Authentication_plugins#Overview_of_Moodle_authentication_process. What is important to realize about the authentication process is that it isn't simply a question of either creating a new user account in Moodle or verifying user credentials...

Managing courses


Moodle courses are where learning takes place, and in order to ensure Moodle is as flexible a learning tool as possible, the Moodle platform has been designed to allow developers to provide as much course design flexibility as possible through the plugin system. We start this section by investigating how plugins might be used to alter the standard Moodle course layout.

Course layout

Moodle comes supplied with four standard course layouts:

  • Weekly
  • Topics
  • Social
  • Single activity

The course format is specified from the Course format page:

For example, setting a course to a Topics format containing five sections will configure a course to display three columns: a central column where teaching interactions can be added, with two columns to the left and right that contain blocks of supporting content.

The code for these four formats is to be found under \course\format, as in the following screenshot taken from Eclipse:

Any new course format we create will need to be included in this folder...

Course content


In this section, we consider the types of interaction that an instructional designer (ID) might want the learner to engage in. Developing new learner interactions is described in much more detail in Chapter 5, Creative Teaching - Developing Custom Resources and Activities. In the meantime, let us look at the types of interaction Moodle supports out of the box and how to select the correct type of interaction based on the requirements presented to us by the ID.

Moodle supports two basic types of learner interaction: resources and activities. Let's start by looking at resources.

Resources

A Moodle resource plugin transmits information to the learner--it expects nothing in return. A resource plugin expects the learner to be passive. Obvious examples of resources are text to read, videos to watch, and audio to listen to. That is not to say that the resource won't form the basis of some form of interaction outside of Moodle, but we certainly don't expect any aspect of that interaction...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Customize your Moodle 3.x app.
  • Leverage the new features of Moodle 3.x by diving deep into the Moodle development eco-system.
  • Cater to heavy user traffic, customize learning requirements and create custom third party plugins.

Description

The new and revamped Moodle is the top choice for developers to create cutting edge e-learning apps that cater to different user’s segments and are visually appealing as well. This book explains how the Moodle 3.x platform provides a framework that allows developers to create a customized e-learning solution. It begins with an exploration of the different types of plugin.. We then continue with an investigation of creating new courses. You will create a custom plugin that pulls in resources from a third-party repository. Then you’ll learn how users can be assigned to courses and granted the necessary permissions. Furthermore, you will develop a custom user home. At the end of the book, we’ll discuss the Web Services API to fully automate Moodle 3.x in real time.

Who is this book for?

This book is for Moodle developers who are familiar with the basic Moodle functionality and have an understanding of the types of scenarios in which the Moodle platform can be usefully employed. You must have medium-level PHP programming knowledge. You should be familiar with HTML and XML protocols. You do not need to have prior knowledge of Moodle-specific terminology

What you will learn

  • • Work with the different types of custom modules that can be written for Moodle 3.x
  • • Understand how to author custom modules so they conform to the agreed Moodle 3.x development guidelines
  • • Get familiar with the Moodle 3.x architecture—its internal and external APIs
  • • Customize Moodle 3.x so it can integrate seamlessly with third-party applications of any kind
  • • Build a new course format to specify the layout of a course
  • • Implement third-party graphics libraries in your plugins
  • • Build plugins that can be themed easily
  • • Provide custom APIs that will provide the means to automate Moodle 3 in real time

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 29, 2017
Length: 368 pages
Edition : 1st
Language : English
ISBN-13 : 9781786469540
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jun 29, 2017
Length: 368 pages
Edition : 1st
Language : English
ISBN-13 : 9781786469540
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 152.97
Moodle 3.x Developer's Guide
$48.99
Moodle 3 Administration, Third Edition
$54.99
Moodle Theme Development
$48.99
Total $ 152.97 Stars icon
Banner background image

Table of Contents

9 Chapters
Getting to Grips with the Moodle 3 Architecture Chevron down icon Chevron up icon
Moodle Plugins - What Can I Plug In? Chevron down icon Chevron up icon
Internal Interfaces Chevron down icon Chevron up icon
Course Management Chevron down icon Chevron up icon
Creative Teaching - Developing Custom Resources and Activities Chevron down icon Chevron up icon
Managing Users - Letting in the Crowds Chevron down icon Chevron up icon
Creating a Dashboard - Developing a Learner Homepage Chevron down icon Chevron up icon
Creating a New Skin Chevron down icon Chevron up icon
Moodle Analytics Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(2 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Michael Ford Aug 23, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A guide to Moodle development is long overdue but the author has nailed it! I found the book well-written, thorough and very practical. The author's technical and educational expertise shine through and he's generous with insights not easily found on Moodle docs. In fact, the book has many parallels to Moodle as a learning platform, offering collaborative learning experiences while pulling together useful resources where required.The first chapter is about setting up. We're given a brief explanation of how to set up the development environment, an introduction to agile software methodology, to object orientated programming and to Moodle itself. Once prepared, we’re given our first client requirements and we’re then guided through the research, development and implementation of a working solution.Going through the book, the requirements get increasingly more complex and the explanations more detailed. In each case, we end up with a working solution as well as suggestions on how this might be further developed. I found the customised authentication plugin and the learning analytics particularly relevant. However, as the author also uses these projects to give us a thorough tour of Moodle functionality, there'll be something here for almost everybody.On the resources side, links to further reading are offered throughout the book, and the appendix is particularly worth checking - Behat, unit testing, coding standards, XML-RPC, encryption, compression, and GIT among other topics.Finally, the author's enthusiasm is infectious. I haven't coded for a while but I've been inspired. This is a book worth making space for.
Amazon Verified review Amazon
Client d'Amazon Apr 26, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Dès le premier chapitre, le livre est intéressant et vous permet de mieux comprendre l'outil et sa structure.Et d'être productif. Après une journée on est capable de réaliser des plug-ins... je dis chapeaux l'auteur.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.