• This repository has been archived on 13/Mar/2020
  • Stars
    star
    1,339
  • Rank 35,100 (Top 0.7 %)
  • Language
    Ruby
  • Created over 9 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GitHub Classroom automates repository creation and access control, making it easy for teachers to distribute starter code and collect assignments on GitHub.

GitHub Classroom

Build Status Code Climate


Moving forwards, GitHub Classroom will be developed internally alongside GitHub.com. As a result, we’re archiving the open source repository. This represents a significant “growing up” moment for GitHub Classroom as we strive to offer you the best education tools possible.

We’re making this decision for a few important reasons:

  1. Quality. To provide the best services to our varied and global community, we need GitHub Classroom to meet the operational excellence of GitHub.com. Continuing development internally allows us to make better use of GitHub’s internal resources, tooling, and infrastructure.

  2. Better support. Using GitHub Support as our primary feedback mechanism, instead of issues, allows us to assist our users in a more productive way. We can leverage the support infrastructure already in place for GitHub.com, and all user feedback can be kept in a single place. The Education team will continue to respond to all GitHub Classroom requests.

GitHub Classroom will continue to evolve and improve based on your feedback. We’re growing faster than ever, and can’t wait to launch some very exciting new features in the coming months.

If you have questions, concerns, or feedback, don’t hesitate to contact us at https://support.github.com/contact.

Thank you!

The GitHub Classroom Team


Table of Contents

The workflow you use as a developer, scaled for the needs of students.

Developers rarely work all by themselves, on a deadline, or ship something they’ll only use once (with no idea whether it actually works).

Wouldn’t students be better served by showing versions of their work, iterating, checking in on milestones and showing off the final product?

With GitHub Classroom you can set up the industry-standard workflow and free up your time to focus on teaching.

GitHub Classroom is a teacher-facing tool that uses the GitHub API to enable the GitHub workflow for education.

You create an Assignment with starter code and directions, send along one link, and students get their own “sandbox” copy of the repo to get started.

Set due dates, track assignments in your teacher dashboard, or integrate other tools like testing frameworks.

With GitHub Classroom, you can spin up your course on GitHub and move on to the good stuff.

@johndbritton, @mozzadrella, @d12, @benemdon, @srinjoym, and @tarebyte, are all maintainers.

GitHub Classroom screenshot

Why try GitHub Classroom?

Spend more time with students, less on setup. Students accept an assignment with one link, so you can get straight to the material.

Bootstrap group assignments in a snap. Invite students to a shared repository, and cap the number of students per group. Use the same groups over and over again, or create new ones.

More insight into student work than ever before. See when students accept the assignment, and access their work from the moment they start. With version control, catch when they get stuck and help them rewind.

You are in control. Students can work individually or in groups, in public or in private. Invite teaching assistants or graders to view the assignments.

Scales for large courses with ease. If you have a small course, GitHub Classroom will make your life easier and save you time. If you have hundreds of students, we have you covered: as many repositories as you need, and webhooks to integrate automated testing tools.

Works with your Learning Management System (LMS). Students submit a link to their assignment repository to your learning management system. Give feedback through comments in GitHub, but keep grades in your LMS.

You’re not alone. The experts on the GitHub Education team are here to answer any of your questions, and we’ve got docs, best practices, and a strong community of educators to help you migrate to GitHub Classroom.

Are you super-advanced? Do you want to build your own tools? We 💖 contributions. Please check out contributing guidelines.

Design principles

GitHub Classroom is a teacher-facing tool to simplify the educational use of GitHub. Every student needs feedback and support as they learn to code, and using GitHub you can give them the right advice, in the right place, at the right time. GitHub Classroom makes it easier to use the workflow you love, with some automation and ease for student use.

Students use GitHub. They don’t use GitHub Classroom. Experience with real-world tools gives students a leg-up once they move on from school. Invest time in the tools students can grow with, not another third-party tool with its own learning curve.

