Moodle 3.x Developer's Guide
eBook - ePub

Moodle 3.x Developer's Guide

Ian Wild

Compartir libro
  1. 368 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Moodle 3.x Developer's Guide

Ian Wild

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Effortlessly ensure your application's code quality from day 1About This Book• 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.Who This Book Is ForThis 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 terminologyWhat 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 timeIn DetailThe 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.Style and approachThis book takes a step-by-step practical approach with every step explained in great detail using practical examples. You will create custom plugins from scratch with the examples shown and create new modules as well as extensions with the examples presented.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Moodle 3.x Developer's Guide un PDF/ePUB en línea?
Sí, puedes acceder a Moodle 3.x Developer's Guide de Ian Wild en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Ciencias computacionales general. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2017
ISBN
9781786469540

Creative Teaching - Developing Custom Resources and Activities

Having created plugins to enhance the structure and layout of courses in Chapter 4, Course Management, in this chapter we will be learning how to develop new teaching interactions. Recall that Moodle comes with a range of teaching interactions baked in. For example, there are interactions that allow teachers to add quizzes, self-directed lessons, glossaries, discussion forums, and much more, to courses. But there are many instances where you, or your instructional designers, will wish that Moodle included an interaction to support a particular aspect of teaching and/or learning. This is where the possibility to develop custom teaching interactions gives Moodle the edge. Not only does this provide greater opportunities for teaching but it also enhances the experience for our learners.
Moodle supports two types of teaching interactions: resources and activities. Both of these are types of course module plugins and we begin this chapter with a more thorough exploration of how we can map the requirements for a given teaching interaction onto a suitable type of plugin.
We then get to grips with the development of a novel three-dimensional model viewer. This uses the JavaScript library, three.js, to render a Wavefront 3D model--as well as allowing a user to interact with it. We continue our investigations into the most suitable methods to include JavaScript in our plugins now that YUI is no longer being developed by Yahoo!
This chapter will also help you gain a more thorough understanding of the File API (which we first encountered in Chapter 3, Internal Interfaces) and how file storage and retrieval works. This understanding is vital as any file a teacher or learner uploads to Moodle will be accessed through this API. We learn more about the scripts we need to prepare in order for our module to install cleanly, and we finish with a brief overview of the things to check before you make your final release.
At the end of this chapter, you will understand how Moodle course plugins work, which scripts need to be present in order for your plugin to behave correctly, and you will know how to modify course plugins to fit your needs.
This chapter will cover the following points:
  • Knowing if a user story requires a resource or an activity
  • How to manage files (including ZIP compressed files) using the File API
  • The scripts required for course plugin installation and an understanding of their structure
  • Knowing how to include JavaScript in your plugins--including passing parameters to JavaScript AMD modules
  • How to support course backup and restore
  • Introducing resources and activities
Let us start with learning the difference between resources and activities.

Teaching interactions

I am sure that by this stage you will have investigated the Add an activity or resource link on a course page (remember that you will need to turn editing on to see this link):
If not, then click on one of these links now to display the Add an activity or resource popup dialog:
Resources and activities are the building blocks of Moodle courses. Before continuing, look at the variety of resource and activity plugins a plain vanilla Moodle install supports. See that an activity provides teaching interactions--this is Moodle in transmit/receive mode. An activity (at least in the Moodle sense of the word) is something that demands some form of response from the learner (and, ideally, one that will make knowledge stick and/or develop competency in some way). A resource, on the other hand, is Moodle in transmit mode. Moodle resources provide access to information and do not necessarily require any further interaction back from the learner. It should be noted that, although resources and activities exhibit very different behaviors, they are built in very similar ways (their PHP scripts are similarly structured), as you will discover in this chapter.
The plugins we will be developing in this chapter are in response to two scenarios--called User Stories in Agile. The first describes how the online learning needs to contain 3D models with which a user can interact:
A user should be able to click on a model; zoom in and out, tilt, and rotate it.
The second user story describes what is essentially, a Moodle choice activity but with multimedia in the choice text:
We first encountered the development of an enhanced choice plugin in Chapter 3, Internal

Interfaces. If you haven't yet read Chapter 3, Internal Interfaces then it might be worth doing so before continuing with this chapter. What's great about studying this particular plugin is that, in a broader context, it will give you a good understanding of how multimedia files can be handled in any plugin. Likewise, the development of the three-dimensional model viewer plugin--also explained in this chapter--will give you a thorough understanding of how to include third-party (specifically JavaScript) libraries in your plugins.
Let us start with developing the three-dimensional model viewer. Before we start, you might want to download the latest version of this code from GitHib at: https://github.com/iandavidwild/moodle-mod_wavefront.

Developing a Resource plugin

As mentioned, although used in very different ways to support teaching, as far as plugin structure is concerned, there is little difference between a resource and an activity plugin. Each one has a similar folder and file structure--which by now I'm sure you are becoming more familiar with. We will explore the details later in this section. First, let us understand how we can actually render a three-dimensional model in the browser.

Rendering a three-dimensional model

Thanks mainly to the gaming community, tools to create and render three-dimensional models are both plentiful and free. For example, there is a whole community dedicated to creating new 3D Mobs models in Minecraft using the open source ...

Índice