2024-01-14 19:30:14 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col1">
|
|
|
|
<?php echo template::button('courseManageBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl() . 'course',
|
|
|
|
'value' => template::ico('left')
|
|
|
|
]); ?>
|
|
|
|
</div>
|
2024-01-14 20:56:23 +01:00
|
|
|
</div>
|
2024-02-12 13:14:02 +01:00
|
|
|
<div class="row textAlignCenter">
|
2024-02-15 16:28:07 +01:00
|
|
|
<?php if ($this->getUser('permission', 'course', 'delete') === true): ?>
|
|
|
|
<div class="col2 ">
|
2024-02-12 13:14:02 +01:00
|
|
|
<?php echo template::button('courseManageDelete' . $this->getUrl(2), [
|
2024-01-14 19:30:14 +01:00
|
|
|
'class' => 'courseDelete buttonRed',
|
|
|
|
'href' => helper::baseUrl() . 'course/delete/' . $this->getUrl(2),
|
2024-01-14 20:56:23 +01:00
|
|
|
'value' => 'Supprimer',
|
|
|
|
'ico' => 'trash'
|
2024-01-14 19:30:14 +01:00
|
|
|
]); ?>
|
2024-02-12 13:14:02 +01:00
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
2024-02-15 16:28:07 +01:00
|
|
|
<?php if ($this->getUser('permission', 'course', 'backup') === true): ?>
|
|
|
|
<div class="col2">
|
|
|
|
<?php echo template::button('courseManageDownload' . $this->getUrl(2), [
|
|
|
|
'href' => helper::baseUrl() . 'course/backup/' . $this->getUrl(2),
|
|
|
|
'value' => 'Sauvegarder',
|
|
|
|
'ico' => 'download-cloud'
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->getUser('permission', 'course', 'clone') === true): ?>
|
|
|
|
<div class="col2">
|
|
|
|
<?php echo template::button('courseManageDuplicate' . $this->getUrl(2), [
|
|
|
|
'href' => helper::baseUrl() . 'course/clone/' . $this->getUrl(2),
|
|
|
|
'value' => 'Cloner',
|
|
|
|
'ico' => 'clone'
|
|
|
|
]); ?>
|
|
|
|
</div>
|
2024-02-13 18:05:08 +01:00
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($this->getUser('permission', 'course', 'edit') === true): ?>
|
2024-02-15 16:28:07 +01:00
|
|
|
<div class="col2">
|
|
|
|
|
|
|
|
<?php echo template::button('courseManageEdit' . $this->getUrl(2), [
|
|
|
|
'href' => helper::baseUrl() . 'course/edit/' . $this->getUrl(2),
|
|
|
|
'value' => 'Éditer',
|
|
|
|
'ico' => 'pencil'
|
|
|
|
]); ?>
|
|
|
|
</div>
|
2024-02-13 18:05:08 +01:00
|
|
|
<?php endif; ?>
|
2024-02-15 16:28:07 +01:00
|
|
|
<?php if ($this->getUser('permission', 'course', 'users') === true): ?>
|
|
|
|
<div class="col2">
|
|
|
|
|
|
|
|
<?php echo template::button('categoryUser' . $this->getUrl(2), [
|
|
|
|
'href' => helper::baseUrl() . 'course/users/' . $this->getUrl(2),
|
|
|
|
'value' => 'Participants',
|
|
|
|
'ico' => 'users'
|
|
|
|
]); ?>
|
|
|
|
|
|
|
|
</div>
|
2024-02-13 18:05:08 +01:00
|
|
|
<?php endif; ?>
|
2024-03-12 11:49:47 +01:00
|
|
|
</div>
|
2024-04-10 18:58:04 +02:00
|
|
|
|
|
|
|
<?php
|
|
|
|
// Remplacez 'chemin/vers/votre/fichier.csv' par le chemin réel de votre fichier CSV
|
|
|
|
$file = fopen('site\data\654b7816dc22a\report.csv', "r");
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
|
|
|
|
// Lire ligne par ligne
|
|
|
|
while (($line = fgetcsv($file, 1000, ";")) !== false) {
|
|
|
|
$name = $line[0];
|
|
|
|
$pageId = $line[1];
|
|
|
|
$timestamp = $line[2];
|
|
|
|
|
|
|
|
// Initialiser le tableau si nécessaire
|
|
|
|
if (!isset($data[$name][$pageId])) {
|
|
|
|
$data[$name][$pageId] = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Ajouter le timestamp
|
|
|
|
$data[$name][$pageId][] = $timestamp;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Fermer le fichier
|
|
|
|
fclose($file);
|
|
|
|
|
|
|
|
// Trier les timestamps
|
|
|
|
foreach ($data as &$userData) {
|
|
|
|
foreach ($userData as &$pageData) {
|
|
|
|
sort($pageData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Convertir en JSON
|
|
|
|
$json = json_encode($data, JSON_PRETTY_PRINT);
|
|
|
|
|
|
|
|
// Afficher le JSON;
|
|
|
|
echo "<pre>";
|
|
|
|
var_dump ($json);
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
// Affichez le tableau pour vérifier
|
|
|
|
echo '<pre>';
|
|
|
|
print_r($tableauAssociatif);
|
|
|
|
echo '</pre>';
|
|
|
|
?>
|
|
|
|
|
2024-03-12 11:49:47 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col12">
|
|
|
|
<div class="block">
|
|
|
|
<h4>
|
|
|
|
<?php echo helper::translate('Paramètres'); ?>
|
|
|
|
</h4>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col7">
|
|
|
|
<?php echo template::text('courseManageShortTitle', [
|
|
|
|
'label' => 'Titre',
|
|
|
|
'value' => $this->getdata(['course', $this->getUrl(2), 'title']),
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
2024-01-14 19:30:14 +01:00
|
|
|
</div>
|
2024-03-12 11:49:47 +01:00
|
|
|
<div class="col5">
|
|
|
|
<?php echo template::text('courseManageAuthor', [
|
2024-03-12 11:53:07 +01:00
|
|
|
'label' => 'Auteur',
|
2024-03-12 11:49:47 +01:00
|
|
|
'value' => $this->signature($this->getdata(['course', $this->getUrl(2), 'author'])),
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
2024-01-14 19:30:14 +01:00
|
|
|
</div>
|
2024-03-12 11:49:47 +01:00
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('courseManageHomePageId', [
|
|
|
|
'label' => 'Page d\'accueil',
|
|
|
|
'value' => $module::$pagesList[$this->getdata(['course', $this->getUrl(2), 'homePageId'])]['shortTitle'],
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
2024-02-13 18:05:08 +01:00
|
|
|
</div>
|
2024-03-12 11:49:47 +01:00
|
|
|
<div class="col6">
|
|
|
|
<?php echo template::text('courseManageCategorie', [
|
|
|
|
'label' => 'Catégorie',
|
|
|
|
'value' => $module::$courseCategories[$this->getdata(['course', $this->getUrl(2), 'category'])],
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col12">
|
|
|
|
<?php echo template::textarea('courseManageDescription', [
|
|
|
|
'label' => 'Description',
|
|
|
|
'value' => $this->getdata(['course', $this->getUrl(2), 'description']),
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::text('courseManageAccess', [
|
|
|
|
'label' => 'Disponibilité',
|
|
|
|
'value' => $module::$courseAccess[$this->getdata(['course', $this->getUrl(2), 'access'])],
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
2024-01-14 19:30:14 +01:00
|
|
|
</div>
|
2024-03-12 11:49:47 +01:00
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::date('courseOpeningDate', [
|
|
|
|
'type' => 'datetime-local',
|
|
|
|
'label' => 'Ouverture',
|
|
|
|
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'openingDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'openingDate']) / 60) * 60,
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
2024-01-14 19:30:14 +01:00
|
|
|
</div>
|
2024-03-12 11:49:47 +01:00
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::date('courseClosingDate', [
|
|
|
|
'type' => 'datetime-local',
|
|
|
|
'label' => 'Fermeture',
|
|
|
|
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'closingDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'closingDate']) / 60) * 60,
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
2024-01-14 19:30:14 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-12 11:49:47 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::text('courseManageEnrolment', [
|
|
|
|
'label' => 'Participation',
|
|
|
|
'value' => $module::$courseEnrolment[$this->getdata(['course', $this->getUrl(2), 'enrolment'])],
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::text('courseManageEnrolmentKey', [
|
|
|
|
'label' => 'Clé',
|
|
|
|
'value' => $this->getdata(['course', $this->getUrl(2), 'enrolmentKey']),
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::checkbox('courseManageEnrolmentLimit', true, 'Date de fin d\'inscription', [
|
|
|
|
'checked' => $this->getdata(['course', $this->getUrl(2), 'limitEnrolment']),
|
|
|
|
'help' => 'Ne s\'applique pas à l\'inscription anonyme',
|
|
|
|
'disabled' => true,
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::date('courseManageEnrolmentLimitDate', [
|
|
|
|
'type' => 'datetime-local',
|
|
|
|
'label' => 'Fermeture',
|
|
|
|
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate']) / 60) * 60,
|
|
|
|
'readonly' => true,
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|