update to test
This commit is contained in:
parent
44c4997436
commit
6a72676c7c
@ -44,8 +44,19 @@ if (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Stocke le rapport en CSV
|
// Stocke le rapport en CSV
|
||||||
$file = fopen(self::DATA_DIR . $courseId . '/report.csv', 'a+');
|
$file = fopen(self::DATA_DIR . $courseId . '/report.csv', 'w');
|
||||||
fputcsv($file, [$data], ';');
|
|
||||||
|
// Parcourir les données
|
||||||
|
foreach ($data as $name => $userData) {
|
||||||
|
foreach ($userData as $pageId => $timestamps) {
|
||||||
|
foreach ($timestamps as $timestamp) {
|
||||||
|
// Écrire chaque ligne dans le fichier CSV
|
||||||
|
fputcsv($file, array($name, $pageId, $timestamp), ';');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fermer le fichier
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}
|
}
|
||||||
//$this->setData(['core', 'dataVersion', 1800]);
|
//$this->setData(['core', 'dataVersion', 1800]);
|
||||||
|
Loading…
Reference in New Issue
Block a user