Add a Google Drive File to Your Course#

Tags: educator how-to

To add a Google Drive file in the course body, you create an advanced component in Studio or create a Google Document XBlock in OLX.

Add a Google Drive File Component in edX Studio#

Ensure you enable Google Drive files before you add the component.

To add a Google Drive file component, follow these steps.

  1. On the Course Outline page, open the unit where you want to add the Google Drive component.

  2. Under Add New Component, select Advanced, and then select Google Document.

    The new component is added to the unit, with the default Google presentation embedded.

  3. In the new component, select Edit.

  4. In the Display Name field, enter the name for the component.

  5. In the Embed Code field, paste the embed code that you copied in the Publish the Google Drive File and Obtain the Embed Code task.

  6. Select Save.

You can then Previewing Draft Content to see how the unit with the Google drive file will appear to learners.

Add a Google Drive File XBlock in OLX#

To add a Google Drive file XBlock in OLX, you create the google-document element. You can embed the google-document element in the vertical element, or you can create the google-document element as a stand-alone file that you reference in the vertical.

For more information, see OLX Course Building Blocks in the EdX Open Learning XML Guide.

For example:

<google-document url_name="c5804436419148f68e2ee44abd396b12"
  embed_code="&lt;iframe
  frameborder=&quot;0&quot; src=&quot;https://docs.google.com/spreadsheet/pub
  ?key=0AuZ_5O2JZpH5dGVUVDNGUE05aTFNcEl2Z0ZuTUNmWUE&amp;output=html&amp;widge
  t=true&quot;&gt;&lt;/iframe&gt;" display_name="Google Document"/>

The value of the embed_code attribute is the embed code you copied in the Publish the Google Drive File and Obtain the Embed Code task.

Note

The edX Learning Management System sets the height and width values for Google Drive files. If you add these attributes, the LMS overrides your changes.