niranjana687 / auto-attendance

Automated attendance recording tool for Moodle built using Selenium.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto-attendance

Automated attendance recording tool for Moodle built using Selenium.

For individuals

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,

  1. Clone the repository using the git command git clone https://github.com/aswinmprabhu/auto-attendance.git
  2. Ensure that python3 and pip3 are installed
  3. Download and place the chromedriver file in the repository folder
  4. Edit the individual.py file
    • Modify the moodle_mail and moodle_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
  5. Inside the repository folder, execute the following commands
pip install selenium
python3 ./individual.py

(Try using pip3 is pip command does not work)

For groups of individuals

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,

  1. Clone the repository using the git command git clone https://github.com/aswinmprabhu/auto-attendance.git
  2. Ensure that python3 and pip3 are installed
  3. Download and place the chromedriver file in the repository folder
  4. 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",
			]
		}
	]
}
  1. 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.
  2. 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)

About

Automated attendance recording tool for Moodle built using Selenium.


Languages

Language:Python 100.0%