forked from ZwiiCMS-Team/ZwiiCampus
1.5.02
- graph page name - graph time - graph shit first time range
This commit is contained in:
parent
6d77995439
commit
9bf135337e
@ -1,4 +1,4 @@
|
||||
# ZwiiCampus 1.5.01
|
||||
# ZwiiCampus 1.5.02
|
||||
|
||||
ZwiiCampus (Learning Management System) est logiciel auteur destiné à mettre en ligne des tutoriels. Il dispose de plusieurs modalités d'ouverture et d'accès des contenus. Basé sur la version 13 du CMS Zwii, la structure logicielle est solide, le framework de Zwii est éprouvé.
|
||||
|
||||
|
@ -51,7 +51,7 @@ class common
|
||||
const ACCESS_TIMER = 1800;
|
||||
|
||||
// Numéro de version
|
||||
const ZWII_VERSION = '1.5.01';
|
||||
const ZWII_VERSION = '1.5.02';
|
||||
|
||||
// URL autoupdate
|
||||
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';
|
||||
|
@ -1212,6 +1212,7 @@ class course extends common
|
||||
self::$userGraph[] = [
|
||||
helper::dateUTF8('%Y-%m-%d %H:%M:%S', $time),
|
||||
$diff,
|
||||
html_entity_decode($pages[$pageId]['title']) . ' ('. helper::dateUTF8('%M\'%S"', $diff) . ')'
|
||||
];
|
||||
}
|
||||
$lastView = $time;
|
||||
@ -1224,6 +1225,10 @@ class course extends common
|
||||
for ($i = 0; $i < count(self::$userHistory) - 1; $i++) {
|
||||
self::$userHistory[$i][2] = self::$userHistory[$i + 1][2];
|
||||
}
|
||||
// Décale les temps de consultation
|
||||
for ($i = 0; $i < count(self::$userGraph) - 1; $i++) {
|
||||
self::$userHistory[$i][1] = self::$userHistory[$i + 1][1];
|
||||
}
|
||||
|
||||
// Formate le timestamp
|
||||
array_walk(self::$userHistory, function (&$item) {
|
||||
|
@ -15,10 +15,12 @@ $(document).ready((function () {
|
||||
|
||||
var dataX = <?php echo json_encode(array_map(function ($item) { return $item[0]; }, $module::$userGraph)); ?>;
|
||||
var dataY = <?php echo json_encode(array_map(function ($item) { return $item[1];}, $module::$userGraph)); ?>;
|
||||
var dataText = <?php echo json_encode(array_map(function ($item) { return $item[2];}, $module::$userGraph)); ?>;
|
||||
|
||||
var data = [{
|
||||
x: dataX,
|
||||
y: dataY,
|
||||
text: dataText,
|
||||
mode: 'markers', // Mode de tracé des points
|
||||
type: 'scatter' // Type de graphe
|
||||
}];
|
||||
|
Loading…
Reference in New Issue
Block a user