No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cogs Merge branch 'master' of github.com:asayler/COG Sep 12, 2016
conf Add profile conf file Nov 13, 2015
docs Update ASSIGNMENT_SETUP Aug 9, 2016
moodle @ ec9853d Updated moodle submodule Aug 20, 2016
perms Removed my auth checks and split out my tests Mar 16, 2016
scripts
spec Added /users/usernames/ Apr 8, 2016
static Added index page for root Aug 26, 2014
templates Added contributors Aug 23, 2016
test_input Updated grading script to accomodate tmp directory Oct 5, 2015
util Merge branch 'master' into production Jun 16, 2016
.gitignore Added config file support for redis settings Aug 22, 2014
.gitmodules Moved submodule to https Aug 10, 2014
.travis.yml
CONTRIBUTORS Added contributors Aug 23, 2016
COPYING Added License and Updated README Aug 25, 2014
Makefile Factored apt commands out of makefiles and added better build/test di… Aug 18, 2016
README.md
api.py Added /users/usernames/ Apr 8, 2016
api.wsgi Renamed wsgi loader Aug 23, 2014
api_test.py
cog.conf.sample Added sample config file Aug 23, 2016
perms.py Added reset_defaults permissions utility Nov 13, 2015
pylint.rc Tweaked pylint confif and fixed pylitn errors Nov 6, 2015
requirments.txt Fixed requirements bug Aug 23, 2016

README.md

COG: Computerized Online Grading

By Andy Sayler and Others
University of Colorado, Boulder

About

COG is a modular and scalable grading framework for student programming assignments designed to support a wide range of use cases and development techniques. COG aims to provide a versatile set of abstractions capable of accommodating a range of automated grading use cases. COG provides a Python-based grading backend, a RESTfull API, and multiple user frontends (see below). It also supports plugins for interfacing with external systems like Moodle, etc. COG is Free Software, licensed under the terms of the AGPL.

Status

COG is currently running in Beta in production using v2 of the API. Bug reports, patches, and comments welcome.

Build Status

Setup

Pull submodules:

$ make git

Install apt reqs:

$ sudo apt-get install -y libffi-dev libssl-dev libldap2-dev libsasl2-dev dos2unix
$ sudo apt-get install -y redis-server

Install pip reqs:

$ make reqs

Note: It is probably best to use virtualenvs to setup a local COG environment. But if you're looking to setup COG without virtualenvs, you'll need to append sudo to the command above.

Setup conf:

$ sudo make conf

Administration

To list, add, or remove admins:

$ cd <COG Repo>
$ export PYTHONPATH=$(pwd)
$ ./util/permissions.py <command>
  • Note: Users must already exits in the COG DB before they can be added as admins. Have them log into COG at least once prior to elevating their access. *

To run garabage collection:

$ cd <COG Repo>
$ export PYTHONPATH=$(pwd)
$ ./util/maintaince.py

Testing

The unit tests currently rely on an external Moodle test server for testing Moodle API functionality. This server lives at https://moodle-test.cs.colorado.edu. You'll need accounts on that server to run the tests. Alternatively, spin up your own Moodle test server and use that (and the appropriate credentials) instead.

To run the unit tests, first setup the necessary environment variables:

$ export COGS_TEST_MOODLE_HOST='https://moodle-test.cs.colorado.edu'
$ export COGS_TEST_AUTHMOD_MOODLE_STUDENT_USERNAME='<Moodle Student Username>'
$ export COGS_TEST_AUTHMOD_MOODLE_STUDENT_PASSWORD='<Moodle Student Password>'
$ export COGS_TEST_REPMOD_MOODLE_USERNAME='<Moodle Instructor Username>'
$ export COGS_TEST_REPMOD_MOODLE_PASSWORD='<Moodle Instructor Password>'
$ export COGS_ENV_LOCAL_LIMIT_TIME_CPU=0.1
$ export COGS_ENV_LOCAL_LIMIT_TIME_WALL=1

Then, launch the tests (these can take 15 to 20 minutes to run depending on the speed of your machine):

$ make tests

Note: A race condition will occur if multiple sets of unit tests are run simultaneously. This is due to the fact that multiple tests all depend on modifying a single set of common Moodle assignments, and if multiple tests are thus run in parallel, they will thrash each other's modifications. To avoid these issues, run the tests sequentially and avoid launching multiple unit tests at the same time (including via the CI system).

Related

Licensing

Copyright 2014, 2015 by Andy Sayler

This file is part of COG.

COG is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

COG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with COG (see COPYING). If not, see http://www.gnu.org/licenses/.