How to add Google fonts to TinyMCE editor in Moodle

Google has made it easy to use great looking fonts on websites, providing over 600 cross-browser fonts to date, for free. In this short post, you will learn how to add Google fonts to the default Moodle HTML editor, TinyMCE. 

Notes

  • To complete this tutorial you must be able to login to Moodle as an administrator.
  • You will also need access to the files on the server (FTP or SSH access).
  • This tutorial is for Moodle 2.3 or above (it can be done for Moodle 2.0, 2.1, 2.2 and I’m happy to extend this blog post if someone asks me for it).
  • Adding Google fonts will have a slight impact on page load time (not noticeable in most cases). The more fonts you add, the more significant the impact.
  • This tutorial also works for other Web font services such as FontSquirrelTypeKit, Adobe Edge fonts, etc.
  • Although I have never noticed any problems with this technique, don’t come and blame me if it breaks something in your Moodle installation 😉

How to add Google web fonts to Moodle TinyMCE editor

1. Go to the Google fonts page and find a font you like

Google fonts for Moodle

Click to zoom in

2. Click on the ‘Quick use’ icon (you can click ‘add to collection’ if you want to use more than one font)

Quick use google font for Moodle

Click to zoom in

3. Scroll down to the ‘Add this code to your website’ section and copy the text in the ‘Standard’ box

Select text

Click to zoom in

4. Scroll down to the ‘Integrate the fonts into your CSS’ section

Integrate the fonts into your CSS

Click to zoom in

5. Copy all text after the colon mark, but remove the quotation marks and the semi-colon

Clean text to be copied

Click to zoom in

6. In Moodle, go to ‘Administration > Site administration > Appearance > Additional HTML’
7. Paste the text you copied in step 3 of this tutorial

Additional HTML in Moodle

Click to zoom in

8. Scroll down and click ‘Save changes’
9. Go to ‘Administration > Site administration > Plugins > Text editors > TinyMCE HTML editor > General settings’
10. Scroll down to ‘Available fonts list’
11. Type a semi-colon mark (if not already there), a name for your new font (this can be anything) and an equal sign
12. Paste the text you copied in step 5 of this tutorial (make sure there are no quotation marks)

Adding a Google font to Moodle

Click to zoom in

13. Scroll down and click ‘Save changes’

14. Open the /lib/editor/tinymce/lib.php file for editing

Lib file for TinyMCE editor in Moodle

Click to zoom in

15. Locate ‘$contentcss’ and add a new line following the example below. Replace the bit in pink with the text you copied in step 3 of this tutorial. Note that there are two fonts available in the example. Also note the dot and comma.

Extend CSS for Moodle to register Google fonts in TinyMCEClick to zoom in

16. Save and close the file

17. (optional) Purge all caches at ‘Administration > Site administration > Development > Purge all caches’

18. Your fonts are now available anywhere TinyMCE is present. Enjoy!

How to add Google fonts to Moodle

Click to zoom in 

 Note: I have not yet been able to get this to work using the ‘Custom CSS’ available in some themes. Has anyone done it?

Gamifying-a-Moodle-course.-What-difference-does-it-make-Week-11

Moodle 2.5 was released a few weeks ago, allowing for Open Badges integration. Quite a few readers have asked me whether there remains a point of using labels for badges, now that Open Badges can easily be integrated with their Moodle courses. In this post, I try and outline why I have been gamifying my courses with labels, and why using labels for badges still makes sense for some users. This is week 11 of my ‘gamified Moodle course vs. non-gamified experiment‘.

What is Open Badges

Mozilla Open Badges

There have been a few great blog posts (1,2) written about Open Badges and Moodle. As explained in this Wikipedia entry, [quote]Open Badges is a program by Mozilla that issues digital badges to recognize skills and achievements. The badge structure allows one to display real-world achievements and skills which may help with future career and education opportunities.[/quote]

Why not simply use Open Badges

Moodle label badges and open badges

I am not stubborn, I think Open Badges is a project full of potential! Timing was the real issue. I started ‘gamifying’ my courses long before Moodle 2.5 was released, about 18 months ago in a bid to increase engagement in my courses. My ‘hack’ was never intended to compete with Open Badges, I only thought it out to bridge a gap. Now that I have used labels for badges for a while, I believe I am going to use both systems in parallel, as they serve a different purpose in my everyday teaching.

