gjbarnard / moodle-filter_synhi

Syntax highlighter
GNU General Public License v3.0
2 stars 2 forks source link

Moodle question type CLOZE is interpreted with SynHi #7

Closed a-kempka closed 1 year ago

a-kempka commented 1 year ago

Using a quiz with the qquestion type CLOZE ((https://docs.moodle.org/400/en/Embedded_Answers_(Cloze)_question_type) with the following code (see example 1 in the link) results in a broken question. The question is interpreted as a source code and is thus highlighted:

Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}
The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!
~%50%Marseille#No, that is the second largest city in France (after
Paris).~*#Wrong answer. The capital of France is Paris, of course.}.

Instead of this: cloze_synhi-off

The question gets interpreted as source code cloze_synhi-on

a-kempka commented 1 year ago

A short update on this: The example came from moodle.org and was embedded in <pre>-Tags. Using it without the tags does not break the CLOZE questions. An Option to omit syntax highlighting for specific pre Tags would be helpful.