"Publishing" to a LMS submission system?



I use R-studio server in my statistics classes (intro and intermediate). For homeworks as well as exams, my students create or edit rmarkdown documents. Currently I collect these directly from their home directories on the server for grading.

Our school uses the Canvas learning management system, that allows students to submit assignments on line, as pdf or word documents. It then allows me to grade the submitted documents on line. I was wondering if there is any way to use the publishing feature of R-studio to allow students submit their assignments directly to Canvas. Did anybody try anything like that, perhaps with a different LMS? Any success?

(My original idea was that I would collect their R-markdown documents, render them to pdf or word, and submit them on their behalf to Canvas. That should be very easy to script, unfortunately, Canvas does not allow professors to submit assignments on behalf of students.)


I'm not sure about Canvas, but there is this package that does exactly what you want - https://cran.r-project.org/web/packages/exams/index.html.