Hipjea / moodle-tool_time_report

Admin tool for Moodle creating a report of time spent online

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moodle-tool_time_report

Admin tool for Moodle creating reports of time spent online.

Installation

  1. Git clone the plugin in the admin/tool directory.
  2. Rename the plugin folder as time_report
  3. Finish the installation

Usage

Admins can access the reports through the user's profile (e.g. /user/profile.php?id=2), under the reports category.

The interface allow the creationg of CSV files listing

The plugin uses a cron task job to generate the reports. It is not needed to stay on the page while the report is generating.

A notification is sent to the requestor when the report is ready to be downloaded.

The name of the files are created according the following scheme : report__firstname_lastname__mm-yyyy_mm-yyyy.csv

mm-yyyy_mm-yyyy being the selected starting date followed by the ending date.

UI overview :

"Time report"

    Starting date  [mmyyyy] #-> datepicker
    Ending date    [mmyyyy] #-> datepicker

    ["Create"] #-> triggers the generate_report amd script

"Generated reports list"

    report__jean_dupont__03-2022_05-2022.csv #-> downloadable file
    report__jean_dupont__02-2021_05-2022.csv #-> downloadable file
    report__jean_dupont__01-2022_05-2022.csv #-> downloadable file

["Remove files"] #-> purges the report files of the current user

Example of CSV report :

| Name                          | Dupont                 |
| First name                    | Jean                   |
| Email address                 | jd@example.com         |
| Period                        | 01/2022 - 05/2022      |
| Total duration for the period | 00:44:18               |
| Date                          | Total duration per day |
| 02/02/2022                    | 00:25:38               |
| 03/02/2022                    | 00:15:00               |
| 16/05/2022                    | 00:03:40               |

Settings

Go to Site Administration -> Reports -> Time Reports. Descriptions for the settings are as follows :

tool_time_report/targets

Defines the targets from the logstore_standard_log table that are wanted in the report. All the different kind of targets are retrived by the locallib get_targets function.

tool_time_report/idletime

Defines the time span after which the difference in time between 2 logs is considered as inactivity.

tool_time_report/borrowedtime

Defines the amount of time counted in the report that the user has after being considered inactive.

Without this, the last action of viewing a course module performed by a user (e.g. a PDF file) before his inactivity would not generate additional connection time for one day. For the benefit of the doubt, we grant a specific amount of time.

Development

amd/build/*.js and styles.css files are generated by Grunt tasks.

Run grunt watch, grunt amd or grunt sass from the root directory of Moodle to modify the files.

About

Admin tool for Moodle creating a report of time spent online


Languages

Language:PHP 70.1%Language:JavaScript 14.9%Language:SCSS 5.6%Language:CSS 5.0%Language:Mustache 4.4%