GitHub Classroom is not an LMS (Learning Management System). If you need to use an LMS like Canvas, Moodle or Blackboard, we hear you. Students can post their repositories to your LMS. We’re going to stick with what we’re good at, which is helping people collaborate on code.

GitHub Classroom is open source. Git and GitHub are versatile with many ways to meet your learning goals, and we want to model the open source process that makes our communities great.

We welcome contributions aligned with the roadmap below and through answering these questions:

  • Does it enable the real-life experience of using GitHub as a developer?
  • Does it replicate functionality that's best left to the expertise of content platforms, hardware or LMS?
  • How many support tickets and questions will the feature address?

Who is GitHub Classroom for?

Anyone teaching computer science in a high school, university or informal environment. Folks who might also find GitHub Classroom useful:

  • Higher ed statistics and data science teachers
  • Higher ed biology and the hard sciences

GitHub Classroom and the edtech ecosystem

In case you’re wondering “How does GitHub Classroom interact with my favorite app/my notebook/my LMS” here’s the tl;dr on how those pieces fit together:

Apps and content platforms

Examples: Codecademy, Skillshare, Udemy, Udacity

Apps offer premium content and interactive exercises. GitHub Classroom offers real-world experience with code. GitHub Classroom, as a teacher-facing application will eventually surface best-in-class content for top courses (notes / lectures / problem sets) but not produce original content.

Learning Management system/LMS

Examples: Blackboard, Moodle, Canvas. Google Classroom

Teachers often use a learning management system in keeping with student privacy regulations. GitHub Classroom has a lightweight integration with LMS ecosystem--students can submit a link to their repositories. LTI compliance and Google Classroom integration will make the app more extensible.

Notebooks

Examples: BlueJ, Jupyter, RStudio

Most notebooks have a Git integration that students can push to. Future iterations may pre-populate repos with robust directions on set up.

Hardware

Examples: Chromebooks, Raspberry Pi, Lego

GitHub Classroom runs in Unix environments and Windows. Shared machines or lab environments are encouraged to use cloud-based environments, like Cloud 9. Integration looks like Git and GitHub pre-loaded + embedded in hardware.

Assessment

Examples: Pearson, Travis CI, Circle CI

For GitHub Classroom, assessment is directly related to the real-world experience of being a developer: your code passes tests. Configuring folders in student repositories is a priority on the roadmap.

The technical details

GitHub Classroom is a Ruby on Rails application.

New to Ruby? No worries! You can follow these instructions to install a local server.

macOS

If you're using macOS and running the Homebrew package manager you're all set to go! Head down to Setup GitHub Classroom

Linux

Installing Docker and Docker Compose

We use Docker and docker-compose so that we don't have to setup our external dependencies on our machines.

Here is the installation guide for Ubuntu: https://docs.docker.com/install/linux/docker-ce/ubuntu/

Installing Rbenv

First things first, you'll need to install Ruby. We recommend using the excellent rbenv, and ruby-build.

Install PostgreSQL

In order to install the pg gem you have to have PostgreSQL on your system, all you need to do is install it via your package manager of choice.

If you're running an Debian/Ubuntu based GNU/Linux for example run: apt-get install nodejs postgresql redis-server memcached.

Windows

We really don't have a good story for running this on Windows, but Pull Requests are welcome 😄

Setup GitHub Classroom

We follow the script to rule them all principle, so all you need to do is run:

script/setup

Once that's done the script will kindly remind you to fill out you .env file inside the repository, this is the breakdown.

Development environment variables

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

ENV Variable Description
CLASSROOM_WEBHOOK_URL_PREFIX Ngrok url to receive webhooks (run ./script/ngrok).
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.
GOOGLE_CLIENT_ID the Google Client ID
GOOGLE_CLIENT_SECRET the Google Client Secret

To obtain your GitHub Client ID/Secret you need to register a new OAuth application.

