apluslms/mooc-grader

The questionnaire is not displaying the proper hint for correct answers

jaguarfi opened this issue · 5 comments

Hints for correct answers are not properly displayed.

  .. pick-one:: 10
    :required:

    **Modifiers used in this question:** ``required``.

    When :math:`(x + 1)^3 = 27`, what is :math:`x`?

    a. 9
    *b. 2
    c. 3

    a § Not quite. Remember the cube root.
    b § This is correct
    c § Rather close. Remember that you can add or subtract the same number to both sides of the equation.

In the previous exercise, if the user chooses the option b., Aplus must display the "This is correct" text. But, in v1.8 Aplus is only showing the default text => "Correct"

Aplus v1.7 working example
working

Aplus v1.8 non-working example
non-working

This is important to fix! Some teachers want to use hints for the correct answers too and it is critical that the student really reads them.

This may be the code that skips the hint for correct answers:

{% if hints and not field.answer_correct %}

It seems that the pick-any directive still work. The problem exists only in the pick-one directive

@jaguarfi said that pick-any questions work correctly. I just tested them, and I'm not so sure about that. It seems that pick-any questions only display hints for options that haven't been selected. For example, in aplus-manual, the question "When (x+1)2=16, what is x?" has the following option:

d. an irrational number

Which should display the following hint when selected:

d § No. This equation has a nice and easy solution.

But that didn't work when I tested it. Correct answer hints didn't seem to work either (i.e. when a correct option is selected). So, should we also fix pick-any hints on this issue?

Whatever the bug is, we want to fix it. The hint should be displayed according to the specs. The normal case is to show hint for the selected option(s), but there are also modifiers that show hints when the option is not selected.