Book Image

Moodle Theme Development

By : Silvina Paola Hillar
Book Image

Moodle Theme Development

By: Silvina Paola Hillar

Overview of this book

Theming is one of the main features of Moodle, and it can be used to customize your online courses and make them look exactly how you want them to,according to your target audience. If you have been looking for a book that will help you develop Moodle themes that you are proud of, and that your students will enjoy, then this is the book for you. We start off by introducing Moodle 3 and explaining what it is, how it works, and what tools you might need to create a stunning Moodle theme. We then show you how to choose and change the pre-installed Moodle themes in detailed steps, and explain what Moodle themes are and how they work. Next, we show you how to change an existing theme and test the changes that you have made. You can not only plan the customization of theme, but also tailor it using advanced Moodle theming processes; this book is your one-stop guide to creating your own personalized Moodle 3 theme.
Table of Contents (19 chapters)
Moodle Theme Development
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Dedication
Preface

Preface

A long time ago, we could specify the most appropriate resolution where your user can have a nice experience with the website when we designed themes for it. We could design our themes, considering that they will look great for a specific resolution and just include a notice indicating that unless the user displays the website with a resolution of 800-by-600 pixels, it was their fault if they have a horrible user experience. However, those times are over. Nowadays, we have to design themes that are capable of working with different resolutions, screen sizes, screen orientations, and pixel densities. Our themes must be responsive, and the users must be able to have a great user experience, no matter what device they use to access our website.

These requirements are extremely important when we design modern Moodle themes. We cannot use the same recipes that worked OK a few years ago. We need new recipes that consider the requirements for excellent user experiences with any devices. Smartphones, tablets, phablets, ultrabooks, all-in-one computers, retina displays, high-DPI displays, and smartTVs can access our Moodle courses. Our Moodle themes must be ready to provide an excellent user experience in all these displays. We cannot design themes for just a few screen resolutions anymore.

This book will teach you how to design themes, considering  all the requirements for what is known as the post-PC era.

When theming, we must bear in mind many items, because we may want to change completely the look and feel of our Moodle course, but first of all we need to organize how to do it. We need to start from some basic concepts to bear in mind before taking the first step. We need to focus on small targets and then on the general look of the course. Therefore, in this book we will cover several aspects that we need to know about theming. We will deal with the free version of MoodleCloud, which has another version that is paid and offers more possibilities than the free one. But throughout the book, when referring it to MoodleCloud, we will be making reference to the free and open source one. Bearing in mind that MoodleCloud is not the only cloud-hosted Moodle hosting, we need to know that there are many services that host Moodle, and so users can download Moodle 3 and install to their own server space and also select a Moodle hosting service--many of which allow one to select from dozens of themes--and the themes are customizable. Whereas in this book, when talking about Moodle we will deal with Moodle on-premises, and we will learn how to customize it.

Through the chapters of the book we will start a journey through the land of theming and we will learn some information that will help us to create, design, and improve the theming of our courses. We will deal with icons, images, screen resolutions, responsive themes, among other relevant items that enhance the Moodle themes. Furthermore, we cover different devices and emulate them in order to check what the theme looks like in them. We learn how to code basic HTML and CSS with the help of online editors that help and teach us how to do it. We learn where to find themes and layouts for the Moodle courses and we also explore how to customize at the MoodleCloud maximum level, taking into account that we deal only with the free and open source version. Last but not least, we put all the pieces together, and in the last chapter we recap everything that we have explored, and we can spice our Moodle Course, with some tips that let us theme our course, adding some blocks, for instance, in order to continue changing the look and feel of our course.

What this book covers

Chapter 1, An Introduction to Moodle 3 and MoodleCloud, covers most of what needs to be known about e-learning, VLEs, Moodle, and MoodleCloud. There is a slight difference in between Moodle and MoodleCloud, especially if you don’t have access to a Moodle course in the institution where you are working and want to design a Moodle course. Furthermore, Moodle is used on different devices, and there are several aspects to take into account when designing a course and building a Moodle theme for these devices. We have also dealt with screen resolution, aspect ratio, types of images, and texts and anti-aliasing effects.

