Change to usergetdate function requires change to Attendance Module

Change to usergetdate function requires change to Attendance Module

by Richard Webb -
Number of replies: 0
In response to discussion about the attendance mod (http://moodle.org/mod/forum/discuss.php?d=133026) a MoodleTracker bug report was initiated (http://tracker.moodle.org/browse/CONTRIB-1559). The fix is to make Moodle's usergetdate function (in lib/moodlelib.php) return the same parameter order as php's getdate function. This will require a change to the attendance module. Specifically, the report module will need to be modified to work with the changed usergetdate function. The suggestion from the bug report is to "access the array using keys like this...

$thisdate = usergetdate(time());
echo($thisdate['mon']);

Accessing usergetdate in this manner will work with any argument return order and thus work if people have the "old" version or new version of moodlelib.php.

Richard
Average of ratings: -