Skip to content
Snippets Groups Projects
Commit 6374f029 authored by David Rouquet's avatar David Rouquet
Browse files

qcm support

parent 6c2966c3
No related branches found
No related tags found
1 merge request!4Main
PREFIX : <http://www.semanticweb.org/eliott/ontologies/2024/4/macao/>
PREFIX mt: <http://www.semanticweb.org/eliott/ontologies/2024/4/macao/template/>
PREFIX st: <http://ns.inria.fr/sparql-template/>
# Template for the JSON definition of QCM activities
template mt:qcm(?qcm) {
'"name": "quizQuestion"' mt:sep()
'"type": "checkbox"' mt:sep()
'"name": "' ?id '"' mt:sep()
'"choices": ['
box {
group {
"{"
'"value": "' ?reponseId '"' mt:sep()
'"text": "' mt:json_escape(REPLACE(?reponse_md, "•", "")) '"'
if (CONTAINS(?reponse_md,"•"), '', mt:sep())
if (CONTAINS(?reponse_md,"•"), '', '"enableIf": "false"')
"}"
; separator=mt:sep()
}
}
']'
}
WHERE {
?qcm a :ExerciceQC_QCM ;
:id ?id .
?qcm :aReponse ?reponse .
?reponse :html_md ?reponse_md ;
:html ?reponse_html ;
:id ?reponseId .
FILTER(?reponse_md != '')
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment