project-anacapa / course-github-org-tool

PLEASE USE: https://github.com/project-anacapa/github-roster-tool instead!
https://github.com/project-anacapa/github-roster-tool
MIT License
1 stars 4 forks source link
education git heroku jenkins rails students user-management

NOTE: IF YOU WANT A WORKING VERSION OF THIS APP, please visit: https://github.com/project-anacapa/github-roster-tool instead!

Course Github Org Tool

Build Status Code Climate Coverage Status Issue Count Inline docs

This tool is a first attempt at a MVP for allowing students to self-enroll in a GitHub Organization associated with a course, provided:

It also provides an interface for instructors to view which of their students have or have not enrolled in the GitHub Organization for the course, provided that the students have logged in to the application OR the application knows about the students' GitHub usernames.

Finally, this tool is the starting point for future planned features including:

  1. A means for instructors to manage student assignments
    • Instructors will be able to set up starter code, and students will be able to automatically create repos with the correct naming convention for single work, pair, or team work.
    • This is similar to the functionality of [Github Classroom], but has the added benefit that (a) student's submissions are tied back to their official enrollment in the class by school email and, optionally,student id and (b) only students officially enrolled in the class can get access to self-signup into the organization.
    • There will be a feature that allows instructors/TAs to gather all student submissions into a single directory structure for off line grading, or other processing.
  2. A means for instructors to give feedback on student assignments.
  3. Auto grader features that replace the submit.cs autograder deployed at UCSB.

Deploying on Heroku

To deploy this app on Heroku, you will need

  1. A Heroku account. The "free tier" is sufficient.

  2. A github organization for your course, to which the instructor has owner access. We will refer to that organization by the example name UCSB-CS99-S15 in these instructions.

  3. Values for six environment variables that authenticate the application to github in various ways. We'll explain how to set up each of these in just a moment. Each of these takes only a minute or two to obtain. Here's a list of them for reference—we'll explain how to get each of them below.

    • GIT_PROVIDER_URL
    • OMNIAUTH_STRATEGY
    • OMNIAUTH_PROVIDER_KEY
    • OMNIAUTH_PROVIDER_SECRET
    • MACHINE_USER_NAME
    • MACHINE_USER_KEY
  4. Optionally, a name for your application. If you don't choose one, heroku will choose one for you such as mashed-potatoes-85352. You may want to think of a better one in advance, such as ucsb-cs99-s15-signup or ucsd-cse-spis-2017-signup. But that's up to you.

Once you have those four things ready, you can deploy to Heroku with a few mouse clicks.

Steps to take

Step 1: Generate your OMNIAUTH_PROVIDER_KEY and OMNIAUTH_PROVIDER_SECRET

Before you do this step, you will need:

First: while signed in as a github user that has owner access to the course organization (e.g. UCSB-CS99-S15), and navigate to the "Register a new OAuth application" screen. This is accessed via "Settings", then under "Developer Settings", the tab called "OAuth Applications", and then the "Register a new application" button. The URL is likely of the form: https://github.com/organizations/UCSB-CS99-S15/settings/applications/new

Once you enter all of this, you'll get back a Github-Client-Id, and a Github-Client-Secret. Keep this window open so that you can copy these values in for OMNIAUTH_PROVIDER_KEY and OMNIAUTH_PROVIDER_SECRET when you get to step 3 (deploying on Heroku).

Step 2: Create your MACHINE_USER_NAME and MACHINE_USER_KEY

You now need to create these two values:

Keep this window open so that you have these values available for step 3, deploying to Heroku.

Step 3: Deploy your Application on Heroku

You need these windows open:

So, now, shift-click this pretty purple button: Deploy to Heroku

You'll be asked for the name of your application. You'll then be asked for the values of those four environment variables.

Once you've supplied those you should be able to navigate to the application at https://appname.herokuapp.com.

Login as the instructor, and then begin setting up the course by choosing an organization, and uploading a course roster.

Information for Developers

Ruby on Rails

This application requires:

Learn more about Installing Rails.

Run the app in development

To run this application in development, you need Postgres running locally, and a postgres user called course-github-org-tool. Create it like this:

$ psql -d postgres
psql (9.4.5)
Type "help" for help.

defunkt=# create user "course-github-org-tool" with createdb;
CREATE ROLE
defunkt=# \q

Also, copy the file .env.example into a new file .env (set as ignored in the .gitignore file) and set the appropriate values.

This application utilizes the dotenv-rails gem, which automatically loads any variables specified in a file called .env in the project root into the environment when running the application.

Once you complete the above, run bundle install, rails db:setup and rails db:migrate, rails serve, etc. in the normal fashion.

Documentation and Support

TODO

Issues

TODO

Similar Projects

TODO

Contributing

TODO

Development

Helpful tool for roster upload: https://github.com/pconrad/faker-try-egrades

Credits

This application was generated with the rails_apps_composer gem provided by the RailsApps Project.

Rails Composer is supported by developers who purchase our RailsApps tutorials.

License

Copyright © 2017 Nick Brown (@ncbrown1). This source code is licensed under the MIT license found in the LICENSE file.