Files
BBGradebookOrganiser/docs/instructions.md

92 lines
3.1 KiB
Markdown
Raw Normal View History

2023-07-17 03:17:43 +01:00
# **Instructions**
## **Script requirements**
Before running the script for the first time, install the required python packages:
2023-07-17 03:17:43 +01:00
Option 1 - install `py7z`, `rarfile`
2023-07-17 03:17:43 +01:00
2023-12-08 14:01:48 +00:00
```console
2023-07-17 03:17:43 +01:00
python -m pip install py7zr rarfile
```
Option 2 - install all packages, including `pandas` which is used in [Inspect by hash](inspect.md), using the requirements file
```console
python -m pip install -r requirements.txt
```
Note: If running on Linux/Mac, you also need to have `unrar` installed in order to be able to extract `.rar` files.
2023-07-17 03:17:43 +01:00
- `sudo apt install unrar` for Linux
- `brew install rar` for Mac
## (Optional) **Edit script defaults**
You can change the default settings by editing *utils/settings.py*. The main setting you might want to edit is `IGNORE_DIRS` - the list of names for directories, or files, to ignore when extracting from compressed files.
Ignored directories by default:
- `__MACOSX` (macOS system generated files)
- `vendor` (composer / laravel)
- `node_modules` (npm)
## **Download gradebook**
1. Go to the course page on Blackboard
2. Go to *Grade Centre -> Full Grade Centre*
3. Find the assignment and click on the arrow for more options, and select *Assignment File Download*
4. Select all (click *Show All* at the bottom first, to display all users) and click submit to generate the gradebook zip file
5. Wait for the generated download link to appear, and click to download
## **Extract gradebook**
Extract the downloaded gradebook in a new directory inside *BB_gradebooks*.
- e.g. for `AssignmentX` extract the gradebook in *BB_gradebooks*/`AssignmentX`
## **Organise gradebook**
2023-07-17 03:17:43 +01:00
To organise the gradebook run **`organise_gradebook.py`** and provide the name of the directory with the *extracted* gradebook (from section *Extract gradebook* above) as an argument.
- e.g. for gradebook `AssignmentX` (in *BB_gradebooks*/`AssignmentX`) run:
2023-12-08 14:01:48 +00:00
```console
2023-07-17 03:17:43 +01:00
python organise_gradebook.py AssignmentX
```
While running, the script displays on the terminal information and stats about the gradebook submissions and files.
## **Post-run**
2023-07-23 22:23:21 +01:00
All submission files can be found - organised in directories per student number - in directory *BB_submissions*, under the sub-directory named after the gradebook name provided when running the script.
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
- e.g. `organise_gradebook.py AssignmentX` creates the directory `AssignmentX` inside *BB_submissions*
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
Each student directory contains:
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
- the extracted files from the submitted `.zip`, `.rar`, `.7z`
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
- the individually submitted files
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
- the text file generated by Blackboard for the submission (which also contains any comments left by the student)
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
All comments found in the gradebook are extracted in a text file in *BB_submissions*, with the gradebook name as prefix.
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
- e.g. `AssignmentX_comments.txt` will be created for gradebook `AssignmentX`
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
Compressed files are deleted after successfully extracting and organising the contents.
2023-07-17 03:17:43 +01:00
2023-07-23 22:23:21 +01:00
- Any invalid/corrupt compressed files are moved into folder `__BAD__` inside the gradebook directory
2023-07-17 03:17:43 +01:00
## **Inspect by hash** :mag:
See [***Inspect by hash***](inspect.md) for more information & details.