This is a nifty project that simplifies the attendance process in ROLE/MOODLE. It enabled me to swiftly record my attendance within the 5-minute window available after my online Microsoft Teams class.
steps:
- Create "ROLE_USERNAME" and "ROLE_PASSWORD" environment variables in environment variables with their values as your moodle/ROLE username and password respectively. -> https://www.youtube.com/watch?v=Frrlv_5rGhY
- Restart Your Computer.
- install python -> https://www.youtube.com/watch?v=UvcQlPZ8ecA
- create virtual environment -> https://www.youtube.com/watch?v=APOPm01BVrk
- install requirements using this command "pip install -r requirements.txt" in terminal.
- run "python ROLE.py" in your terminal in morning before 10:00AM and don't close it. Leave the terminal running and after 5:00PM you can close it.
- Repeat step 5 every day and always remember that this script will check for attendance events in ROLE between 10:00AM - 5:00PM, not outside these hours.
- if facing any error regarding chromedriver then install according to your chrome version. -> https://chromedriver.chromium.org/downloads
- If you want to remove the hassle of running this script daily then you can schedule this script with windows task schedular(windows) or crontab(linux).