Повідомлення, що надісла(ла)в Joseph Rézeau

Фото Core developers Фото Plugin developers Фото Testers Фото Translators

Jeff,

There is no specific CSS formatting for the individual feedback messages in the MCQ question.

In my "name an animal" example above, if you wanted e.g. the feedback for wrong choice of "the rose" to be displayed in red, here are two solutions which do not need hacking your Moodle files.

Solution A

  • <span class="incorrect">No, that's a flower!</span>

Solution B

  • <font color=red>No, that's flower!</font>

Solution A relies on an .incorrect class being present in your actual Moodle theme. The advantage is that it will take the color (and background color, etc.) of that .incorrect class, meaning you can change it as you will. Solution B is of course not advisable, as it relies on now deprecated use of font tags in HTML.

Unfortunately, this means you would have to hard-code those formattings in each and every feedback message. Not practical if you have hundreds of questions! You may want to hack your Moodle questions (or quiz?) code in order to automatically use the .correct and .incorrect CSS classes. This is what is done for the feedback messages in the Lesson questions.

Joseph

Фото Core developers Фото Plugin developers Фото Testers Фото Translators

I expect you mean MCQ questions, since those are the only questions in which the Correct answer gets highlighted when students review their quiz.

The CSS rule which is used for highlighting of the correct answer in an MCQ question is the same rule which is used for all hightlighting purposes in your current theme, i.e.:

.highlight {
 background-color:green; # if you want green here
}

There is no highlighting of incorrect answers (and there is no need to, I think).

Attached screenshot shows:

  1. correct answer
  2. student's chosen answer (wrong): the radio button is checked (and inactive)
  3. Incorrect default feedback message
  4. specific feedback message for the incorrect choice

Formatting of #3 is dependant on the student's answer being correct, partially correct or incorrect and is to be found in these rules (rules shown below account for color, etc. display in my orangechoc theme, as shown in screenshot).

.correctness {
 border-left-style:solid;
 border-left-width:5px;
 padding-left:0.5em;
}
.correctness.correct {
 border-left-color:blue;
}
.correctness.incorrect {
 border-left-color:red;
}
.correctness.partiallycorrect {
 border-left-color:orange;
}

Joseph

Вкладення image00.jpg
Фото Core developers Фото Plugin developers Фото Testers Фото Translators

Jeff,

Which type of questions do you have in mind (multiple choice, short answer, match, etc.)? The highlighting of correct answers and the coloring of the Correct/Incorrect words are in different places in the CSS files.

Joseph

Фото Core developers Фото Plugin developers Фото Testers Фото Translators

Hi Dailia,

I have developed a number of "lessons" with Toolbook. But I never took the step of exporting those "lessons" in DHTML format because a) it dramatically reduced the various interactive widgets which I had implemented in native code and b) it never worked anyway. So now I display those (native) TB lessons in Moodle through the Neuron plugin. It works fine with MSIE but I had a lot of trouble with FireFox, until I found the solution: FireFox's cache must be set at zero.

I have no problems with popup windows.

Hope that helps,

Joseph

Фото Core developers Фото Plugin developers Фото Testers Фото Translators
Dawn > Can someone help me tweek this file so that I can do the same with cloze questions?

Due to the special nature of cloze questions (which are really a collection of sub-questions), it is quite impossible to create them as GIFT format.sad

Joseph