Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Classroom Classwork insertion (Deep Linking) and LTI launch #36

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgwozdz-unicon
Copy link
Collaborator

The Google Classroom adapter supports Classwork insertion (Deep Linking) and standard LTI launches from Google Classroom. It does not support grade passback or memberships (NRPS). The "registration" process is very much in the POC phase (see README).

Classwork Insertion (Deep Linking)

For this to work, I built a "home page" for the demo tool that can be reached in the browser at /app. Assuming everything's set up, you can select your Google Classroom class from the dropdown and click the button to kick off the deep linking request flow. This will send a request to the typical /oidc/login_initiations endpoint which will then respond to the new /app/platform-oidc-authorize endpoint which does some cursory validations and then constructs the Deep Linking id_token and sends it to the typical /lti3 endpoint. Now you should see the Deep Linking menu in your browser window and you can select one or more link(s) to insert into Google Classroom. This will send the deep linking response to the new /app/gccoursework/{gcCourseId} endpoint which will insert the links into the previously selected course in Google Classroom.
API Call Summary:

  • /app queries the Google Classroom Courses API to fetch all of the user's courses but does not store them in the db.
  • /oidc/login_intitiations stays the same.
  • /app/platform-oidc-authorize queries the Google Classroom UserProfiles API to fetch the user, then calls the Teachers and Students APIs to attempt to determine the user's role more definitively. A GcUserEntity object is saved to the db. Then it queries the Google Classroom Courses API for the specific course chosen by the user, and saves a GcCourseEntity object to the db. There is now sufficient information to generate a Deep Linking id_token containing user and context info.
  • lti3/ stays the same.
  • /app/gccoursework/{gcCourseId} fetches the GcCourseEntity from the db and generates GcLinkEntities for each link the user chose to insert, with each GcLinkEntity having it's own uuid. It queries the Google Classroom Courses Coursework API to insert each link into the course.

LTI Core Standard Launch in Google Classroom

Now that your links have been inserted, they should take the form of /app/{gcLinkId}. If you click on one of those links, it should send a request to the typical /oidc/login_initiations endpoint which will then respond to the new /app/platform-oidc-authorize endpoint, which will generate a ResourceLink id_token and send it to the typical /lti3 but with the gcLinkId added as the link parameter.
API Call Summary:

  • /app/{gcLinkId} calls the OIDC initiation url.
  • /oidc/login_initiations stays the same.
  • /app/platform-oidc-authorize should be able to retrieve all of the data it needs about the user, course, and link from the Gc entities in the db and not need to make additional API calls to Google Classroom, but if user or course data is lost, an attempt at recovering it is made. This might change in the future though if the app is changed to support regular updates to these objects.
  • /lti3 stays the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant