**Blackboard Gradebook Organiser** is a tool for organising a downloaded gradebook with assignment submissions from [Blackboard Learn ⧉](https://en.wikipedia.org/wiki/Blackboard_Learn).
The submission files are organised per student, by extracting the student number from the submission file names and creating a directory per student. Compressed files are extracted into the student's directory, and any remaining individually submitted files are also moved into the student's directory. Student comments from the submissions are also extracted into a single text file for convenient access and review.
Optionally, after organising a gradebook, you can inspect the submissions to detect duplicated files from different submissions/students by generating and comparing SHA256 hashes. See section [Inspect submissions](#inspect-submissions-mag) for details.
- All submission files can be found - organised in directories per student number - in directory [*BB_submissions*](BB_submissions), under the sub-directory named after the gradebook name provided when running the script
- e.g. `python organise_gradebook.py AssignmentX` creates the directory `AssignmentX` inside [*BB_submissions*](BB_submissions)
- Each student directory contains the student's extracted and individually submitted files, and the text file generated by Blackboard with the submission (which also contains any comments left by the student)
- Finds all files with a duplicated hash and outputs them to CSV file with the following information: *Student ID*, *file path*, *file name* (without path), *SHA256 hash*
For this feature you also need to install the pandas package:
```python
python -m pip install pandas
```
To inspect the submissions run:
```python
python inspect_submissions.py GRADEBOOK_DIR_NAME
```
**Note:** run ***after*** organising a gradebook with [*organise_gradebook.py*](organise_gradebook.py)
Generated CSV files can be found in directory `csv`, with the inspected submission's name as file name prefix - e.g. inspecting submissions for `AssignmentX` will create 2 CSV files:
-`AssignmentX_file_hashes_[datetime].csv` - all files and their hashes
-`AssignmentX_suspicious_[datetime].csv` - files with duplicate hashes
*(Optional)* In order to exclude files from hashing, create a CSV file in directory `csv` to provide the file names to be excluded - e.g. for `AssignmentX` create:
-`AssignmentX_excluded.csv` with a column named `exclude_filename` and list the file names
**Note:** the directory `csv` is automatically created when you run `inspect_submissions.py` - you need to create it manually if you want to exclude files before the first run.