Skip to content

Instantly share code, notes, and snippets.

@maksudr
Last active August 21, 2019 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maksudr/61cabe45df7316e7eca3c825a0cf4299 to your computer and use it in GitHub Desktop.
Save maksudr/61cabe45df7316e7eca3c825a0cf4299 to your computer and use it in GitHub Desktop.
Google Summer of Code 2019 Final Report: Moodle Attendance Plugin - Attendance password rotation/expiry

Google Summer of Code 2019 Final Report: Moodle Attendance Plugin - Attendance password rotation/expiry

Item Content
Project Moodle Attendance Plugin - Attendance password rotation/expiry
Organization Moodle
Project link https://summerofcode.withgoogle.com/projects/#6041390448902144
GitHub link https://github.com/danmarsden/moodle-mod_attendance
Mentor Dan Marsden
Student Mohammed R
Moodle Thread Link https://moodle.org/mod/forum/discuss.php?d=386077

Overview

The attendance plugin provides the ability for teachers to display a QR code to allow students to take their own attendance, the QR code was static for the current session and did not change. This project increased the security of the feature by implementing a process that frequently changes the displayed QR code and expires the old QR code, making it difficult for the QR code to be shared outside the session, whilst minimising the impact on server performance.

What work was done?

Attendance plug-in

The main portion of the project was delivered in two pull requests:

  • QR Rotation Dev [➚]
    • Made changes to the database structure to accommodate for the random password generation.
    • Wrote a function to generate the random passwords.
    • Made changes to the setting pages.
    • Added function to return passwords in JSON (for frontend).
    • Added function to check QR code and cookies password, error messages.
    • Added function that outputs JS to handle the rendering/rotation of QR.
    • Added library to render the QR code.
    • Wrote code to rotate and generate QR code.
    • Wrote code to autofill the student password for users that authenticate using the QR code.
    • Update version numbers for DB/version.php.
  • QR Rotation Dev 2 [➚]
    • Adding expiry time margin to setting and updating settings text.
    • Add rotateqrcode to class structure.
    • Add submit password text to lang.
    • Form to allow users to enter rotating passwords.
    • Display text password on password.php
    • Add timer for rotate password/qrcode on password.php

Bug fixes and improvements:

  • Issue: #349 Code: #377 - No calendar events are created after CSV import
  • Issue: #357 Code: #376- Improvement: Use QR code icon for the QR code feature instead of the key icon
  • Issue: #378 Code: #381 - Can enable QR Code without filling Student Password field
  • Issue: #379 Code: #382 - Can import sessions with 'Include QR code' enabled but no 'Allow students to record own attendance'
  • Issue: #405 Code: #417 - Carefulclickall - Drop Down

Moodle Core:

Work was also completed on the Moodle core that was outside the scope of the GSOC project. I participated in fixing the following JIRA tickets:

  • MDL-64731 [➚] - block_starredcourses and messages displays HTML character codes in the course title.
  • MDL-65189 [➚] - messages displays HTML character codes in group name
  • MDL-64869 [➚] - Lesson answer timemodified field
  • MDL-62307 [➚] - Special characters not decoded in feedback edition
  • MDL-65144 [➚] - Logo on Boost is not scaled on the login page
  • MDL-65141 [➚] - Only languages in the langmenu are being returned for site plugins (in-progress)
  • MDL-65038 [➚] - coding_exception spelled wrongly

What's left to do?

Although all main objectives/tasks assigned to me were completed. The following tasks are well suited for follow up to further improve the plug-in:

  • Improve the look and feel of the page that displays the rotating QR code/password.
  • Improve the look and feel of the manual attendance taking page.
  • Update documentation with new features.

Conclusion:

Overall, the project was a great success with the main objectives being achieved as well as numerous improvements and bug fixes to the attendance plug-in. Improving the user experience and reliability for the academic institutions using the plug-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment