Top Benefits of Google Classroom Integration
What It Is?
Google Classroom is a free web service developed by Google for schools that makes it easy to create, share, and grade assignments. Google Classroom’s major objective is to make it easier for teachers and students to share files.
What Is It for?
Our application is an eLearning platform. We needed to expand the customer base on the app we were developing and allow customers using Google Classroom to consume content from our app.
Targets & Goals
- Allow Google Classroom customers to use our app’s learning materials and log in to our system from Google.
- Enable Google Classroom customers to import classes and users from Google into our system; to give assignments to such sections and submit them to Google Classroom.
- Synchronize users in imported classes.
How Was Authorization Implemented?
Google makes it possible to implement authentication and authorization using SAML SSO, and we chose this method as the most reliable.
Managing user access to cloud resources is one of the major challenges for the secure use of cloud applications in a corporate environment. With the proliferation of numerous SaaS, PaaS and IaaS service concepts, access policy management, including the organization of strong authentication for each application, places a certain burden on IT departments.
The Security Assertion Markup Language (SAML) is an XML-based open standard for exchanging authentication and authorization data between parties in a process. Users can access numerous of their cloud applications using the SAML protocol with just one login and password. A single system that supports the SAML protocol and is called a trusted identity provider (Identity Provider (IdP)) authenticates users, while cloud applications «throw» the authentication process to this IdP system whenever a user tries to access them.
The interaction scheme is shown below:
Sharing Data Between Our App & Google Classroom
To implement data exchange between applications via API, we use the gem google-apis-classroom_v1 with the relevant version. It is a simple REST client for Google Classroom API V1.
To get data from Google Classroom, we needed to implement authentication. The authentication method we have chosen is Service Account. This is an account that allows an application component to directly access the API without providing user credentials.
For integration, each new client, we must ask the WorkSpace administrator to create a service account and provide us with a generated key, which we will store in the database and use it every time we log in to Google Classroom from our application and access Google Classroom. Only those users who were created within the same WorkSpace (Google Admin) will be able to log into our system.
Users with the «teacher» role are created in our system by an administrator, and users with the «student» role are created in our system automatically when importing or synchronizing classes. Also, if a user with the «teacher» role was added to an already imported class in Google Classroom, then during synchronization it will be created and added to the class.
To receive data from Google Classroom, we need to log in to Google Classroom using the API under the current user. For this, the Authorizer service was written, which takes the key from the database and the email of the current user and authorizes using a special service. For each action performed by a user that relates to working with Google Classroom, API authorization is performed: importing classes, assigning tasks, synchronizing users, etc.
To implement the import of classes and assignment of tasks to them, we added several new entities that were associated with entities previously used by our application (classes, tasks, execution of training materials).
Assignment of Tasks
The teacher in our application assigns an assignment to a class that was imported from Google Classroom, and at that moment, an assignment is created in Google Classroom in the selected class, with the same parameters as in our system, which includes a physical link to the assigned classroom material.
The user can follow this link and see the educational material only if, before clicking on the link, he has already been logged into our system and the user has already opened a session.
To log into our system and open a session, in Google Apps, for those users who have WorkSpace configured in our system, an icon with our application is available, by clicking which a session is opened.
After the user with the role of «student» completes his educational material, it is synchronized with Google Classroom, and the task in Google Classroom also goes into the «completed» status with an equivalent grade. A user with the role of «teacher» can also evaluate the completed task in our application and see the result in both systems.
Conclusion
The implementation of this integration allowed our eLearning system to significantly expand its customer base and enter a huge potential market of new customers who use Google products.
And for new customers using Google Classroom, to use the advanced and diverse learning materials provided by our platform conveniently and unobtrusively.