diff --git a/tetras_extraction/script/templates/quiz.rq b/tetras_extraction/script/templates/quiz.rq index 53c1c7c1cde0d1af24d22cff55f8d3b7ed411d23..a23845b380f7a1be1074af9c3011d353f9e38ad4 100644 --- a/tetras_extraction/script/templates/quiz.rq +++ b/tetras_extraction/script/templates/quiz.rq @@ -12,26 +12,27 @@ template mt:quiz(?quiz) { "{" box { st:call-template(mt:qcu, ?quiz) - st:call-template(mt:json_in_ttl, ?quiz) - # Optional correct/incorrect comments for the quiz. - # Unfortunately, STTL doesn't have a concise syntax for blocks - # that depend on a variable being bound, we have to use - # SPARQL functions and st:format - coalesce(st:format( - '%s"correctComment": "%s"', - mt:sep(), - mt:json_escape(?correct_comment) - ), "") - coalesce(st:format( - '%s"incorrectComment": "%s"', - mt:sep(), - mt:json_escape(?incorrect_comment) - ), "") + st:call-template(mt:qcm, ?quiz) + #st:call-template(mt:json_in_ttl, ?quiz) } "}" } ']' } + # Optional correct/incorrect comments for the quiz. + # Unfortunately, STTL doesn't have a concise syntax for blocks + # that depend on a variable being bound, we have to use + # SPARQL functions and st:format + coalesce(st:format( + '%s"correctComment": "%s"', + mt:sep(), + mt:json_escape(?correct_comment) + ), "") + coalesce(st:format( + '%s"incorrectComment": "%s"', + mt:sep(), + mt:json_escape(?incorrect_comment) + ), "") '}' st:nl() } @@ -49,5 +50,4 @@ where { # which creates multiple matches for the WHERE clause and thus duplicate files. # We'll have to deal with them at some point, but for now just filter the first # one arbitrarily to avoid messing with the output. -limit 1 - +LIMIT 1