-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.2
-
MOODLE_401_STABLE
-
MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-78023-401 -
When using the tool_policy plugin, user lists cannot be downloaded when using some type of policies.
Steps to recreate:
- Site administration -> Privacy and policies/Policy Settings: sitepolicyhandler: choose "Policies (tool_policy)"
- Site administration -> Privacy and policies/Manage Policies: New policy
Type: Other Policy
User consent: All users
Show policy before showing other policies : No
Agreement optional: yes - Agree to the policy with a few test accounts.
- As Admin: Site administration -> Privacy and policies/User agreements:
As filter select the new policy and "Agreed"
Click "Download"
A new empty browser tab should open. File is not downloaded.
tool_policy gives a string with unixtime digits to strftime() in date.php:719 but strftime() needs the string with a preceding "@".
When when opening dev console in your browser, youn have to open the response to get the error message:
Fehler: $timestamp argument is neither a valid UNIX timestamp, a valid date-time string or a DateTime object.
Weitere Informationen über diesen Fehler
Debug-Info:
Error code: generalexceptionmessage
Stack trace:
line 725 of /lib/classes/date.php: InvalidArgumentException thrown
line 2379 of /lib/moodlelib.php: call to core_date::strftime()
line 576 of /admin/tool/policy/classes/acceptances_table.php: call to date_format_string()
line 832 of /lib/tablelib.php: call to tool_policy\acceptances_table->col_timemodified()
line 485 of /admin/tool/policy/classes/acceptances_table.php: call to flexible_table->format_row()
line 2022 of /lib/tablelib.php: call to tool_policy\acceptances_table->format_row()
line 2146 of /lib/tablelib.php: call to table_sql->build_table()
line 240 of /admin/tool/policy/classes/acceptances_table.php: call to table_sql->out()
line 49 of /admin/tool/policy/acceptances.php: call to tool_policy\acceptances_table->download()