function opigno_lrs_stats_statement_mutate_timestamp in Opigno TinCan API 7
Used to mutate statements timestamp to PHP dateTime objects
Parameters
stdClass $statements:
Return value
array Statements
1 call to opigno_lrs_stats_statement_mutate_timestamp()
- opigno_lrs_stats_query in modules/
opigno_tincan_api_stats/ includes/ model/ adapter.inc - Query Learning Record Store server using mongodb aggregate structure
File
- modules/
opigno_tincan_api_stats/ includes/ model/ adapter.inc, line 99 - Implements functions to query statements stored on Learning Record Store server
Code
function opigno_lrs_stats_statement_mutate_timestamp($statements) {
foreach ($statements as $statement) {
$statement->timestamp = new DateTime($statement->timestamp);
}
return $statements;
}