Moodle
  1. Moodle
  2. MDL-556

Something is wrong in numerical questions...

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_11_STABLE
    • Rank:
      13474

      Description

      The info in the correct and acceptederror fields are saved incorrectly in db.

      Doing some debug, I think I've deduced that it seems to be a incorrect align tag in that text fields, producing that the acceptederror field is showed on the left and the correct field is showed in the right (swapped from their respective labels) !!!

      I've tested it only under Safari 1.0.

      Curious bug !!

      Detected when adding support to this qype in backup/restore utility (Bug #84).

      Can I solve it ?

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Martin Dougiamas (martin at moodle.com) Wednesday, 16 July 2003, 10:12 AM:

        Careful, the database fields are done in a slightly weird way (different to other question types ...) I remember confusing myself while going through the code but it made sense eventually.

        Also note he uses Javascript to do some client-side checking (on the question setup form)

        When I was testing the numbers I put in seemed to have the right effect on the quizzes so I'm not sure what the bug is that you're seeing.

        From Eloy Lafuente (stronk7 at moodle.org) Wednesday, 16 July 2003, 04:22 PM:

        Hi.

        I've created a quiz in Demo103 course. It has two numerical questions. The PI correct answer is 3.141592 with an allowed error of 0.141592. It seems to be correctly stored in DB (max and min values). But the add answer I've typed is 4 and the allowed error I've typed is 2. In DB, the max, min (quiz_numerical) and answer (quiz_answers) values are stored incorrectly.

        I've make an attempt to the quiz, too and I've entered a 1 answer in the add question. It has been gradded 100% and it's incorrect !! (due to values in DB) I suppose.

        Take a look. Eloy.

        From Eloy Lafuente (stronk7 at moodle.org) Thursday, 17 July 2003, 02:49 AM:

        I've done some changes in quiz/numerical.html to 'clarify' the representation of the fields in the form (I haven't modified any javascript code or similar, I only have created a new TR/TD in the form).

        I've done a lot of tests and now everything seems to work fine with every question definition.

        I think that there is no risk committing it to cvs, so I'll do it tomorrow if there is no any message avoiding that !!

        I think that the bug is a html-render problem.

        Ciao.

        From Martin Dougiamas (martin at moodle.com) Thursday, 17 July 2003, 09:51 AM:

        Cool bananas - thanks!

        From Eloy Lafuente (stronk7 at moodle.org) Friday, 18 July 2003, 06:12 AM:

        Now in cvs a sligthy modified form to avoid the bug.

        Ciao.

        From Henrik Kaipe (kaipe at users.sourceforge.net) Friday, 18 July 2003, 05:40 PM:

        My impression is that this was a browser-dependent bug.

        Did you use Safari 1.0?

        I haven't heard about that one before. I wonder if it could have been tricked by my habit of ending the input tags with />.

        From Eloy Lafuente (stronk7 at moodle.org) Friday, 18 July 2003, 05:57 PM:

        Yes. I think it's a Safari bug too !!

        The problem was that the first field (correct) has a align right and it was showed on the right (swapped with the acceptederror field).

        Apple has to do some improvements...

        Show
        Martin Dougiamas added a comment - From Martin Dougiamas (martin at moodle.com) Wednesday, 16 July 2003, 10:12 AM: Careful, the database fields are done in a slightly weird way (different to other question types ...) I remember confusing myself while going through the code but it made sense eventually. Also note he uses Javascript to do some client-side checking (on the question setup form) When I was testing the numbers I put in seemed to have the right effect on the quizzes so I'm not sure what the bug is that you're seeing. From Eloy Lafuente (stronk7 at moodle.org) Wednesday, 16 July 2003, 04:22 PM: Hi. I've created a quiz in Demo103 course. It has two numerical questions. The PI correct answer is 3.141592 with an allowed error of 0.141592. It seems to be correctly stored in DB (max and min values). But the add answer I've typed is 4 and the allowed error I've typed is 2. In DB, the max, min (quiz_numerical) and answer (quiz_answers) values are stored incorrectly. I've make an attempt to the quiz, too and I've entered a 1 answer in the add question. It has been gradded 100% and it's incorrect !! (due to values in DB) I suppose. Take a look. Eloy. From Eloy Lafuente (stronk7 at moodle.org) Thursday, 17 July 2003, 02:49 AM: I've done some changes in quiz/numerical.html to 'clarify' the representation of the fields in the form (I haven't modified any javascript code or similar, I only have created a new TR/TD in the form). I've done a lot of tests and now everything seems to work fine with every question definition. I think that there is no risk committing it to cvs, so I'll do it tomorrow if there is no any message avoiding that !! I think that the bug is a html-render problem. Ciao. From Martin Dougiamas (martin at moodle.com) Thursday, 17 July 2003, 09:51 AM: Cool bananas - thanks! From Eloy Lafuente (stronk7 at moodle.org) Friday, 18 July 2003, 06:12 AM: Now in cvs a sligthy modified form to avoid the bug. Ciao. From Henrik Kaipe (kaipe at users.sourceforge.net) Friday, 18 July 2003, 05:40 PM: My impression is that this was a browser-dependent bug. Did you use Safari 1.0? I haven't heard about that one before. I wonder if it could have been tricked by my habit of ending the input tags with />. From Eloy Lafuente (stronk7 at moodle.org) Friday, 18 July 2003, 05:57 PM: Yes. I think it's a Safari bug too !! The problem was that the first field (correct) has a align right and it was showed on the right (swapped with the acceptederror field). Apple has to do some improvements...
        Hide
        Michael Blake added a comment -

        assign to a valid user

        Show
        Michael Blake added a comment - assign to a valid user

          People

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

            Dates

            • Created:
              Updated:
              Resolved: