Giter Site home page Giter Site logo

box-course's Introduction

box-course

This is a project to provide a set of command line utilities for running a course on box.com.

Installation

Dependencies

You need the following libraries to use box-course

  1. requests (http://www.python-requests.org/en/latest/) this library is used for the box.com v2 API.
  2. PyPDF2 (https://github.com/mstamy2/PyPDF2) The gradebook needs to be able to read data from PDF files. We try to use this python module, but some pdfs cannot be read by it.
  3. pdftk (http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/) This is a fallback executable used to read pdfs. It is slower than the python module in my opinion, so we only use it if the python module fails.

Finally, you need to install box-course. Clone the git repository, and use pip install -e box-course to install it as a developer.

Register for your box-app

For CMU users, go to https://cmu.app.box.com/developers/services/edit/ to create a Box application. you will need a name for your application. You will get an API key (also known as your client id), and a client_secret. Make a note of these.

You have to come back later to this site to add the Redirect url for authentication.

Setup your webserver, and put the cgi-script there.

To authenticate and get your tokens, you need to have access to a web-server. Install the cgi-script in box_course/cgi-bin/box-course-authenticate on your server. You need to figure out how to set environment variables for your client id and secret. For apache, you can put this in the httpd.conf file:

<Directory "/var/www/cgi-bin">
   AllowOverride All   # this is the line that allows the override
   Options None
   Order allow,deny
   Allow from all
</Directory>

Then, in the /var/www/cgi-bin create a .htaccess file with these contents:

SetEnv CLIENT_ID "fjdklaff8d9a798syf7fa"
SetEnv CLIENT_SECRET "uKo6aLD5RmqenaUAUOF3mDhmDHsGoY1A"

When you visit your cgi-script, e.g.

http://yourhost/cgi-bin/box-course-authenticate

You will be taken to the box site to put in your password and approve the app, then you will get a token.json file in return that you need to save on your hard drive. Make note of where you save it, because you need it to configure box-course.

Configuration and course setup

Create a directory you want your course to be in, and in that directory create a file called box_course_config.py, based on this example ./box_course/box_course_config_example.py. Put a copy of the course roster in this directory also. Run box-course init in that directory to setup the course.

Course management

More to come later

List of things to do

How to include external students?

one problem is I want to use the course roster, which contains andrewids. I need to include other email addresses too. I could add these to the roster, but they wold be deleted with updates.

I think I need an extra roster file, with the same format, but with email addresses.

The file needs this format for consistency year, email, lastname, firstname

F13, [email protected], Kitchin, John

box-cli

I really want a command line ability to add, remove and edit collaborations, tasks, etc…

box-cli collab –add –remove –edit box-cli task –add –remove –edit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.