1. Works with any version of Moodle 2

Moodle 2 versions

A lot of institutions have upgrade policies that dictate when software can be updated to the latest version. Some institutions even prohibit software to be updated during an academic cycle. I also know quite a few Moodle administrators who refuse to update to the latest major version until all of the major bugs, found post-release, are ironed out. Last but not least, some of us rely on third-party plugins that don’t always get updated promptly for compatibility. All, or some of these reasons will prevent a significant number of Moodle administrators to update to Moodle 2.5 or above for a while yet. My ‘hack’ works with any version of Moodle 2, but doesn’t work on Moodle 1.9.

2. No reliance on the Moodle administrator

enable badges

In Moodle 2.5, the Open Badges integration can be disabled altogether by the system administrator. This may happen in institutions that want to keep complete control over the the ‘certifications’ they award. There is also a useful set of new permissions to granularly allow/prevent users to create, view and manage badges, which means not all teachers may be able to create and issue badges. With my ‘hack’, unless the administrator has disabled labels (more than unusual), nothing should stop teachers from creating their own badges. 

3. More suited to link to existing reward system

Open badges backpack

Once awarded, Open Badges may go into a ‘backpack‘, which makes the whole system appear rather ‘official’. I view Open Badges as a system to show that specific skills have been acquired/mastered by a student. I can see myself using only a few Open Badges per course, for fear to devalue the system. Some of my current ‘badges’ reward some pretty low level achievements, and I do not think they would have their place in student’s Open Badges backpack. I have been able to tie in my ‘badges’ system to our existing whole school reward system, whereas I don’t think Open Badges would work with it. I wouldn’t award enough badges, or at least not regularly enough and it wouldn’t help with my goal of increasing student engagement.

4. Ability to hide badges, per badge

Hidden badges

I may be wrong here but I believe it is only possible to show/hide all available badges with the Open Badges Moodle integration (through this capability). With my system, badges can be hidden/shown until they are unlocked on a per-badge basis, using the ‘Restrict access‘ option. 

5. Checking badges is a passive process

With the Open Badges Moodle integration, a user needs to visit a ‘badges’ page to view their badges, or access their profile page where all badges are shown. There is a block that allows users to see their latest badges, but not all badges are shown at once. With my system, there is no need for a user to visit their user profile to view all of the badges they have been awarded.

6. Open Badges are linked to a user profile

Open Badges Moodle profile

By default, with the Open Badges Moodle integration users can see each others’ badges through profile pages. Whilst this can be changed by editing the permissions, it can be an issue in some school settings. In my system, badges are not tied to a user profile.

7. No design limitations for badges

When a teacher creates an Open Badge in Moodle, there are design restrictions such as the type of image allowed (only .jpg and .png are allowed), and once uploaded badges are cropped and resized if necessary.

With the ‘labels for badges’ system, there are no restrictions as to what badges are, as long as it can be displayed in a label (i.e. any valid HTML). For example, any type of image is accepted .svg for retina ready displays, .gif (animated, for little ones), etc. Badges can be text, videos, etc.

8. Both systems can co-exist

As mentioned at the beginning of this post, both systems can co-exist and even complement each other. I am planning on using Open Badges for more official, assessment linked badges, or skill-based evidence and my system for less official and more frequent rewards. 

Features unique to Open Badges

Here some of the best features of the Open Badges Moodle integration, that are simply not possible to replicate with the ‘labels as badges’ system (bar going into the database).

Manually award badges to users

With the Open Badges integration, teachers (or others with the capability) can award badges manually. My system cannot do that, unless a teacher maitained checklist is created.

See badge recipients

With the Open Badges Moodle integration, a teacher can easily view a list of users who have been awarded a specific badge, along with a timestamp.

Message user when badge is awarded

A notification is sent to users when they have been awarded a badge. This could be useful in other areas than just badges, but that is another debate.

Any/All activity(ies) for completion criteria

