From 0823ede7a58b18a4994e1fc1dc349ecf8ba26324 Mon Sep 17 00:00:00 2001
From: Myriam Delaruelle <delaruel1@univ-lorraine.fr>
Date: Mon, 15 Jan 2024 10:29:29 +0100
Subject: [PATCH] =?UTF-8?q?Fix=20date=20de=20s=C3=A9ance=20r=C3=A9initiali?=
 =?UTF-8?q?s=C3=A9e=20quand=20on=20cache/montre=20une=20section=20depuis?=
 =?UTF-8?q?=20la=20page=20d'accueil=20du=20cours?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib.php    | 5 ++---
 styles.css | 5 ++++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib.php b/lib.php
index ad4fcd6..64a7111 100644
--- a/lib.php
+++ b/lib.php
@@ -131,7 +131,6 @@ class format_iena extends format_topics {
         global $PAGE;
 
         $elements = parent::create_edit_form_elements($mform, $forsection);
-
         if ($forsection) {
             $mform->removeElement('presence', false);
             $mform->removeElement('daterendu', false);
@@ -258,13 +257,13 @@ class format_iena extends format_topics {
      */
     public function update_section_format_options($data) {
         global $DB;
-
+        
         $objectsection = new stdClass();
         $objectsection->id = $data["id"];
         $sectionconfig = $this->get_format_options($objectsection);
 
         // If a date was set but we want to remove it.
-        if (!isset($data['daterenducheck']) && !isset($data['daterenducheck2'])) {
+        if ((!isset($data['daterenducheck']) && !isset($data['daterenducheck2'])) && (isset($data['daterendu']))) {
             if (array_key_exists('daterendu', $sectionconfig) && !empty($sectionconfig['daterendu'])) {
                 $data['daterendu'] = null;
             } else {
diff --git a/styles.css b/styles.css
index 5d146f5..bd7c624 100644
--- a/styles.css
+++ b/styles.css
@@ -1,4 +1,4 @@
-
+/*style 4*/
 /* injecter ça dans le renderer au lieu de le faire ici 
 afin que ça n'impacte pas le reste de la plateforme */
 
@@ -956,6 +956,7 @@ tbody th{
 	font-family: FontAwesome; width: 100%; display: inline-block;text-align: center; 
 	color: white;
 	font-size: large;
+	font-weight: 900;
 }
 
 .iena-icon-distance::after{
@@ -963,6 +964,8 @@ tbody th{
 	font-family: FontAwesome; width: 100%; display: inline-block;text-align: center; 
 	color: white;
 	font-size: large;
+	font-weight: 950;
+
 }
 
 .iena-caption-sections > .iena-caption-icons, .iena-caption-sections > .iena-caption-icons > * {
-- 
GitLab