From c7c0f2ec46a9ac0548bb19e47bc19b8b196796bc Mon Sep 17 00:00:00 2001
From: eliott <eliott.sammier@tetras-libre.fr>
Date: Fri, 28 Jun 2024 18:36:15 +0200
Subject: [PATCH] Add back quiz.json

---
 tetras_extraction/macao_12/script/templates/activite.rq | 7 +++----
 tetras_extraction/macao_12/script/templates/quiz.rq     | 2 ++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tetras_extraction/macao_12/script/templates/activite.rq b/tetras_extraction/macao_12/script/templates/activite.rq
index c104b543..28c2a1b6 100644
--- a/tetras_extraction/macao_12/script/templates/activite.rq
+++ b/tetras_extraction/macao_12/script/templates/activite.rq
@@ -20,10 +20,9 @@ template mt:activite(?act) {
 #         ?weight
 #         ?desc
 #     }
-#     # 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)
+    # 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)
 }
 where {
     ?act a :Activite .
diff --git a/tetras_extraction/macao_12/script/templates/quiz.rq b/tetras_extraction/macao_12/script/templates/quiz.rq
index 2f7a2743..7883aad5 100644
--- a/tetras_extraction/macao_12/script/templates/quiz.rq
+++ b/tetras_extraction/macao_12/script/templates/quiz.rq
@@ -4,6 +4,7 @@ PREFIX st: <http://ns.inria.fr/sparql-template/>
 
 template mt:quiz(?quiz) {
     st:nl()
+    mt:start_marker(?quiz) "/quiz.json" st:nl()
     '{'
     box {
         '"elements": ['
@@ -17,6 +18,7 @@ template mt:quiz(?quiz) {
         ']'
     }
     '}'
+    st:nl()
 }
 where {
     ?quiz a :Exercice
-- 
GitLab