Description
We have been working to debug this issue on our moodle site, during which we have observed the following:
The timestamp is being turned into a filename in a function called report_customsql_temp_cvs_name in locallib.php, which is called from both the view.php and download.php files.
view.php is the report view, where you have the option to download the various types of reports.
download.php is the PHP script that is supposed to return the file or display the error message.
The timestamp is the exact same when the function is called from view.php and download.php, but the filename that is created based on the timestamp is 5 hours different in the view.php instance than the download.php instance, even though it is the same function.
The .CSV file download function fails because of the difference in the timestamp.
We found the ultimate issue: Logstore xAPI. This plugin is autoloading a file that sets the timezone to 'Europe/London'. It is NOT EVEN ENABLED in the our Moodle site, as shown in the screenshot below from Site administration > Plugins > Logging > Manage log stores, but because of the way that Moodle builds the admin menu, the plugin's settings are getting loaded automatically.
Version
Plugin 2018082100 on Moodle 3.5.14 (Build: 20200914)
Run the report -- the results should be displayed on the screen
At the bottom of the report page at the Download these results as : drop-down, select Comma separated values (.csv). then click the download button.
Expected behaviour
a .csv file should be generated / downloaded to the user's computer
Actual behaviour
Error -- unknown file type is generated
Server information
MySQL 5.7.31
Client information
OS: Ubuntu 16.04 Server LTS
Browser: all current browser versions (Edge, Chrome, Firefox, Safari)
Additional information
Worked with Tim Hunt -- the owner of the Ad-hoc database queries plugin to troubleshoot the issue on the assumption the problem was with his plugin. Analysis of error logs showed that it was the result of conflicting timezones.
Discovered logstore_xAPI asserted a conflicting timezone -- EVEN when the plugin was disabled.
When we uninstalled your plugin, normal function was restored to the Ad-hoc database queries plugin.
We would like to see the issue fixed, so we could use the xAPI logstore
Description We have been working to debug this issue on our moodle site, during which we have observed the following:
The timestamp is being turned into a filename in a function called report_customsql_temp_cvs_name in locallib.php, which is called from both the view.php and download.php files.
view.php is the report view, where you have the option to download the various types of reports. download.php is the PHP script that is supposed to return the file or display the error message.
The timestamp is the exact same when the function is called from view.php and download.php, but the filename that is created based on the timestamp is 5 hours different in the view.php instance than the download.php instance, even though it is the same function.
The .CSV file download function fails because of the difference in the timestamp.
We found the ultimate issue: Logstore xAPI. This plugin is autoloading a file that sets the timezone to 'Europe/London'. It is NOT EVEN ENABLED in the our Moodle site, as shown in the screenshot below from Site administration > Plugins > Logging > Manage log stores, but because of the way that Moodle builds the admin menu, the plugin's settings are getting loaded automatically.
Version Plugin 2018082100 on Moodle 3.5.14 (Build: 20200914)
Steps to reproduce the bug
Expected behaviour
Actual behaviour Error -- unknown file type is generated
Server information MySQL 5.7.31
Client information
Additional information Worked with Tim Hunt -- the owner of the Ad-hoc database queries plugin to troubleshoot the issue on the assumption the problem was with his plugin. Analysis of error logs showed that it was the result of conflicting timezones.
Discovered logstore_xAPI asserted a conflicting timezone -- EVEN when the plugin was disabled.
When we uninstalled your plugin, normal function was restored to the Ad-hoc database queries plugin.
We would like to see the issue fixed, so we could use the xAPI logstore