#3536 - Comcode output conflict in QUIZ_DONE_SCREEN.tpl
0 guests and 0 members have recently viewed this.
The top 3 point earners from 7th Dec 2025 to 14th Dec 2025.
| PDStig |
|
|
|---|---|---|
| Gabri |
|
|
| Master Rat |
|
|
There are no events at this time
I used Comcode in both the question and the explanation. On QUIZ_DONE_SCREEN.tpl where it lists the explanation as to why the answer was incorrect, this is when the output issue occurs.
I'm also not entirely clear what I'm looking at. The issue says "Comcode is displayed as expected on QUIZ_SCREEN.tpl" [implying it's on the question and/or answer text] but also said "On QUIZ_DONE_SCREEN.tpl where it lists the explanation as to why the answer was incorrect, this is when the output issue occur" [implying it's on the explanation test]. I think you probably mean the question and/or answer (as that's all that shows on both), but I'm not 100% on that.
A screenshot would help. It may not even quite by the Comcode not parsing, it could be something like auto-escaping of HTML happening due to a code override, so escaped-parsed-Comcode might be shown.
(Click to enlarge)
(Click to enlarge)
(Click to enlarge)
From:
{CORRECTIONS}{AFFIRMATIONS}
To:
{$COMCODE,{CORRECTIONS}{AFFIRMATIONS}}
But this has no positive impact on the output.
I think you edited some of the language strings, e.g. QUIZ_MISTAKE_EXPLAINED_COMCODE, to not show the answer. I've made the same edit myself, as I didn't consider it correct to show the answer when reveal answers was off, only the explanation.
I tweaked a few other things, mainly commenting my code better, as it was a bit muddled.
https://github.com/ocproducts/composr/commit/2ae99510febf19de99cbb861723cce94768bcb91
Not sure if this is supposed to happen, but here's a scenario:
1. I'm taking a 'Test' and have one or more fields that require input (such as [SHORT])
2. This field doesn't have a correct or incorrect answer
3. Entering a value in this field always results in failing the test (assuming I set a passing score of 100%)
Users should only be SCORED on questions that have a correct answer (otherwise marked with [*]). Not all tests will have a correct answer, and it would be nice to ask questions (like "how are you today?") without penalizing the test taker.