This application was created using Node, Express, and React by Connor Bernard at the University of California, Berkeley for the sake of displaying student grade information for the classes CS10 "The Beauty and Joy of Computing" and CS61C "Great Ideas in Computer Architecture (Machine Structures)."
- The first column should be the student's name
- The second column should be the student's email
- The first row should be the titles of the homework assignments for that column
- The second row should be the type of assignment
- The third row should be the maximum amount of points the assignment is out of
- The bin page should have two columns and be ascending with the leftmost column being points and the rightmost being letter grade as shown below
- Open the /api/config/default.json config file
- Fill out the server section with the port of the API
- Fill in the spreadsheet section with:
- The spreadsheet ID (found in the sheet URL)
- The scopes (only change this if the API needs more than readonly access)
- Fill out the pages subsection of spreadsheet with:
- The gradepage (the page with the grade data on it) and:
pagename
: The name of the sheet with the grade dataassignmentMetaRow
: The row that the assignment metadata starts onstartrow
: The row where student information startsstartcol
: The column where student information starts
- The binpage (the page with the bins on it) and:
pagename
: the name of the page with the bins on itstartcell
: the top left cell of the bins (point value for F)endcell
: the bottom right cell of the bins (letter value for A+)
- The gradepage (the page with the grade data on it) and:
- Add all necessary admin emails to the admin whitelist
NOTE: If your API server's origin is different from your live website's origin, you will have to set the REACT_APP_PROXY_SERVER
environment variable equal to the respective URL in /.env.
- In the root directory run
make docker
OR
- Navigate to the root directory
- Build a dockerfile with
docker-compose build
- Run the dockerfile with
docker-compose start
(ordocker-compose up
to see console output in console)
- [First use only]: In the root directory run
make init
- In the root directory run
make npm
to start the service
Note: Running these will start both an api server as well as a website
- To access the cli when the container is running:
docker exec -it gradeview-redis-1 redis-cli
- First command is to enter the password. The password is stored in the root .env file as REDIS_DB_SECRET
AUTH {value of REDIS_DB_SECRET}
- Select which data to use - since we only have the data from the Google Sheet, it is populated to the 0 index, so type:
SELECT 0
- To list out all of the keys in this database:
KEYS *
- To access the data for the assignment:concept mapping:
GET Categories
This returns a JSON in the following format:
“{\“Quest 1\“:
{\“Abstraction\“: \“2\“, \“Number Representation\“: \“4\“, \“Iteration\“: \“6\“, \“Domain and Range\“: \“6“, \“Booleans\“: \“6\“, \“Functions\“: \“4\“, \“HOFs I\“: \“12\“}
}”
- To access a students data, use their email. For example:
GET dahluwalia@berkeley.edu
This returns a JSON in the following format:
“{\“Legal Name\“: \“Ahluwalia, Dev\“,
\“Assignments\“:
{\“Quest 1\“:
{\“Abstraction\“: 2, \“Number Representation\“: 4, \“Iteration\“: 6, \“Domain and Range\“: 6, \“Booleans\“: 6, \“Functions\“: 4, \“HOFs I\“: 12}
}
}”