ilias2nbgrader
Exchange between Ilias and Nbgrader
Installation
Install via:
pip install ilias2nbgrader
What does this tool do?
This tool provides functionality to import submissions from ILIAS to Nbgrader and to extract feedback from Nbgrader to ILIAS. This tool needs the following feature (available from ILIAS version 4.4):
https://docu.ilias.de/goto.php?target=wiki_1357_Upload_all_Feedback-Files_as_one_zip-archive
How does it work?
Importing submissions from ILIAS
You download a multiple submission archive (zip) and import it to Nbgrader via the SubmissionConverter.
Example usage:
Suppose you have your Nbgrader course directory under test_course with the assignment assignment_1:
test_course
├── source
│ └── assignment_1
│ ├── ps1.ipynb
│ └── data
│ └── dataset.csv
└── submitted
To import the multi-submission archive (e.g. submission_assignment1.zip) from ILIAS, you download it and execute the SubmissionConverter the following way:
from ilias2nbgrader import SubmissionConverter
converter = SubmissionConverter()
resources = {
'course_dir': 'test_course', # The path to the root dir of the course
'assignment': 'assignment_1', # The name of the assignment
'submission_zip': 'submission_assignment1.zip', # The path to the submission zip
'path': 'tmp' # The path to the temporary folder used for extracting
}
converter.convert(resources)
The converter will now go through the following stages:
- ExtractAssignmentInfo - This will get the names of the notebooks and files in the assignment
- Extract - Extract the submission zip to the temporary folder
- CreateFolderStructure - Move single submissions to a subfolder named like the assignment
- RenameNotebooks - Look for Jupyter notebooks in the submission and rename them if they aren't named correctly
- AddExtraFiles - Copy additional files from the source assignment to the submissions (e.g. dataset.csv)
- RestructureSubmission - Look into the code cells of the submitted notebooks and check under which relative path files are imported, move them to the corresponding relative paths
- MoveToSubmitted - Move all submissions to the submitted folder of the course directory
- DeleteTempFolders - Delete all temporary folders
After importing submissions to Nbgrader you will find a file converter.log that has information about the changes applied to the submission.
An example would be:
# File converter.log
[Create Folder Structure INFO] Moved submission to subfolder assignment_1
[Rename Notebooks INFO] Student_xyz: Rename ps1_1.ipynb to ps1.ipynb
[Add Extra Files INFO] Copied dataset.csv to data/dataset.csv
[Restructure Submission INFO] Moved data/dataset.csv to dataset.csv
In this example the student Student_xyz submitted an incorrectly named notebook (ps_1.ipynb) that got renamed. The additional file dataset.csv from the source assignment was copied over. Finally the notebook was analyzed to find out that the student loaded the dataset from the base folder instead of the subfolder data, so the file dataset.csv was moved to the basefolder.
Exporting feedback files to ILIAS
To export feedback back to ILIAS, you need to download the empty multi_feedback archive from ILIAS.
Then feedback can be exported the following way:
from ilias2nbgrader import FeedbackConverter
converter = FeedbackConverter()
resources = {
'course_dir': 'test_course', # The path to the root dir of the course
'assignment': 'assignment_1', # The name of the assignment
'feedback_zip': 'multi_feedback_assignment1.zip', # The path to the empty feedback zip
'path': 'tmp_feedback' # The path to the temporary folder used for extracting
}
converter.convert(resources)
Then you will find a feedback archive in the folder under path with the feedback in it. This archive can then be uploaded back to ILIAS to distribute the feedback for all students.
The feedback converter will go through the following stages:
- ExtractAssignmentInfo - This will get the names of the notebooks to find the corresponding feedback html files
- ExtractFeedback - Extract the empty feedback zip from ILIAS
- CopyFeedback - Copy over the html feedback files from Nbgrader
- ZipFeedback - Create the feedback archive to upload to ILIAS
- DeleteTempFolders - Delete all temporary folders
Creating custom converters
In some cases you might want to disable some preprocessing steps or create your own custom pipeline for converting. This can be done the following way:
from ilias2nbgrader.converters import Converter
from ilias2nbgrader.preprocessors import ExtractAssignmentInfo, Extract, \
CreateFolderStructure, MoveToSubmitted, DeleteTempFolders
myconverter = Converter()
myconverter.preprocessors = [ExtractAssignmentInfo, Extract, CreateFolderStructure, \
MoveToSubmitted, DeleteTempFolders]
myconverter.init_preprocessors()
resources = ...
myconverter.convert(resources)
Metadata
Release files for ilias2nbgrader 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ilias2nbgrader-0.4.3.tar.gz | 15.2 kB | Without provenance | Details for ilias2nbgrader-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ilias2nbgrader-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for ilias2nbgrader-0.4.3-py3-none-any.whl |
Total release size: 46.7 kB
Release files / ilias2nbgrader-0.4.3.tar.gz
| Download URL | ilias2nbgrader-0.4.3.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7dfc634d22ad55b9ddc1f00b9786b43c8a4981017d561ee46225d27e989c459
|
|
BLAKE2b-256 checksum How to use checksums |
f45794414b56fa5c1c9f9f5c4291030aa236feb1f323dc726e18d88518a09f53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / ilias2nbgrader-0.4.3-py3-none-any.whl
| Download URL | ilias2nbgrader-0.4.3-py3-none-any.whl |
|---|---|
| Size | 31.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce355e33232954a07c55294efb492b08dab4e0d3a5046a6293a935413e766390
|
|
BLAKE2b-256 checksum How to use checksums |
6f9aa6f62c9da3684a6d74952528ae6cfec8f3f3e0ca913aa9b8567b89c65164
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for ilias2nbgrader 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.