forked from ZwiiCMS-Team/ZwiiCampus
1.8.00 report csv
This commit is contained in:
parent
6d7c2f725d
commit
deedb002e8
@ -423,13 +423,22 @@ class core extends common
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
// Stocke l'historique des pages vues
|
// Stocke l'historique des pages vues
|
||||||
|
/*
|
||||||
$data = is_array($this->getData(['enrolment', self::$siteContent, $this->getUser('id'), 'history', $this->getUrl(0)]))
|
$data = is_array($this->getData(['enrolment', self::$siteContent, $this->getUser('id'), 'history', $this->getUrl(0)]))
|
||||||
? array_merge([time()], $this->getData(['enrolment', self::$siteContent, $this->getUser('id'), 'history', $this->getUrl(0)]))
|
? array_merge([time()], $this->getData(['enrolment', self::$siteContent, $this->getUser('id'), 'history', $this->getUrl(0)]))
|
||||||
: [time()];
|
: [time()];
|
||||||
|
|
||||||
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'history', $this->getUrl(0), $data]);
|
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'history', $this->getUrl(0), $data]);
|
||||||
|
*/
|
||||||
// Stocke la dernière page vue et sa date de consultation
|
// Stocke la dernière page vue et sa date de consultation
|
||||||
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'lastPageView', $this->getUrl(0)]);
|
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'lastPageView', $this->getUrl(0)]);
|
||||||
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'datePageView', time()]);
|
$this->setData(['enrolment', self::$siteContent, $this->getUser('id'), 'datePageView', time()]);
|
||||||
|
|
||||||
|
// Stocke le rapport en CSV
|
||||||
|
$file = fopen(self::DATA_DIR . self::$siteContent . 'report.csv', 'a+');
|
||||||
|
fputcsv($file, [ self::$siteContent, $this->getUser('id'), $this->getUrl(0) ,time()], ';');
|
||||||
|
fclose($file);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Journalisation
|
// Journalisation
|
||||||
|
Loading…
Reference in New Issue
Block a user