After you register your OAuth application, you should fill in the homepage url with http://localhost:5000 and the authorization url with http://localhost:5000/auth/github/callback.

To obtain your GitHub User ID for the NON_STAFF_GITHUB_ADMIN_IDS field, go to https://api.github.com/users/your_username

To obtain your Google Client ID/Secret you will need to create a new web application. When creating credentials choose OAuth Client ID, then fill in the Authorized JavaScript origins with http://localhost:5000 and the Authorized redirect URIs with http://localhost:5000/auth/github/callback.

After creating your Google credientials, add the Google Classroom scopes of:

  • https://www.googleapis.com/auth/classroom.courses.readonly
  • https://www.googleapis.com/auth/classroom.rosters.readonly

Testing environment variables

If you want to make a functionality change to the application you will need to write tests to accompany that change. In order to do this, the test values in the .env file must be filled in.

GitHub Classroom 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

GitHub Classroom 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_GITHUB_ID GitHub user_id of an organization admin (classroom owner)
TEST_CLASSROOM_OWNER_GITHUB_TOKEN OAuth Access Token for GitHub Classroom on behalf of the test classroom owner
TEST_CLASSROOM_STUDENT_GITHUB_ID GitHub user_id of the student
TEST_CLASSROOM_STUDENT_GITHUB_TOKEN OAuth Access Token for GitHub Classroom on behalf of the test student
TEST_CLASSROOM_OWNER_ORGANIZATION_GITHUB_ID GitHub ID of classroom organization (preferably one created specifically for testing against)
TEST_CLASSROOM_OWNER_ORGANIZATION_GITHUB_LOGIN GitHub login of classroom organization (preferably one created specifically for testing against)

To obtain these values you will need:

  • A teacher (your primary GitHub account)
  • A student (another Github account, created for this purpose)
  • An organisation that the teacher is an owner of, but the student does not belong to.

It is best if you create your own organization for testing purposes, if you have done so:

To obtain the OWNER_GITHUB_ID value, you can go to https://api.github.com/users/organization_owner_username.

To obtain the OWNER_GITHUB_TOKEN value, you will need to log in to GitHub Classroom with the owner test account, pull up the Rails console, and copy the token field

To get the STUDENT_GITHUB_ID value you will need to create another user account on GitHub and get the ID by going to https://api.github.com/users/student_username

To get the STUDENT_GITHUB_TOKEN value, you will need to log in to GitHub Classroom with the student test account, pull up the Rails console, and copy the token field

To obtain the OWNER_ORGANIZATION_GITHUB_ID/LOGIN you can go to https://api.github.com/orgs/organization_name.

Now you should have all of the values filled in, great job!

Running the application

Optional

If you'd like to receive webhooks from GitHub you can run:

script/ngrok

And update the WEBHOOK_URL in your .env file.

And if you want to play with features that are still in development run:

./bin/rake enable_features

Necessary

After that, you may start the rails server in a separate terminal with:

script/server

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

Debugging

We use pry-rails and byebug for debugging. But since we use overmind in the development environment, debugging via byebug or via binding.pry requires a few more steps:

  • Once you start your server using script/server, overmind will start tmux processes depending on the Procfile.
  • We have two such processes rails and sidekiq (See Procfile.dev for details) that you can control.
  • Once you've added a debugging statement in the code and your request pauses, you can access console in a separate tab/window using the following command:
    • overmind connect rails for debugging in request-response cycle, typically controllers, models, services.
    • overmind connect sidekiq for debugging in background jobs.
  • After you've finished debugging you can close the connection using Ctrl+b d.

For more details please visit overmind homepage: https://github.com/DarthSim/overmind

Deployment

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

Deploy

There are a few environment variables you will need to know in order to get GitHub Classroom working on production.

Production environment variables

ENV Variable Description
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

Help wanted

If you're interested in helping out with GitHub Classroom development and looking for a place to get started, check out the issues labeled help-wanted and feel free to ask any questions you have before diving into the code.

