Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-35620

Question engine cannot cope with a question variable called "0"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2.6, 2.3.3
    • 2.2.5, 2.3.2, 2.4
    • Questions
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • MOODLE_22_STABLE, MOODLE_23_STABLE
    • Hide

      The unit tests are a reasonable test of this, but to be on the safe side:

      1. Preview a couple of questions, including a shortanswer question using deferred feedback behaviour, and another qtype using a different behaviour.

      Show
      The unit tests are a reasonable test of this, but to be on the safe side: 1. Preview a couple of questions, including a shortanswer question using deferred feedback behaviour, and another qtype using a different behaviour.

      It is, of course, a really bad idea to use a question variable called 0. However, it turns out that the OU has a lot of Opaque questions (https://github.com/moodleou/moodle-qtype_opaque) that do just that, and it is impossible to change it now.

      Amazingly, the system can actually cope with such silly names, except for one place where we do a sloppy test for whether the name is NULL, so I will fix that.

      Also, interestingly, <input name="0" ... /> is valid HTML, so supporting this is not totally crazy.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.