Classroom for GitHub

Build Status

Classroom for GitHub is a Ruby on Rails application designed to automate repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub

Classroom for GitHub screenshot

How it works

Assignments are the core of Classroom for GitHub. Teachers can easily create an assignment and distribute it to students using a private invitation URL. Optional starter code can be provided for individual or group work. It's even possible to delegate assignment creation and management to co-teachers and teaching assistants by adding them as organization administrators.

Production environment variables

ENV Variable Description
AIRBRAKE_API_KEY the API key for airbrake.io, if set Airbrake will be enabled
CANONICAL_HOST the preferred hostname for the application, if set requests served on other hostnames will be redirected
GOOGLE_ANALYTICS_TRACKING_ID identifier for Google Analytics in the format UA-.*
PINGLISH_ENABLED Enable the /_ping endpoint with relevant health checks
MOTD Show the message of the day banner at the top of the site

Development environment variables

These values must be present in your .env file (created by script/setup).

ENV Variable Description
GITHUB_CLIENT_ID the GitHub Application Client ID.
GITHUB_CLIENT_SECRET the GitHub Application Client Secret.
NON_STAFF_GITHUB_ADMIN_IDS GitHub user_ids of users to be granted staff level access.

Testing environment variables

Classroom for GitHub uses VCR for recording and playing back API fixtures during test runs. These cassettes (fixtures) are part of the Git project in the spec/support/cassettes folder. If you're not recording new cassettes you can run the specs with existing cassettes with:

script/test

Classroom for GitHub uses environmental variables for storing credentials used in testing, these values are located in your .env file (created by script/setup). If you are recording new cassettes, you need to make sure all of these values are present.

ENV Variable Description
TEST_CLASSROOM_OWNER_ID The GitHub user_id of an organization admin.
TEST_CLASSROOM_OWNER_GITHUB_TOKEN The Personal Access Token for the classroom owner
TEST_CLASSROOM_STUDENT_ID Test OAuth application client ID.
TEST_CLASSROOM_STUDENT_GITHUB_TOKEN The Personal Access Token for the student
TEST_CLASSROOM_OWNER_ORGANIZATION_ID GitHub ID (preferably one created specifically for testing against).
TEST_CLASSROOM_OWNER_ORGANIZATION_LOGIN GitHub login (preferably one created specifically for testing against).

And that's it! You should have a working instance of Classroom for GitHub located here

Deployment

We strongly encourage you to use https://classroom.github.com, but if you would like your own version Classroom for GitHub can be easily deployed to Heroku.

Deploy

Contributing

We'd love to have you participate. Please check out contributing guidelines.

Contributors

Classroom is developed by these contributors.

Shout out to GitHub Summer of Code student, Mark Tareshawty, from The Ohio State University for his work on Classroom for GitHub.