From 0cbb82c2d2194171eca58e965fcd29c8b1898fda Mon Sep 17 00:00:00 2001
From: daxid <david.rouquet@tetras-libre.fr>
Date: Sun, 12 Jan 2025 13:09:32 +0100
Subject: [PATCH] add commentaireInfo to activities

---
 tetras_extraction/script/templates/activite.rq | 13 ++++++++++++-
 tetras_extraction/script/templates/quiz.rq     |  1 -
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/tetras_extraction/script/templates/activite.rq b/tetras_extraction/script/templates/activite.rq
index 5c430b7..ad2284f 100644
--- a/tetras_extraction/script/templates/activite.rq
+++ b/tetras_extraction/script/templates/activite.rq
@@ -14,7 +14,15 @@ template mt:activite(?act) {
     '+++'                                                        st:nl() st:nl()
 
     ?desc                                                                st:nl()
- 
+
+    '<div class="commentaireInfoGroup">'                                 st:nl()
+    group {
+        '<div class="commentaireInfo">'    st:nl()
+            ?info_comment
+        '</div>'                           st:nl()
+    }
+    '</div>'                                                             st:nl()
+
     # Insert a Hugo shortcode to load the quiz if this is a quiz activity
     if (exists { ?act a :Exercice }, "\n{{< quiz >}}", "")
     st:call-template(mt:quiz, ?act)
@@ -25,6 +33,9 @@ where {
     ?act :id ?id .
     ?act :titre ?title .
     ?act :description_md ?desc .
+    optional {
+        ?act :commentaireInfo_md ?info_comment .
+    }
     optional {
         # Turn the page index into a Hugo weight: increment and add a zero, to
         # leave room for adding new pages in-between later
diff --git a/tetras_extraction/script/templates/quiz.rq b/tetras_extraction/script/templates/quiz.rq
index 2fd1298..233b475 100644
--- a/tetras_extraction/script/templates/quiz.rq
+++ b/tetras_extraction/script/templates/quiz.rq
@@ -13,7 +13,6 @@ template mt:quiz(?quiz) {
             box {
                 st:call-template(mt:qcu, ?quiz)
                 st:call-template(mt:qcm, ?quiz)
-                #st:call-template(mt:json_in_ttl, ?quiz)
             }
             "}"
         }
-- 
GitLab