Closed GabGuev closed 1 year ago
Hello, In the database the completiontime empty is at 0, the code considers it like a timestamp so when it formats it, it gives 1/01/1970
It this line that poses a problem: https://github.com/catalyst/moodle-mod_reengagement/blob/34355e5235688ca839ec907abf0d540994cf74a1/classes/table/reengagement_participants.php#L423
I propose this correction : return $data->completiontime ? userdate($data->completiontime, get_string('strftimedatetimeshort', 'langconfig')) : '-';
return $data->completiontime ? userdate($data->completiontime, get_string('strftimedatetimeshort', 'langconfig')) : '-';
For have that instead:
Thanks 😃
thanks for the report, feel free to submit a pull request with that change otherwise it may sit here for a while.
thanks for the PR! - flagging this as closed.
Thanks @danmarsden! I'm glad to have contributed :)
Hello, In the database the completiontime empty is at 0, the code considers it like a timestamp so when it formats it, it gives 1/01/1970
It this line that poses a problem: https://github.com/catalyst/moodle-mod_reengagement/blob/34355e5235688ca839ec907abf0d540994cf74a1/classes/table/reengagement_participants.php#L423
I propose this correction :
return $data->completiontime ? userdate($data->completiontime, get_string('strftimedatetimeshort', 'langconfig')) : '-';
For have that instead:![image](https://user-images.githubusercontent.com/107034648/193246272-bc84a485-26ae-4990-be9d-b0d64b73b6d8.png)
Thanks 😃