Implementation strategy

This page provides a brief overview of key interactions between your add-on web application and the Google Classroom add-ons API.

Attachment Discovery iframe

The Attachment Discovery iframe is the landing page for teachers in your add-on. Consider taking the following actions regarding this view:

Other iframes

The Student View iframe, Student Work Review iframe, and Teacher View iframe are all intended to present content to the user rather than modifying a Classroom assignment. Consider taking the following actions regarding these views:

  • When an iframe opens, get the user's OAuth consent and then validate their role and attachment ID.

    • If the current user is a student, associate the submissionId from the response with the student work. This is required for passing back grades and for showing student work to teachers in the grading tool; the submissionIds match across views.
    • If the attachmentId is already known to the add-on, show the appropriate attachment UI.
    • Otherwise, it must be the case that the parent post of this attachment was copied from another post or course. Use copyHistory to identify the most recent copy that the add-on is aware of and copy the settings from it to create a new corresponding model of the attachment on the add-on side. Then, show the appropriate attachment UI.