daranzolin / rcanvas

R Client for Canvas LMS API
Other
90 stars 43 forks source link

Use file.path for update_wpage #49

Open vnijs opened 4 years ago

vnijs commented 4 years ago

Wonderful package! I use Rmarkdown to create my syllabus and can now use update_wpage to put all the pages up on canvas. Really nice!

I found a (very) minor issue with update_wpage however. canvas_url() returns https://my-canvas-site/api/v1 so the url becomes something like https://my-canvas-site/api/v1courses/123/pages/my-page. Note the missing / between v1 and courses. Using file.path would fix this.

vnijs commented 4 years ago

As I'm using the package more it seems that this issue comes up everywhere canvas_url is used. Adding a / at the end of the url created by this function may be a more efficient way to address this issue.

daranzolin commented 4 years ago

@vnijs Are you interested in becoming a maintainer of this package? rcanvas is no longer relevant to my work, so I've been looking for additional maintainers...and perhaps the repository should live in a different location as well...

We have a few collaborators at present, but I'd be more than willing to toss you the keys as well.

vnijs commented 4 years ago

@daranzolin I'd be happy to be one of the maintainers since I expect we will be using the package a fair amount in the future. Not really ready for more responsibility than that however since I already maintain several packages on CRAN :)

FYI I'm building a demo canvas site for our faculty now so it seems plausible that I'll add a few more things to this PR in the next week or so. Is that ok?

daranzolin commented 4 years ago

@vnijs that's fine with me! @bbbruce and @vanatteveldt have been an awesome help, but the package likely needs a longerish term solution. Sent you an invite.

djhunter commented 4 years ago

@vnijs Thanks for pointing out the file.path fix. It also fixed a problem I was having with grade_submission. It's possible there are several places where this needs to be changed.

lennonab commented 3 years ago

As I'm using the package more it seems that this issue comes up everywhere canvas_url is used. Adding a / at the end of the url created by this function may be a more efficient way to address this issue.

This worked well for me when I encountered a similar issue with get_submission_single(). It also fixes the issue of @drmankin (https://github.com/daranzolin/rcanvas/issues/50#issue-764098908)

dhicks commented 3 years ago

file.path() is platform-specific — it's intended to be used for constructing paths for the local OS. The function make_canvas_url() constructs Unix-style paths that are what you want for URLs.