Search the Community
Hello friends -
I have one course where whenever someone goes to link to a document from their course files, it gets changed out to something like this:
One of my coworkers had it happen to her also. She uploaded a fresh version of the document, went to the Rich Text Editor, selected the text to link to the file, selected the File from the righthand menu, and then saved the page. And then it turned into that link and clicking on it gives that tiny little UNAUTHORIZED error.
Any idea what might be causing that?
Thanks!
-
...ith the error pattern (.../api/v1/canvadoc_session?blob=...) so I'm not sure you've been able to r...
-
...ttps://mpaskills.instructure.com/api/v1/canvadoc_session?blob=%7B%22anonymous_instructor_annotations%2...
-
...o https://INSTITUTION.instructure.com/api/v1/canvadoc_session?blob=..., not the actual file path. H...
-
...ath of api/v1/canvadoc_session/ in the URL, combined with the JSON payload in the blob URL parameter, c...
-
One of my Instructional Designers has found the main process that created the URL and it was able t...
I'm trying to download the actual file the students upload via the API. I have a list of all the submissions I want to download using the URL
urlAPI_root = url_root+'/api/v1/courses/' + str(assignment.crsID) + '/assignments/' + str(assignment.id) + '/submissions/'+str(submission['user_id'])
I receive the information I need to know about the grade, time submitted and such. However, it informs me that the submission_type is online_upload but I cannot access the file that was uploaded. Any ideas?
- Tags:
- donwload submission
I've got a student that got access to a file, and I'm trying to figure out how they may have done it.
The file was posted as a file attachment to the question text of a File Upload Quiz question (see attached)
From my own research I've uncovered 3 ways that a student could get access to the file.
1) Open the quiz, view question, click preview
2) Open the quiz, view question, click file link to download
3) Mobile, Open the quiz, view question, tap file link to open in new window
In my User Page Views, these three modes of access show up as follows
1) /api/v1/canvadoc_session?blob=%7B%22user_id%22:130000003341157,%22attachment_id%22:95550680,%22type%22:%22canvadoc%22%7D&hmac=e2103e759c9b69053e36f031187dc8d8c5296b1
2) /api/v1/courses/1204457/files/95550680
3) /api/v1/courses/1204457/files/95550680
I can't find any of these access methods for the student in question. Is there any other way you know of via Canvas that I am missing for the student to get to the file that would be logged differently?
When an assignment's submissions are queried using the API, you get something like the attached below (hopefully redacted enough).
Notably, this DOES NOT include the speedgrader_url information, which is included as part of the provision_grades data structure AFTER an assessor has provided grades (in the case of a moderated assignment). Currently I need to construct the speedgrader_url manually, which is a bit of a pain and could be subject to substantial errors if the URLs change in the future.
{
anonymous_id = "k4jD5",
assignment_id = 207753,
attachments = {
{
["content-type"] = "application/pdf",
created_at = "2021-06-04T02:38:13Z",
display_name = "InterimPaper____-1.pdf",
filename = "InterimPaper____.pdf",
folder_id = 1292463,
hidden = false,
hidden_for_user = false,
id = 8973506,
locked = false,
locked_for_user = false,
mime_class = "pdf",
modified_at = "2021-06-04T02:38:13Z",
preview_url = "/api/v1/canvadoc_session?blob=%7B%22moderated_grading_allow_list%22:null,%22enable_annotations%22:true,%22enrollment_type%22:%22teacher%22,%22anonymous_instructor_annotations%22:false,%22submission_id%22:22771741,%22user_id%22:70360000000002898,%22attachment_id%22:8973506,%22type%22:%22canvadoc%22%7D&hmac=715f7f8ee35db06a42f3dfb9033c9167c3d862f2",
size = 1161279,
updated_at = "2021-06-04T02:38:15Z",
upload_status = "success",
url = "https://____/files/8973506/download?download_frd=1&verifier=V4aUjAewotKkEL7TlpMRQE6EPeggzlFygtRDf0FU",
uuid = "V4aUjAewotKkEL7TlpMRQE6EPeggzlFygtRDf0FU"
}
},
attempt = 2,
cached_due_date = "2021-06-04T05:30:00Z",
grade_matches_current_submission = true,
has_originality_report = true,
id = 22771741,
late = false,
missing = false,
preview_url = "https://____/courses/64478/assignments/207753/submissions/143171?preview=1&version=2",
seconds_late = 0,
submission_comments = {
},
submission_type = "online_upload",
submitted_at = "2021-06-04T02:38:13Z",
turnitin_data = {
attachment_8973506 = {
error_message = "",
similarity_score = 18.0,
state = "acceptable",
status = "scored"
},
eula_agreement_timestamp = "1622774291655"
},
user = {
avatar_url = "https://___/images/messages/avatar-50.png",
created_at = "2021-03-10T02:02:42+10:30",
id = 143171,
login_id = "a1805185",
name = "___",
short_name = "___",
sis_user_id = "1805185",
sortable_name = "___"
},
user_id = 143171,
workflow_state = "submitted"
}
The concept of SpeedGrader is good. But the execution is done rather poorly. To begin with, it is very stupid that one has to confirm each annotation and there is no reminder at all if you did not do so. Sometimes I graded half of the assignments and realized that nothing was saved.
It is a terrible design fault. Since one can easily remove annotation, why one should confirm an annotation by default? I am not even sure it is a deliberate design feature or really just a bug.
Hi - I am trying to figure out a way to bulk download annotated submissions from Canvas. What I would like to be able to do is to download all annotated submissions for a particular student across a number of Canvas courses. This is that the student's tutor can look over the portfolio of marked and annotated submission for their tutee from time to time without having to go through all relevant courses. For practical reasons, I'd like tutors to actually get the files rather than a link to the file preview in docviewer (which shows the submissions).
I think the above cannot be done via the API. Using the submissions API (in the attachments), I can get the URL of the file (without annotations) or the preview url, which brings up the docviewer. The preview url seems to be an API call that gets redirected to a canvasdocs session. On that page, one can see the document with annotations, and there is a button on the top left that allows the viewer to download the annotated pdf.
Here is the question: is there a creative way of automatically download that pdf? (I am guessing there is no standard way to do this).
I looked at the source of the docviewer page and it seems that the download button calls some sort of javascript code. I guess the script produces a pdf of the submission + annotations and serves it up as a file to download...but I do not know and cannot think of a way of doing this in a batch way so that I can download all files...
Any ideas?
Thanks,
Alessandro
-
...review_url that looks something like this (URI decoded and line breaks added) /api/v1/canvadoc_session? b...
-
I thought I submitted it from the developer community page and assumed it would appear in the group...
-
@adamwarecs , I found out how to download the file without loading the redirected pag...