Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Moodle 3.x Developer's Guide
  • Table Of Contents Toc
  • Feedback & Rating feedback
Moodle 3.x Developer's Guide

Moodle 3.x Developer's Guide

By : Wild, Jaswant Tak
4.5 (2)
close
close
Moodle 3.x Developer's Guide

Moodle 3.x Developer's Guide

4.5 (2)
By: Wild, Jaswant Tak

Overview of this book

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.
Table of Contents (11 chapters)
close
close
6
Managing Users - Letting in the Crowds

Templates


So far, we have been building HTML in renderer functions. Generating pages in this way is great for the developer but it can make life harder for the theme designer. Renderers can contain lots of logic that the theme designer wouldn't necessarily be interested in and this can make developing new formats much more difficult. Templates provide much better separation between the presentation layer and the business layer, which we shall see in this section.

Let us revisit the Courses information block description page. Recall that this displays an overview of the course:

This page is generated by the get_overview() function implemented in renderer.php. Let us re-implement this page so that it uses a Mustache template.

Mustache

This section only gives a very brief overview of Moodle templates. The templating technology employed is called Mustache (pronounced moo-stash not moo-starsh... and definitely not moo-stosh). For more details on Moodle's use of Mustache, check out the Moodle developer...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY