Skip to content

Instantly share code, notes, and snippets.

@tidusx18
Created December 12, 2018 21:22
Show Gist options
  • Save tidusx18/ea873e73181708799d4eeb6da38bb21c to your computer and use it in GitHub Desktop.
Save tidusx18/ea873e73181708799d4eeb6da38bb21c to your computer and use it in GitHub Desktop.
The code can be pasted into the console of a browser window with an active Canvas session with the appropriate course ID and assignment ID.
let csrf = Cookies.get('_csrf_token')
let courseID = ''
let assignmentID = ''
fetch('https://fiu.instructure.com/courses/${courseID}/undelete/assignment_${assignmentID}', {
method: 'POST',
headers: {
'X-CSRF-Token': csrf
},
})
.then( res => res.json() )
.then( res => console.log(res) ) // confirmation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment