GavinHuttley / gutils

utilities for biol3157
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

create command line wrapper for the generate and release of feedback #1

Open GavinHuttley opened 4 years ago

GavinHuttley commented 4 years ago

should be able to do this as one step.

Make assignment name a required argument, student ID optional.

J-Wall commented 4 years ago

For now, I have made a bash script which dumps all grades for each assignment into separate csvs, and also dumps all grades for every single cell into a big json. It puts a datestamp in the file names, makes them read only, and places them in /home/ubuntu/grades/. It doesn't accept any arguments at the moment, as it infers the assignments from the contents of <classname>/release. must be run as root:

#!/usr/bin/env bash

runuser -l grader-biol3157 -c 'nbgrader export \
        --exporter=gutils.per_cell_export.PerCellExporter \
        --to=all_cell_grades_$(date -I).json \
        && chmod 644 all_cell_grades*.json'
runuser -l grader-biol3157 -c 'for a in $(ls -1 biol3157/release); \
        do nbgrader export --assignment=[\"${a}\"] --to=${a}_$(date -I).csv; \
        done && chmod 644 *.csv'
mv /home2/grader-biol3157/all_cell_grades*.json /home2/grader-biol3157/*.csv /home/ubuntu/grades/