-
Notifications
You must be signed in to change notification settings - Fork 5
Home
These instructions are tested and working on Ubuntu 14.04 and 16.04. Use other versions at your own risk.
https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Follow the Node.js version 8 install instructions.
Afterward, verify that your npm version is 5.3.0 or greater. If a newer version isn't working for you, try to downgrading to 5.3.0.
https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu
This can be done with the following command:
git clone https://github.com/Theknickerbocker/UB_Grader.git
By default, you will have our most recent public release. If you want our in-development version, travel into the UB_Grader directory and checkout the "dev" branch with the following commands:
cd UB_Grader
git checkout dev
While in the UB_Grader directory, enter the following command and wait for the installation to complete:
npm install
Visit the Google API Console and go to the "Credentials" section. Create new credentials and select the "OAuth client ID" option. Set it up as a web application, name it whatever you want ("AutoGrader" is fine). Under "Authorized JavaScript origins", enter:
http://localhost:8000
Under "Authorized redirect URIs" enter:
http://localhost:8000/api/auth/google/callback
This will enable you to deploy locally. Add any other origins and URIs here that you may need to host later. Upon creating your credentials, you should have access to a Client ID and a Client Secret. You need these for the next step.
First create the config directory and keys.js file using the following commands:
mkdir server/config
touch server/config/keys.js
Inside of keys.js you need to put your googleClientID and googleClientSecret keys that you generated in the previous step. The cookieKey is completely arbitrary and can be any random string.
Example keys.js:
module.exports = {
googleClientID:'randomstring.apps.googleusercontent.com',
googleClientSecret: 'secret key',
cookieKey: 'randomstring'
}
Make sure you don't have any spaces at the beginning and/or ends of your keys. This sometimes happens with copy/paste and it will break the app.
To run actual autograded jobs, you'll need to have Tango set up locally. The directions to do so can be found at https://github.com/daviddob/Tango/wiki
In order to be able to do anything once you launch the app, you will first need to designate an Admin account. For more info about the account types and user hierarchy, read the "About Accounts and Login" section of the Wiki.
Open up server/config/dummyData.js
in your favorite text editor. Here you will see a bunch of sample accounts that get created when the server is first run. Here is one of the sample Admin users that gets created:
const user9 = new User({
first_name: 'SuperUser',
last_name: 'One',
email: '[email protected]',
sys_role: 'admin',
person_number: '90601393',
updated_at: new Date(),
});
You can simply edit these fields to correspond to the account you want to be an Admin. email
is the most important key for identification. When you launch the app in the next step, the database will be automatically populated with this data.
Run npm install again
npm install
Start the database
sudo service mongod start
Start the application!
npm start
That should have you up and running on localhost:8000 in your web browser. You should now be able to log into the designated Admin account and begin creating courses and assigning instructors.
For managing your database, we recommend using a GUI tool such as Robo 3T or UMongo. Such tools also allow you to view your existing users in the DB to make sure everything is correct.
Enjoy!
Wiki
Documentation
Contributor
Misc.