I have re-opened this issue as I have encountered an associated issue.
Now we can have the question in HTML we have the option of adding images which is great. But when you view the results they are not displayed as "Full HTML " but as "Filtered HTML"
The section of multichoice.module that appears to control this is from 994 and namely 1021
// Add the cell with the question and the answers.
$q_output = '<div class="quiz_summary_question"><span class="quiz_question_bullet">Q:</span> '. check_markup($question->body) .'</div>';
removal of the check_markup as below will allow display of the Question in Full HTML, but not knowing enough about php, i do not know if this is acceptable or even the right way of doing it
// Add the cell with the question and the answers.
$q_output = '<div class="quiz_summary_question"><span class="quiz_question_bullet">Q:</span> '. $question->body .'</div>';
Comments
Comment #1
Anonymous (not verified) commentedPrevious issue http://drupal.org/node/363281 that has lead to this becoming apparent
Comment #2
Anonymous (not verified) commentedImproved title
Comment #3
grobemo commentedI'm not sure about this, since I don't understand the code here all that well. Including $question->body directly seems like a security risk and a violation of the principle that you should never send user input directly to the page.
Going off of the solution to the related issue, what if you changed the check_markup in the existing code to the following?
I haven't tested this yet, but I'm not sure when I'll get a chance to do it, so you might want to try it yourself.
Comment #4
Anonymous (not verified) commentedI tried the change you suggest , but it stays as Filtered HTML
Were obviously in the right area, just a case of pinning it down
Comment #5
Anonymous (not verified) commentedOk , using what you did as a clue, i did a search of DRupal for similar issues of FILTER_FORMAT_DEFAULT
(didnt actually understand what you were doing when i started, but now have a partial solution which may get us to the right one
What i hadn't realised was you were setting to the site default filter, which in my case is "Filtered HTML", so substituting for "format" "3" which in my case if Full HTML, now displays correctly. The problem is different sites may have Full HTML with a different format number. So the code is not universal. Also not sure if this breaks any other rules.
The good thing is I am learning new tricks every day :)
Comment #6
grobemo commentedSo that's what FILTER_FORMAT_DEFAULT does. Is $question->format defined at this point? Could you use that?
Comment #7
Anonymous (not verified) commentedNow walking a tightrope without a net :)
I had a look for $question->format but it doesn't appear in the module
I did find $quiz->format and $node->format tried them without success
I think i now understand what we need, and that is to know the input format being used by the node, and not the default input format set for the node, if that makes sense.
I am currently searching Drupal for various combinations of these ideas :)
Comment #8
mbutcher commentedIs the new setup in Quiz 3 sufficient, or is this still a problem?
(Trying to figure out what still needs fixing for Quiz 3 before beta)
Comment #9
leenwebb commentedI just encountered this exact problem in 4-alpha -- I had "n/a" in one of my questions (in the results summary at the end of the quiz) and the actual results paragraph displayed as just "n/a" as well.
I ended up changing both the input format of the quiz node itself and the offending question to Filtered HTML and everything worked fine. (But I really want them to be Full HTML!)
I'm not sure what further info you need, but please let me know and I'll try to provide whatever I can!
Comment #10
turadg commentedI believe this is fixed in 4.x-dev. Look for the next alpha or beta and if it's not, please reopen.
(Fixed on http://drupal.org/node/534716#comment-1912992)