Chapter 2, Themes in Moodle 3 on-premises and MoodleCloud, shows what themes are and how to find them in Moodle and in MoodleCloud. We also reveal a little about HTML code and how colors are named in this code. We customize the Moodle theme called More and find out where our Moodle themes are on our computer. We have search for, download, and install Moodle theme Essential. We deal with plenty of information relevant to Moodle themes and where to find it.

Chapter 3, Setting Up Logos in Moodle Themes, works with UI-based settings to tune our Moodle themes. We do not change specific files such as HTML files or CSS because we take advantage of a theme where we can design a logo using on online logo editor, upload a logo, Favicon, background image as a tiled style. Regarding MoodleCloud, we learn how to upload a logo that can be seen in the header of the front page and the header of the login page, which is allowed in the theme that we are working with, bearing in mind that MoodleCloud has some limitations.

Chapter 4, Customizing the Header and the Footer, explain how to add images and text to the footer and the header. Hence, we add hyperlinks to social networks in Moodle on-premises. Apart from that, we can add a slide show and modify the front page changing the look and feel of the Moodle course. We learn how to make some changes to MoodleCloud, taking into account its limitations. There are customizable areas, though.

Chapter 5Customizing Elements with CSS, works with several online text editors so as to learn more about CSS and what we can do in order to change the look and feel of Moodle on-premises. We test the code before making any changes and avoid making mistakes when customizing the look and feel of the Moodle theme.

Chapter 6, Locating, Editing, and Using New Icons, works with icons, vector graphics, and bitmaps. We learn who to modify SVG and export them as PNG. We change the look and feel of the Moodle on-premises course and personalize the icon. We can also add more images to the icons or edit them in a different way, but we always have to follow the steps that we have taken. We need to make copies of files and replace the edited files with the originals. We may not like how the new icon looks in the Moodle course.

Chapter 7, Optimizing Themes for Mobile Devices, works with emulators for mobile devices; we also check Internet connectivity and learn how to modify, edit, and custom some of these options. We work with Google DevTools, which is an online emulator, and we can easily learn how to work with a mobile device from either our desktop or laptop. Moreover, we emulate network connectivity to check how the theme download in a mobile device. We can customize not only the device, but also its connectivity. Besides, when throttling the connectivity, we can see the speed.

Chapter 8, Exploring Layouts, deals with all the themes available for Moodle 3.1 and Moodle 3, which are free of charge and downloadable at https://moodle.org/plugins/browse.php?list=category&id=3. We change the look and feel of our Moodle course several times in order to show how it looks dressed in other themes.

Chapter 9, Course Formats, deals with course formats. There are default course formats and there is also a plugin for them. These course formats can be downloaded from the Moodle website and  can be installed in Moodle on-premises. We can also change the format of our courses in order to enhance them and make them a little bit different. We have to bear in mind what type of course we need to create in order to choose the right format.

Chapter 10, Extending Moodle Theming to Specific Sections, combines all the elements that we have learned throughout the chapters. We also add some ingredients in some cases that allow us to change the appearance of the Moodle course in order to customize it in the desired way.

Furthermore, we explore different ways in which we can simply change the look and feel of the course, since we can add just blocks, images, or make some small changes to the Moodle course that will allow us to see it in a different way.

Whenever we design an activity or add a resource, we must also bear in mind that we need to think how to organize them, due to the fact that the course will look tidier depending on how we organize the content.

What you need for this book

As requirements or prerequisites, readers need previous basic experience with Moodle 3 or earlier versions.

Who this book is for

If you are a Moodle administrator, developer, or designer and wish to enhance your Moodle site to make it visually attractive, then this book is for you. You should be familiar with basic web design techniques such as HTML and further experience with CSS would be helpful.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Change the number of pixels for the second element (image). Change from 120px (120 pixels) to 80px for both height and width."

A block of code is set as follows:

 <!DOCTYPE html> 
      <html> 
      <head> 
      <style> 
      div { 
          width: 500px; 
          height: 100px; 
          border: 3px solid #73AD21; 
      }

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "We click on Add an activity or resource and two options appear, resources and activities."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.