Git Product home page Git Product logo

auto-attendance's Introduction

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": "[email protected]",
			"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": "[email protected]",
			"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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.