github-education-resources / classroom

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.
https://classroom.github.com
1.34k stars 565 forks source link

API access to Classroom data #1679

Open talbronfer opened 5 years ago

talbronfer commented 5 years ago

Feature request :sparkles:

It would be great if there could be some sort of API where we could do any of the following:

Use case: we want to create a continuous integration workflow for all student assignments, with test results showing up on our own in-house LMS platform. For this, we need our platform to be aware of the GH repo created by every particular student (maybe there's an existing way of doing this?)

BenEmdon commented 5 years ago

Hey @talbronfer, we do have a stretch goal as part of #1518 to expose a public GraphQL API. This work is a way off though and has no deadline (as it's a lot of evenings and weekends work).

We already expose a private API similar to the one you are describing for Classroom assistant to consume (https://github.com/education/classroom/blob/master/app/controllers/api/assignment_repos_controller.rb). It would be worth your while to contribute to the project to ensure this gets built yourself.

talbronfer commented 5 years ago

Hey @BenEmdon, thanks for your reply. I can see that the GraphQL API milestone is quite a bit of work. In your opinion, what would it take to make the private Classroom Assistant API public? Does it have to GraphQL based as well for the PR to be accepted, or do we just need to make it routeable to public and add basic querying/sorting features?

BenEmdon commented 5 years ago

Just talked with the classroom team about this. A public API doesn't sound like something we can support at this time since it would require extra infrastructure to ensure third party rate limiting.

This is something we will have to start building ourself. The demand for a public API is noted and will influence the roadmap of the project.

talbronfer commented 5 years ago

@BenEmdon, thanks for following up. Please keep us posted -- I'd love to chip in and contribute when the infrastructure is ready.

titaniumbones commented 5 years ago

I'd be interested in contributing insofar as I'm able. This would also probably be a necessary step towards LMS integration -- It would be great to grab a list of students from Canvas, for instance, and add them to a GH Classroom roster automagically. I recently wrote a primitive lisp client for Canvas and would be interested in combining the two, maybe even generating the repos automatically.

Even just polling for

stephaniegiang commented 5 years ago

@titaniumbones @talbronfer We have just launched the GitHub Classroom + LMS integration! 🎉

Check out the blog post here: https://github.blog/2019-08-13-use-github-classroom-with-your-own-tools/ And here are the docs to help set you up: https://classroom.github.com/help/connect-to-lms

Try it out and let us know what you think! If there are any problems, feel free to open an issue

titaniumbones commented 5 years ago

Hey @stephaniegiang , I have just sen this (was on vacation for a week!), and would like to try it out, but do not seem to have the Canvas admin privileges that the app requires. I have a support request in, but I'm sure the more info I have, the more likely that request is to be approved. I'm also wondering if anyone has reported how they've negotiated with their IT staff to get the app approved at their institutions. Thanks!

stephaniegiang commented 5 years ago

Hey @titaniumbones! Super excited for you to try it out. You should also mention to the admins that GitHub Education is LTI certified 😄 If you are going to be using Canvas and it is hosted on Instructure, just want to let you know we are experiencing some issues with importing: https://github.com/education/classroom/issues/2263

Let us know what you think!

titaniumbones commented 5 years ago

I'll keep my fingers crossed. In the meantime -- do instructors have any prospect of accessing roster info directly via a web api? If so, thatwould be a pretty good option for me, as well. Thanks!

stephaniegiang commented 5 years ago

@titaniumbones It's in our roadmap, not sure if this will be worked on anytime soon. We will update this issue with more details once they come in 😄

titaniumbones commented 5 years ago

@stephaniegiang what about things like the "download all repositories" feature for an assignment? Right now I hack my way through the listo frepos using regexps, but if there was a classroom-specific flag that could b added to the API I'd be more confident I'm getting everyone.

stephaniegiang commented 5 years ago

@titaniumbones We have a tool called Classroom Assistant that can help you with downloading all repositories. Have you tried that out yet?

lwasser commented 5 years ago

hey all -- related to the questions above, is there a way to create a new classroom in an organization via the CLI / an api?