This page list some common misunderstandings and edge cases that you might want to consider in designing and implementing your Classroom add-on. You're encouraged to implement failsafes and tests that cover these cases.
Google Classroom concepts
This section highlights edge cases and concepts relevant to add-ons that apply to all of Google Classroom.
Courses and user roles
A course is the central organizational unit that connects teachers to students. Courses are the highest level of organization in the Google Classroom API.
Individual users may be added to a course as "teachers" or "students". A user's role in the course is not tied to their role in their institution. That means that a student member of the school can be a teacher in a course, and teacher members can be students in courses. While the most common case is for a course to represent a regularly scheduled academic subject, courses are also created to organize student clubs or conduct professional development.
The following apply to all courses within Google Classroom.
Regarding teachers of courses:
- A course may have more than one teacher.
- Teachers may be added to a course at any time.
- Teachers may be removed from a course at any time.
Stream item
Stream items are the pieces of posted content shared with members of a Course. Developers and teachers can create add-on attachments on three stream item types: announcements, assignments, and materials.
Teachers create announcements at the top of the Stream page in the Classroom UI. Teachers create assignments and materials by clicking the Create button in the Classwork tab. Developers can create these programmatically through the Classroom API.
An assignment is a stream item that can accept a student submission. Assignments are the only type of stream item that appears in the gradebook that can contain an add-on attachment.
Regarding stream items:
- An assignment or material may be assigned to a subset of the students in the course.
- An assignment may be graded or ungraded. Teachers may change the grading status of an assignment at any time.
- An assignment may have more than one attachment.
- An assignment may have attachments of different types. For example, one assignment might have Google Docs, YouTube videos, and add-on attachments simultaneously.
- An assignment might have add-on attachments from more than one developer.
- Developers can get and modify information about any stream item with one of their add-on attachments.
- Developers can turn in, reclaim, or return a student submission for an assignment that includes one of their add-on attachments.
- Developers can only set grades for individual student submissions in assignments they created.
Copied stream items
Teachers may copy a stream item by copying a course, reusing an assignment, or publishing a stream item to multiple courses. Read our guide on copied content to understand how the add-on can handle these scenarios.
User's institution
The Google Classroom API doesn't return identifiers for a user's institution, building, or any other membership above the course level.