The completion criteria to a badge is better than the overall completion criteria for Moodle activities. Badge creators can decide whether a badge is earned when any or all conditions are met in a list of conditions. The normal completion criteria across Moodle is all or nothing.

I can see both systems happily co-exist in my day-to-day teaching. What are your feelings about Open Badges? 

10 ways to keep your Moodle courses lean

Whilst instructional designers agree that using Moodle as a file repository isn’t a good idea, sharing files using Moodle is still necessary in a lot of scenarios. In this blog post, I explore 10 simple ways to keep your file sizes as small as possible, before uploading them to Moodle.

Why it matters

There are several reasons why you want to ensure your images & resources have as small a footprint as possible on your storage. Here are some of those reasons:

  • Content is served faster to your users
    • Especially useful in parts of the world where connection to the Internet isn’t great
  • Limits the amount of storage needed
    • May allow to remain on cheaper hosting plan a bit longer e.g. Digital Ocean
  • Reduces the size of course backups
    • Automated backups are completed faster
    • Backup files can be transferred more easily (e.g. via email)
    • Reduces amount of storage used for backed up courses
  • Reduces the bandwidth used
    • Cheaper fees if using services such as Amazon Web Services, or RackSpace, which charge by the GB transferred

1. Convert your documents into Moodle webpages

Moodle’s HTML editor has become fairly capable at converting content from a Word document into a Moodle webpage, keeping most of the formatting intact. Not only converting a Word document into a webpage will result in a smaller file size, your users’ experience will be improved (no download necessary),  compatibility will be increased (some students cannot view Microsoft Word documents on their device) and security enhanced (Word documents may contain viruses). Here is a tutorial showing you how it’s done.

 

2. Save your printable documents as PDF

Sometimes it is impossible, or too time consuming, to convert a document into a webpage due to formatting issues for example. You may also want to share documents that require users to install plugins or software on their own devices. If this is the case, you may benefit from saving the file as a PDF and share it using Moodle. There are several ways to save a document as a PDF. Here are a couple of video tutorials.

Save as PDF on a Mac

Save as PDF on Windows

Save as PDF online 

For all other scenarios, you can use Google Drive to convert your files to PDF. There is also a plethora of online tools that will allow you to convert your files to PDF using your favourite Web browser.

3. Reduce the size of your Microsoft Office documents

There are situations where you may want students to be able to edit your Microsoft Office documents, for example when you share a template with them. There are several ways to reduce the size of a Word, or PowerPoint file. Here are a few tutorials showing you how.

Compress images

Other ways to reduce Word file size.

4. Reduce the size of your PDF files

It is possible to reduce the size of your PDF files, without losing much in quality. A great online tool for this is SmallPDF. You don’t need to surrender your email or to install anything, simply upload, wait for  it to convert and download the converted file(s). 

5. Reduce the size of your images

Here there are 2 main things you can do:

  • Shrink your images i.e. the ‘physical’ size –> 1280×720 pixels to 640 x 360 pixels
  • Compress your images i.e. retain the physical size but remove unnecessary data inside the image

There are plenty of free tools available to perform both tasks. Here are my favourites:

  • To shrink images in batch, the B.I.R.M.E tool works well. It is very easy to use and you don’t need to surrender your email address.
  • To compress images in bulk, Smush.it is a great online tool. When at my Mac workstation, I always use ImageOptim. Both those tools are lossless, meaning the images will look exactly the same to the human eye.

6. Reduce the size of your media files

Your courses may contain MP3 files, or movie files (e.g. MP4, WMV, etc.) and those files often use a lot of storage space.

If you deal with a lot of audio files, you may want to learn how to use software such as fre:ac, a great open-source cross-platform audio resampling tool. If you don’t want to (or cannot) install programs on your computer, you can use AudioFormat to resize your MP3 files. 

When it comes to dealing with video files, I am yet to find an overall better program than handbrake, a cross-platform open-source video transcoder. There are a few online tools, such as video.online-convert.com, and although the ones I have tried work, I don’t have a lot of experience with those tools. 

7. Make use of online repositories

Since Moodle 2.3, it has been possible to link to files in (some) repositories, rather than downloading them to your Moodle installation. Moodle supports popular file storage systems such as Dropbox, or Google Drive. Here is an example of linked files.

