-
Notifications
You must be signed in to change notification settings - Fork 0
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
[CM-16] Create plug-and-chuggable embedded CM #14
base: main
Are you sure you want to change the base?
[CM-16] Create plug-and-chuggable embedded CM #14
Conversation
progressReport/canvasEmbedding.js
Outdated
|
||
// Check if the current URL matches the target page URL | ||
if (currentUrl === targetPageUrl || currentUrl === alternateTargetPageUrl) { | ||
const accessToken = '26530~etwvNZ2z3WXDxP9CXDeDNCmKN3MCWEKtDaYrQ7JRVGJ6nkBUcR8V4VURDVMBuLeW'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally forgot to remove this. I have disabled this access token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to review all code before committing. I get it, mistakes happen, but in industry, committing a private key would be a major issue and you'd have a full retro meeting just for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted!
const courseId = '141'; | ||
const studentId = ENV.current_user_id; // Replace with the actual student ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are these going to be sourced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The courseId
will be entered as a constant
I meant to remove the in-line comment on line 10. Sorry about that! Please disregard the comment. The studentId
can be accessed by by ENV.current_user_id
, which is the user id of the user for whom the page is being generated.
const targetPageUrl = 'https://ucberkeleysandbox.instructure.com/courses/141/pages/concept-map?module_item_id=418'; | ||
const alternateTargetPageUrl = 'https://ucberkeleysandbox.instructure.com/courses/141/pages/concept-map'; | ||
// Paste Canvas API key here | ||
const accessToken = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whose access token is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed not using student access tokens, so if this is a service account access token, that's fine, but only if the students cannot see this js. How is this handled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a service account access token. Students will not be able to see this js; the Canvas Theme Editor allows this code to be run server-side.
Jira Ticket
Jira Ticket
Description
Type of Change
Changes
Testing
Checklist
<ticket-id>/<brief-description-of-change>
[<ticket-id>] <brief-description-of-change>
Screenshots/Video
Additional Notes