Skip to content
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

get_submissions() error #52

Open
tormodb opened this issue Jan 13, 2021 · 1 comment
Open

get_submissions() error #52

tormodb opened this issue Jan 13, 2021 · 1 comment

Comments

@tormodb
Copy link

tormodb commented Jan 13, 2021

When I try to use the get_submissions for assignments with a type_id I am getting the following:
Error in canvas_query(url, args, "GET") : Not Found (HTTP 404).

Are anyone else experiencing this issue? I am using the for by @rmtrane as that version seems to be most up to date.

@dhicks
Copy link
Contributor

dhicks commented Apr 27, 2021

It looks like the URLs are constructed inconsistently across different functions. In get_submission() the URL is constructed as

url <- sprintf("%scourses/%s/%s/%s/submissions", canvas_url(), 
        course_id, type, type_id)

which leaves out a / between the result of canvas_url() and the course/:course_id/... part.

It looks like the helper function make_canvas_url() is intended to be used to construct URLs more simply and consistently, eg, in get_assignment_list():

url <- make_canvas_url("courses", course_id, "assignments")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants