Add-ons
  1. Add-ons
  2. CONTRIB-3551

qtype_varnumericset qtype_varnumeric: negative numbers are marked incorrectly

    Details

    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Rank:
      38952

      Description

      When using qtype_varnumericset or qtype_varnumeric in a quiz, I created "([[a]][[b]])" and "z=-(a-b)". Then I tried to answer the quiz. For example, a=4 and b=1, z=-3 (answer). The quiz will tell me the answer is "-3" but mark my answer (-3) as incorrect.

        Activity

        Hide
        Tim Hunt added a comment -

        Jeremy, qtype_varnumeric* are third-party add-ons, so please report bugs here, not in the main MDL project.

        Show
        Tim Hunt added a comment - Jeremy, qtype_varnumeric* are third-party add-ons, so please report bugs here, not in the main MDL project.
        Hide
        Jamie Pratt added a comment -

        Just checked and I can confirm there is a problem with the marking. It seems that all negative answers are not being correctly matched. I did the following :

        • created a new varnumeric question on MOODLE_22_STABLE moodle installation
        • used question text answer = [[z]]
        • created one calculated variable z=-3
        • defined one answer with 100% grade z
        • previewed the question
        • answer = -3 was displayed as question text
        • entered -3 as the answer
        • question was marked wrong
        Show
        Jamie Pratt added a comment - Just checked and I can confirm there is a problem with the marking. It seems that all negative answers are not being correctly matched. I did the following : created a new varnumeric question on MOODLE_22_STABLE moodle installation used question text answer = [ [z] ] created one calculated variable z=-3 defined one answer with 100% grade z previewed the question answer = -3 was displayed as question text entered -3 as the answer question was marked wrong
        Hide
        Jamie Pratt added a comment -

        I did the same as above and used a predefined variable z, instead of a calculated one. Same problem seen.

        Will add testing instructions.

        Show
        Jamie Pratt added a comment - I did the same as above and used a predefined variable z, instead of a calculated one. Same problem seen. Will add testing instructions.
        Hide
        Jamie Pratt added a comment -

        Ah, seems I can't add testing instructions yet.

        Show
        Jamie Pratt added a comment - Ah, seems I can't add testing instructions yet.
        Hide
        Tim Hunt added a comment -

        I think that the testing instructions field only exists in the MDL project, not in the CONTRIB one.

        Show
        Tim Hunt added a comment - I think that the testing instructions field only exists in the MDL project, not in the CONTRIB one.
        Hide
        Philip Butcher added a comment -

        I'm fairly sure that this is down to leaving the 'Accepted error' field blank.

        Add in an accepted error and all is OK.

        My specification did say how to handle the values when there is no accepted error and we clearly need this as a usability aid to authors. Anyone like me would know never to do an exact equality on 'real' numbers using a digital computer. And I guess that's why the qtype passed all my tests. But the specification for accepted error states:
        "Nothing specified means answer must be the same – within reason for real numbers e.g.answer*1e-6" and I confirm that this isn't working.

        Jamie and I will pursue this as a matter of urgency, though the record will be on an OU bug tracker. We'll post back here when a fix is in place.

        Show
        Philip Butcher added a comment - I'm fairly sure that this is down to leaving the 'Accepted error' field blank. Add in an accepted error and all is OK. My specification did say how to handle the values when there is no accepted error and we clearly need this as a usability aid to authors. Anyone like me would know never to do an exact equality on 'real' numbers using a digital computer. And I guess that's why the qtype passed all my tests. But the specification for accepted error states: "Nothing specified means answer must be the same – within reason for real numbers e.g.answer*1e-6" and I confirm that this isn't working. Jamie and I will pursue this as a matter of urgency, though the record will be on an OU bug tracker. We'll post back here when a fix is in place.
        Hide
        Jamie Pratt added a comment -

        This is fixed in the latest version of the varnumericset and varnumeric question types available now in the OU repository. There have been other bug fixes and improvements to the question type too.

        Show
        Jamie Pratt added a comment - This is fixed in the latest version of the varnumericset and varnumeric question types available now in the OU repository. There have been other bug fixes and improvements to the question type too.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development