Google Classroom Classwork insertion (Deep Linking) and LTI launch #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thegcLinkId
added as thelink
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.