18
Heartbeat Monitoring for Quiz Module By Moodle Project Team @ IIT Bombay [email protected]

for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Heartbeat Monitoring for Quiz ModuleBy Moodle Project Team @ IIT Bombay

[email protected]

Page 2: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

1 | User starts quiz

4 | Quiz time extended

2 | Time lost due to network/hardware problem

3 | Create user-override

Current Scenario

Page 3: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

The Challenge

Scenario

During a quiz attempt, user encounters a problem which hampers the quiz progress.

Problem

➔ No way to automatically quantify the lost time

➔ Need to compensate for the lost time manually with the help of user overrides

Page 4: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Proposed Solution

01

02

03

04

Monitor the health of the connection

using heartbeats provided by websockets

Record the connections and

disconnections of a user attempting a

quiz

Automatically set user-overrides to extend the quiz time limit by the amount of time lost

Calculate the time lost between connections

Page 5: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Proposed technology & methodology to be used

➔ NodeJS, Express, Socket.IO for heartbeat tracking

➔ Trigger moodle to set user-overrides automatically

Page 6: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Node.js

● JavaScript runtime built on Chrome's V8 JavaScript engine

● Uses an event-driven, non-blocking I/O model that makes it lightweight and efficient

Page 7: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Socket.IO

Socket.IO is composed of two parts● A server that integrates with (or mounts on) the

Node.JS HTTP Server | socket.io● A client library that loads on the browser side

| socket.io-client

Page 8: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Express

● A minimal and flexible Node.js web application framework

● Provides a thin layer of fundamental web application features, without obscuring Node.js features

Page 9: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Implementation

Page 10: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

What is heartbeat mechanism?

Page 11: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Integration into Moodle

Plugin type Quiz access rules

Component name (Frankenstyle)

quizaccess_heartbeatmonitor

Moodle path /mod/quiz/accessrule/heartbeatmonitor

DescriptionHeartbeat monitoring module for Moodle Quiz for auto-incrementing quiz timelimit.

Moodle versions 3.3 and above

Source control URL https://github.com/IITBombayWeb/moodle-quizaccess_heartbeatmonitor

Discussion https://moodle.org/mod/forum/discuss.php?d=360672

Page 12: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Work Flow

Page 13: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Step 1 | Monitor the health of the connection using heartbeats provided by websockets

● Node.js used as a Web Server● Socket.IO used with Express for providing a

bi-directional communication channel between a client and a server

Page 14: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Step 2 | Record the connections and disconnections of a user attempting a quiz

Page 15: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Step 3 | Calculate the time lost between connections

A log is maintained by recording user life status, whether the user is live(/online) or dead(/offline).

Page 16: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

Step 4 | Automatically set user-overrides to extend the quiz time limit by the amount of time lost

Page 17: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

x1 | User starts quiz

3 | Quiz time extended automatically

2 | Time lost due to network problem

No manual intervention

Moodle Quiz in future

Page 18: for Quiz Module Heartbeat Monitoring · 2018-01-03 · The Challenge Scenario During a quiz attempt, user encounters a problem which hampers the quiz progress. Problem No way to automatically

ConclusionBy applying concept of heartbeats in moodle quiz, we will be automating the process of detection of users who encounter problems like network failure, etc. and generation of user overrides for extending their quiz time limit.

Current project status | In development