But instead, for Google Workspace Shared Drives or users disabled from sharing publicly
This is slightly different from how the story is posed below
While the implementation proposed below is likely the best one there are alternatives
Share with service account, and open every file as service account
Host the files (runs into copyright issues)
⚠️ 👇 ARCHIVE 👇⚠️
This is to confirm the plan outlined below will work, and hopefully scope the work involved.
As a teacher at Example University, I want to use the Hypothesis LMS app in Sakai to assign readings to my students. The PDFs for these readings reside in a Team Drive, and the university library mandates that these PDFs are set so that "anyone at Example University with the link can view," rather than "anyone with the link can view."
When I launch the Google picker I need to:
See files shared with me by the university library
Select one of these files to include in my assignment, without changing the privacy settings of the file
In #632 we explored possible implementations. Robert came up with:
Make Google Drive files work similar to Canvas files, serving PDFs in some way other than serving the download URL.
Change the Google Drive assignment selection flow so that it records the file ID and the fact that it came from Google Drive in the LTI launch URL, but doesn't make the file publicly accessible. In other words, it would generate an LTI launch URL similar to the one it generates for Canvas files.
Change the assignment launch flow for Google Drive files so that instead of directly rendering a PDF in Via, it instead:
Gets the user's authorization to access their files in Google Drive
Fetches the file content
Serves the file content inside PDF.js, eg. using a blob URL or by passing a data buffer directly to PDF.js This would involve changes to the BasicLtiLaunchApp mini-SPA in the client and we'd also need to either give Via the ability to load content from a file buffer (eg. transferred from the LMS app to Via via postMessage) or add PDF.js directly to the LMS app.
This will allow any file that is shared with the student's Google account, eg. by being shared with "anyone at " to be used as an assignment without needing public sharing.
jon-betts changed the title SPIKE: Change Google Drive selection and launch flow to allow institution-only PDFsCan we change Google Drive selection and launch flow to allow institution-only PDFs?on Nov 27, 2019