forked from cjvanlissa/TCSM
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding/modifying scripts to process A3 grading allocation
- Loading branch information
Showing
2 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
### Title: Divide TCSM Grading | ||
### Author: Kyle M. Lang | ||
### Created: 2024-11-04 | ||
### Modified: 2024-11-04 | ||
|
||
### Description: | ||
# This script should divide the grading load among the teachers as defined in the | ||
# JSON file specified in the first argument. | ||
|
||
### Usage: | ||
# ./divide_grading.sh ASSIGNMENT_ALLOCATION.json SUBMISSION_DIRECTORY | ||
|
||
SUB_DIR=`echo $2 | sed -e 's/\\///'` | ||
|
||
for TEACHER in `jq -r 'keys.[]' $1`; do | ||
echo "Processing $TEACHER's assignment." | ||
|
||
if [ ! -d $TEACHER ]; then | ||
mkdir $TEACHER | ||
fi | ||
|
||
for ID in `jq -r .$TEACHER.[] $1`; do | ||
if [ -d $SUB_DIR/$ID ]; then | ||
cp -r $SUB_DIR/$ID $TEACHER/$ID | ||
fi | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters