Automated attendance recording tool for Moodle built using Selenium.
The file individual.py contains the script for automatic attendance marking for one individual as shown in the above tutorial. All configuration is to be done within that single file.
To run the script,
- Clone the repository using the git command
git clone https://github.com/aswinmprabhu/auto-attendance.git
- Ensure that python3 and pip3 are installed
- Download and place the chromedriver file in the repository folder
- Edit the individual.py file
- Modify the
moodle_mail
andmoodle_pass
variables with your credentials - Change the chromedriver file location and name if necessary (OS dependent)
- Edit the
attendance_page_urls
variable with the URLs to all the attendance pages of your subjects
- Modify the
- Inside the repository folder, execute the following commands
pip install selenium
python3 ./individual.py
(Try using pip3 is pip command does not work)
The file attendance.py contains the script for automatic attendance recording for a group of individuals. A separate config file called config.json
needs to be created for this to work.
To run the script,
- Clone the repository using the git command
git clone https://github.com/aswinmprabhu/auto-attendance.git
- Ensure that python3 and pip3 are installed
- Download and place the chromedriver file in the repository folder
- Create a config.json file inside the repository folder. A sample file is given below.
{
"driver": "./chromedriver.exe",
"interval": 20,
"users": [
{
"name": "user1",
"email": "email1@mec.ac.in",
"password": "pass1",
"courses": [
"http://moodle.mec.ac.in/mod/attendance/view.php?id=9022",
"http://moodle.mec.ac.in/mod/attendance/view.php?id=9002",
]
},
{
"name": "user2",
"email": "email2@gmail.com",
"password": "pass2",
"courses": [
"http://moodle.mec.ac.in/mod/attendance/view.php?id=9027",
"http://moodle.mec.ac.in/mod/attendance/view.php?id=9129",
]
}
]
}
- Make the necessary edits to config.json. Change the driver location if necessary and edit the user details. You can add more users by appending to the
users
array in the config. - Inside the repository folder, execute the following commands
pip install selenium
python3 ./attendance.py --config ./config.json
Please visit MY BLOG for better understanding of this project.
(Try using pip3 is pip command does not work)