Compare commits

..

2 Commits

Author SHA1 Message Date
196e215133 extra check for comment existence 2023-12-08 14:02:44 +00:00
f011cdcda0 docs edits 2023-12-08 14:01:48 +00:00
3 changed files with 9 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ With **Inspect by hash** you can inspect the submissions for identical files (by
Before running the *inspect* scripts for the first time, you also need to install the *pandas* package:
```python
```console
python -m pip install pandas
```
@@ -44,7 +44,7 @@ If you haven't already, extract the downloaded from *Blackboard* gradebook in a
To inspect a *gradeboook* run **`inspect_gradebook.py`** and provide the name of the gradebook directory as an argument, e.g. for the gradebook `AssignmentX` run:
```python
```console
python inspect_gradebook.py AssignmentX
```
@@ -62,7 +62,7 @@ To inspect *submissions* run **`inspect_submissions.py`** and provide the name o
- e.g. for the organised gradebook `AssignmentX` (in *BB_submissions*/`AssignmentX`) run:
```python
```console
python inspect_submissions.py AssignmentX
```

View File

@@ -22,7 +22,7 @@ Extract the downloaded gradebook in a new directory inside *BB_gradebooks*.
Before running the script for the first time, install the required packages (*py7z*, *rarfile*):
```python
```console
python -m pip install py7zr rarfile
```
@@ -37,7 +37,7 @@ To organise the gradebook run **`organise_gradebook.py`** and provide the name o
- e.g. for gradebook `AssignmentX` (in *BB_gradebooks*/`AssignmentX`) run:
```python
```console
python organise_gradebook.py AssignmentX
```

View File

@@ -25,9 +25,10 @@ def get_comment_from_submission_txt(file_path: str) -> str | None:
if not no_comment_regex_compile.findall(file_contents):
regular_expression = f'Comments:\n.*'
regex_compile = re.compile(regular_expression)
match = regex_compile.findall(file_contents)[0]
comment = match.split('\n')[1]
return comment
if regex_compile.findall(file_contents):
match = regex_compile.findall(file_contents)[0]
comment = match.split('\n')[1]
return comment
return None