My Favorite Blocks

2. Guide to Blocks

2.1. Embedding Google Docs

How did you like having that pdf open right in the page of this book? I love this feature and just stumbled upon it last summer (there's always something new to learn!).

[Note: Google being Google, the interface has changed a little bit from the description below. This article describes how to embed a file on your Google drive in the current Google universe.]

Here's how to achieve this effect:

Upload a pdf to your Google drive. (You can embed other types of files, but my experience has been that Google messes with the formatting and the things I post generally have a fair amount of style that I don't want to have messed with! This process does work great for .mp3 and .mp4 files.)

Click on the name of the file to open it in your browser.

Check the Share settings of your file—you want to be sure that anyone with the link can view the file.

In the upper right corner of the tool bar, click on Pop-out.

Google pop out

This will open the pdf in a new tab with a URL.

Once you have popped it out, you'll be able to access the "More actions menu" shown here:

More actions

Embed itemClick on the More actions link, then select Embed item....

Doing so will generate an embed code that you're going to copy into a Moodle page (shown below). Copy the code and click on OK.

Embed code selected

Back in Moodle, open the page (or chapter, in a book) where you want to embed the pdf.

Click on the show more toggle icon highlighted here, then click on the icon to open the HTML view.

Html source code

Paste the code into the HTML edit window.

Embed code

To display the pdf in the full window, replace the width "640" with "100%" and replace the height "480" with "800."

Click on Update and Save changes to see how it looks!