8. Link to images

Rather than downloading images to show up in your labels (or elsewhere), why not linking to those images instead? You will save on storage and will speed up your course at the same time. The same thinking can be applied to other types of files externally stored. The main downside of this strategy is that you lose control over the image/file – if it’s deleted on the origin server, then it also gets deleted from your Moodle course. 

9. Make use of streaming services

If you deal with non-sensitive audio/video, you may benefit from using streaming services such as Youtube or Soundcloud. The files are no longer saved on your Moodle server, saving lots of space and bandwidth. It is important to remember that videos saved on Youtube are never totally private (even if some settings make them hard to find).

10. Embed, embed, embed

In the same vein as tip #9, you may want to use services to host your documents that allow for embedding. Embedding allows you to display remotely saved content in your Moodle course, without copying it to your course. For example, you can create a presentation on Prezi, or SlideShare and embed it to your courses. Here is a (very short) list of services from which you can embed.

 Do you have any tips to keep your courses lean? Share them in the comments section below.

Gamifying-a-Moodle-course.-What-difference-does-it-make-Week-10

Spoiler alert – this week I give away freebies! This week has been very quiet on the ‘gamified vs. non-gamified Moodle course experiment‘ front, as my students were off-timetable for a whole-school Inter-Disciplinary Unit for most of the week. I have been asked a few times to share my entire course for others to download, but I won’t be able to do that, mainly for copyright reasons. Instead I have decided to share individual resources & activities that you can use in your Moodle 2.x course (2.1 or above), namely a question bank, quizzes, a lesson and a database template.

Scratch 1.4 question bank for Moodle

I have created a 120 question bank to test my students’ knowledge of the Scratch 1.4 blocks. I have not used the scores to inform a student’s ‘level’ but I have noticed that students are now using blocks they would have stayed away from in the past. Use this question bank to produce your own quizzes.

Scratch 1.4 Moodle question bank

Download link

Warning – Right-click on the link and ‘save as’

Scratch 1.4 quizzes for Moodle

You can use some of the quizzes that I have created using the Moodle question bank mentioned above. They are arranged by level of difficulty, and are aimed at 12 year olds with little experience of Scratch. Most students have been able to complete up to ★★★, but it is worth noting that none of the quizzes seem to have really stretched my high achieving students.

SampleLevelDownload links
1 star Scratch 1.4 Moodle quizDownload link
2 star Scratch 1.4 Moodle quiz★★Download link
3 star Scratch 1.4 Moodle quiz★★★Download link
4 star Scratch 1.4 Moodle quiz★★★★Download link
5 star Scratch 1.4 Moodle quiz★★★★★Download link
1 white star Scratch 1.4 Moodle quizDownload link
2 white star Scratch 1.4 Moodle quiz☆☆Download link
3 white star Scratch 1.4 Moodle quiz☆☆☆Download link

Click here to learn how to import these Scratch 1.4 quizzes into your own Moodle.

Scratch ‘lesson’

This activity is a very simple use of the ‘lesson’ module. There is no questioning involved, simply a series of links to great Scratch 1.4 tutorials, organised by level of proficiency. The ‘book’ module would have probably been better for this, but I don’t have it installed on my (old now) Moodle 2.2 version.

Scratch 1.4 Moodle lesson

Download link

Click here to learn how to import this Scratch 1.4 lesson into your own Moodle.

Scratch creations sharing database

My students were encouraged to share their Scratch creations once they were satisfied with the outcome. Others were then encouraged to download the file, rate it, offer a helpful comment, fix bug or add functionality to the program and re-upload it. This has been a successful activity and one that I highly recommend other teachers to try out. Note that it is worth spending the time discussing with the class what constitutes a useful comment. I have used the fantastic ‘book review’ preset found here.Moodle database template

Download link

Click here to learn how to import this Scratch creations sharing database into your own Moodle. Click here to learn more about Moodle database templates.

Enjoy! All of the resources on this page are provided under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. Do feel free to re-upload remixes using the comments section below. Contact me using the ‘contact form’ at the left of this screen should you have issues with posting links to the comments section.