Commit 24cdbe4e authored by Alan Marchiori's avatar Alan Marchiori
Browse files

added grade db info

parent 4325184c
......@@ -57,13 +57,39 @@ You will now have a folder like **CSCI206-SEMESTER-SECTION-TA**. If you want thi
Change into the newly created folder. You will see it is currently empty. The grade command will search and clone all student repos for this course/section/semester.
For 2020 and beyond, we have a new database to hold grades, you have to configure this option in labtool. Your instructor will send you the needed <user> and <pass>.
For 2020 and beyond, we have a new database to hold grades, you have to configure this option in labtool. Your instructor will send you the needed password.
```
$ lt userconfig set gradebackend --value mongodb
$ lt userconfig set gradedb --value "mongodb://<user>:<pass>@eg-mongodb.bucknell.edu/csgrades"
$ lt userconfig set gradedb_pass --value "..."
```
## TA Password generation
Any user with the role *dbOwner* can use the DB command (typically instructors). This includes the ability to add new database users. All TAs will need a mongodb login with the role *readWrite*.
You can add a new user with the command `db add <NAME>`. The NAME must match the TA user's linux login id. The output of this command will include a password as shown below. Note the default role to add is *readWrite*.
```
$ lt db add test
› success -->
{'ok': 1.0}
› password: RqPG2Hs9B1iLW7rNSx/fbQ==
```
This creates a TA account with linux login `test`. **That user** (test) will have to add their password by executing the command:
`lt userconfig add gradedb_pass --value "RqPG2Hs9B1iLW7rNSx/fbQ=="`.
If you need to add an instructor account (with the ability to create and remove accounts), you need to add the argument **--role dbOwner** as shown below.
```
lt db add new_instructor --role dbOwner
› success -->
{'ok': 1.0}
› password: htNOTDtOnx0XK4fBxStvog==
```
Instructors (dbOwners) can **show** and **rm** database users as well.
## Global configuration
The tool is meant to be flexible with most configuration stored at the COURSE level. However, the file `config/__init__.py` contains all globally defined values.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment