Helps to unenrol from all or selective courses from CMS (Moodle).
- Clone this repo.
- Login to CMS as you normally do with google sign in. After opening the dashboard press
ctrl+shift+i
or go to dropdown menu > more tools > developers tools. - On the dev tools window choose console from the top ribbon.
- Paste the following command in the console:
document.cookie.split(";").filter(item=>item.trim().startsWith("MoodleSession"))[0].split("=")[1];
- Copy the string printed on the console without the quotes.
- Open up a terminal and navigate to project folder and type
pip install -r requirements.txt
to install all dependencies.
- On the terminal execute enroll.py file using
python enroll.py
- You will be asked to enter your erp username, password and Moodle Session cookie which we copied on our clipboard in previous steps.
- Follow the instructions, the status of enrollment will be shown on the terminal.
- On the terminal execute unenroll.py file using
python unenroll.py
- You will be asked to paste your moodle session cookie.
- Follow the instructions, you can choose to un-enroll from all or only selected courses.