(For more resources on Mahara, see here.)
Information about the various add-ons and plugins is available on the Mahara.org site. You can access some of the plugins, as well as information on how to install and use them, at http://wiki.mahara.org/Plugins.
Adding a spreadsheet and chart using Google apps
In this recipe, we will create a spreadsheet using Google Docs, and then, we will use the Google Apps block to add the spreadsheet to a page.
Google Apps is now a standard block in Mahara, rather than a plugin.
Go to http://www.google.com. Across the upper left-hand portion of the page, you will see a small menu of options. Click the small arrow next to the word more to expand a menu of options. From the menu, select Documents.
If you already have a Google account, sign in; if not, then click the link to Create an account now and complete the information form to open an account. Google accounts are free.
How to do it…
- Once you are at your Google Docs page, click the button labeled Create new and then the option Spreadsheet.
- Before working, go to the File menu and select Save.
- In the small window that opens, you will see a space to put the title of this document. After typing in the title, click OK. Google will now automatically save your document as you work.
- Begin building your spreadsheet.
- To publish the document, click on the small arrow in the upper right-hand corner, then select Publish as a web page.
Publishing a document as a web page allows those who have the link to the published page to see it. It does not give them permission to edit it, and it does not allow the general public to see it.
- In the Sheets to publish area, use the drop-down menu to select which sheets in the spreadsheet you would like to publish. If you’ve only used the first sheet, or you wish to publish all the sheets in this particular spreadsheet, then you can leave the default setting of All sheets.
- Leave the option Automatically republish when changes are made checked.
- Click the button to Start publishing.
- In the area labeled Get a link to the published data, leave the drop-down menus set to their defaults. Below them you will see a URL that begins with https. Highlight and copy that URL.
- Log in to Mahara and go to the Pages area of your Portfolio.
- Open the page you want to embed your Google spreadsheet into, and then click the Edit option in the upper right-hand corner of the page.
- From the Files, images and video tab, click and drag a Google Apps block into the area where you wish to add the spreadsheet.
- In the Block Title, type the name of the spreadsheet.
- In the box labeled Embed code or URL, past the URL you copied in step 9.
- For now, you can leave the default settings for Width and Height, as you can always change them later.
- Click on Save.
How it works…
As you update the spreadsheet in Google Documents, the spreadsheet displayed in your Mahara page will automatically update as well. At the bottom of the spreadsheet, in Mahara, there is a link to Edit this page. When the link is selected, a new window will open and the user will be asked to sign in to their Google account. If you have not given them access to the page, they will not be able to view the Google Docs page. If you have given them access to view, but not to edit, then they will be able to see the document in Google Docs, but they will not be able to edit it.
There are two types of permissions in Google Docs. In the main recipe, we looked at the permission setting that allows for publication, but Google Docs also has a setting that controls who can view and edit a document. Changing this setting, which by default is “private”, can provide more functionality to your embedded Google Doc.
Giving others the ability to view and/or edit the spreadsheet in Google Docs
- Log into your Google account and open your spreadsheet.
- Click the Share button in the upper right-hand corner.
- A Sharing settings window will open. In the area for Permissions, you see will the current setting for this document. By default, it is set to Private. You have two options: one allows you to provide general viewing and editing permissions; the other allows you to identify specific individuals you’d like to grant permissions to (they will have to log in before they are able to access the spreadsheet).
- To allow others to view the document without logging in, click the Change link.
- Click in the bubble next to the visibility option you would like to set.
- If you select anything other than Private, you will be given the option to Allow anyone to edit the document. Technically, only individuals that can see the document will be able to edit it. If you wish to grant that access, then select that option as well.
- Click on Save.
- If you wish to give permissions to specific individuals only, then skip steps 4-7.
- Click in the textbox under Add people.
- The area will expand. In the Add people box, type the e-mail addresses of the individuals whom you will be sharing this document with.
- From the drop-down menu, select whether you will give permission to edit or only to view.
- In the textbox for personal message, type a small e-mail message letting them know they now have access to the page.
- Click Share.
Using Embed.ly to add a Google map
The Embed.ly block makes it possible for you to embed all kinds of media into a Mahara page. There are over 200 media services that work with the Embed.ly block. A list of these can be found at http://api.embed.ly/. In this recipe, we will use Embed.ly to add a Google Map to a page. The exercise will provide information that will be useful, whether you wish to embed a Google map or any of the other services available through Embed.ly.
You will need to open three windows (or tabs) in your browser. One window needs to be opened to your account in Mahara, the other to Google maps (http://maps.google.com), and the third to Embed.ly (http://api.embed.ly/).
How to do it…
We’ll start with Embed.ly:
- Go to the Embed.ly page listed previously.
- Scroll down to the list of Services available through Embed.ly and click on the one labeled Google Maps.
- A small window will open that displays the format of Google Map URLs that will work with Embed.ly. Make note of the format—see the following screenshot:
The * in the URL patterns for Embed.ly are a type of placeholder, that is, they represent URL content that will be specific to the item you will be embedding. The other characters in the URL pattern are very specific and must be matched exactly.
- Go to the Google Maps window.
- In the search box, type the location you wish to get a map of and click on the Search Maps button.
- In the upper right-hand corner of the map, you will see three words Print, Save, and Link. Click on Link.
- A window will open with the URL for the map highlighted. Copy the link.
(Move the mouse over the image to enlarge.)
Notice that the URL has a format that Embed.ly had identified as an acceptable URL format. It begins with http://maps.google.com/maps?. After the ?, there are a number of letters and symbols. These characters are in the location that the * was in. This is a proper format for Embed.ly.
- Go to Mahara and open the page to which you wish to add the Google Map.
- Click the option to Edit the page.
- From the External feeds tab, click and drag the Embed.ly block into the area of the page where you wish to add the map.
- Change the Block Title to the name of the location displayed in the map.
- In the field for Content URL, paste the URL you copied on the Google Maps page.
- For Google Maps, do not check the Show Description? box (it displays an ad for Google Maps)
- The Width should be set according to the size of the column you’re using for this map. You can always go back and change the size, so begin with setting the Width to 300.
- You don’t need to set the Height as the Embed.ly block will display the content proportionately.
- Click on Save.