Admin tool for Moodle creating reports of time spent online.
- Git clone the plugin in the
admin/tool
directory. - Rename the plugin folder as
time_report
- Finish the installation
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.
"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
| 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 |
Go to Site Administration -> Reports -> Time Reports. Descriptions for the settings are as follows :
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.
Defines the time span after which the difference in time between 2 logs is considered as inactivity.
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.
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.