The Attachment Discovery iframe is the initial view shown to a teacher when opening an add-on during the creation of a Classroom task. An attachment is the content or activity that you intend for students to interact with.
From within a Classroom course, a teacher creates a new post (for example, an assignment, announcement, or question) and selects an add-on from the add-on drop-down list. For a short amount of time (on the order of hours), Classroom allows the add-on to add attachments to the post.
Figure 1. View of an assignment creation including the possible add-on options a teacher can attach.
Once a teacher selects an add-on, Classroom creates an Attachment Discovery iframe and loads the add-on's launch URL. Any relevant iframe query parameters are passed to the launch URL.
Figure 2. An example of an attachment discovery UI in an iframe.
The teacher uses the partner's web application, within an iframe, to select an
attachment. The app makes Classroom API calls to attach the attachment
to the assignment. When the teacher is finished selecting attachments, the
add-on sends a
postMessage payload requesting the iframe to be closed.
The iframe closes and the teacher may now see the attachments which they may choose to preview or remove from the assignment.
Figure 3. View of an assignment creation with three activity-type add-on attachments.
UX considerations within the iframe
- On initial opening, the add-on must prompt the teacher to sign in.
- Google single sign-on is required for all Classroom API calls. If your product has a separate login system, you must link accounts.
- A teacher must be able to preview an attachment within the iframe before making their final selection.
- A teacher should be able to search for, or browse through, attachable content.
- The add-on may provide a variety of views such as recent content, my content, and filter by learning skills.
- The add-on must provide an ability to create a new attachable item from within the iframe.
See the Classroom add-on requirements checklist for more details on UX requirements.
Display licensing status within the iframe
If the add-on requires a license, and the teacher doesn't have one, a clear message must be presented to the teacher that informs them of the proper next steps to remedy the situation. This is to prevent any confusion that may arise from licensing restrictions.
We also recommended that your add-on:
- Displays the teacher's licensing level within the Attachment Discovery iframe.
- Hides or disables content that's not available to a teacher due to licensing level restrictions.