Contributors

GitHub 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 GitHub Classroom.

More Repositories

1

GitHubGraduation-2022

Join the GitHub Graduation Yearbook and "walk the stage" on June 11.
1,446
star
2

GitHubGraduation-2021

Join the GitHub Graduation Yearbook and "walk the stage" on June 5.
JavaScript
1,375
star
3

graduation

$ git remote <graduation> yearbook
JavaScript
747
star
4

codespaces-project-template-js

Codespaces template for creating and deploying your own React portfolio
JavaScript
603
star
5

primer-explore-github

406
star
6

teachers_pet

Command line tool to help teachers use GitHub in their classrooms
Ruby
187
star
7

teachers

Join the discussion in the GitHub Education Community:
182
star
8

codespaces-project-template-py

Codespaces template for building a Python project
HTML
157
star
9

codespaces-project-template-dotnet

Codespaces template for building a .NET project
HTML
132
star
10

launchpad-profile-readme

128
star
11

classroom-assistant

Clone student repositories in bulk
JavaScript
116
star
12

Octernships

GitHub Octernships program connects students with industry partners in paid professional experiences and mentorship on open source and software development projects.
115
star
13

memebot_discord

Launch your very own Discord bot to welcome your users and share a meme.
Dockerfile
114
star
14

github-starter-course

93
star
15

github-university-2020

86
star
16

Student-Developer-Pack-Current-Partners-FAQ

This repo gives you an overview of the Student Developer Pack, the current partners in the pack and answers to frequently asked questions about the pack.
84
star
17

codespaces-teaching-template-py

Codespaces template for teaching Python
Jupyter Notebook
83
star
18

autograding

GitHub Education Auto-grading and Feedback for GitHub Classroom
TypeScript
59
star
19

autograding-example-python

GitHub Classroom autograding example repo with Python and Pytest
Python
45
star
20

PR-TalentLandMX

Participa para ganar swag especial dentro de Talend Land 2023
42
star
21

PR-Pao-de-Queijo-Request

HTML
41
star
22

codespaces-teaching-js-template

Codespaces template for teaching JavaScript
JavaScript
38
star
23

guide

GitHub guide for teachers
Ruby
34
star
24

autograding-example-java

GitHub Classroom autograding example repo with Java, Gradle, and JUnit
Java
26
star
25

PR-Patches-Campus-Party

PR-Patches-Campus-Party
HTML
24
star
26

Classroom-Report-2020

Design, analysis, findings and raw data from the 2020 GitHub Education Classroom Report
20
star
27

Classroom-Report-2018

Design, analysis, findings and raw data from the 2018 GitHub Education Classroom Report
20
star
28

primer-copilot

17
star
29

hackconviii

The conference for hacker community leaders: https://hackcon.mlh.io/. Here you can find everything related to the GitHub Scavenger Hunt.
16
star
30

codespaces-teaching-template-dotnet

Codespaces template for teaching .NET
HTML
14
star
31

Series-Intro-to-GitHub-Flow

12
star
32

autograding-example-c

GitHub Classroom autograding example repo with C and bash tests
Shell
12
star
33

autograding-example-cpp

GitHub Classroom autograding example repo with C++ and Catch.
C++
12
star
34

autograding-grading-reporter

Renders Autograding output and syncs results to classroom
JavaScript
11
star
35

autograding-example-node

GitHub Classroom autograding example repo with Node and Jest.
JavaScript
10
star
36

Classroom-Report-2019

Design, analysis, findings and raw data from the 2019 GitHub Education Classroom Report
10
star
37

Global-Campus-Experiences

This is a guide to Global Campus Experiences and how learners can approach incorporating them into your learning journey.
7
star
38

edu-resource-guide

Resources for GitHub and GitHub Education products and services.
5
star
39

autograding-command-grader

JavaScript
3
star
40

autograding-io-grader

JavaScript
2
star
41

example-classroom-template

Ruby
1
star