1
0
Go to file
2021-12-19 01:37:55 +02:00
.gitignore feat: create first prototype of script 2021-12-17 20:15:14 +02:00
action.yml fix: fix bug, when filename contains spaces 2021-12-19 01:37:55 +02:00
assignment-id-location.png docs: add usage guide to readme 2021-12-17 21:01:36 +02:00
main.py fix: fix bug, when filename contains spaces 2021-12-19 01:37:55 +02:00
README.md docs: add usage guide to readme 2021-12-17 21:01:36 +02:00
requirements.txt feat: create first prototype of script 2021-12-17 20:15:14 +02:00

KTU Moodle assignment upload

This will automatically open up moodle and upload/update any assignment file.

It works by using selenium to access the moodle website by emulating what a normal person would do.

Why?

So I could use this together with "KTU OOP Report Generator" and Github Actions to automatically generate a report and upload it to moodle whenever I push a commit or tag.

And also because I love automating everyday tasks.

Usage

  1. Clone repository
git clone https://github.com/RokasPuzonas/ktu-moodle-assignment-upload
  1. Setup virtualenv
python -m venv venv
  1. Active enviroment
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Determine your assignment For this script to work, it needs to know to what assignment you want to upload the file. Luckily this is super simple to do, just open up the webpage where the you can view the assignment and take a look at the url.

Where to find assignment id

  1. That's it, you're done! Now you can run the script!
./main.py <assignment-id> <filename> <upload-filename> --username <username> --password <password>

Example

./main.py 1610 report.pdf IF-1-1_Bob_Bobby.pdf --username bob --password ilovecats