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

Units in numerical questions are acting case sensitive, but not functioning that way.

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 1.9.5, 2.3.3
    • None
    • Questions, Quiz
    • MOODLE_19_STABLE, MOODLE_23_STABLE
    • Hide

      This is indeed a MySQL collation problem. If you want both Amps and amps to be valid units, you will have to alter the question_numerical_units table to use the utf8_bin collation, instead of one of the _ci (case insensitive) collations.

      Show
      This is indeed a MySQL collation problem. If you want both Amps and amps to be valid units, you will have to alter the question_numerical_units table to use the utf8_bin collation, instead of one of the _ci (case insensitive) collations.

    Description

      I created a numerical question with the answer to be .5. A student entered .5 "amps" and received a penalty but then entered .5 "Amps" and received full credit. "Amps" was listed in the question as a legal unit with a multiplier of 1. This didn't seem like a big issue, so I tried to enter "amps" into the units field, also with a multiplier or 1, but I received a database error. I could still add units that weren't the same word, but I couldn't add the same unit with a different capitalization pattern.

      Numerical Error 1 shows the student tried to put in .5 "amps" and received a penalty.

      Numerical Error 2 shows the student entered .5 "Amps" and received full credit.

      Numerical Error 3 shows me trying to add the "amps" to the units so that I could regrade and give full credit.

      Numerical Error 4 shows the error I received when I tried to do that.

      My understanding is that the units were supposed to be case insensitive.

      Thanks!

      Attachments

        1. numerical_error_1.jpg
          numerical_error_1.jpg
          68 kB
        2. numerical_error_2.jpg
          numerical_error_2.jpg
          61 kB
        3. numerical_error_3.jpg
          numerical_error_3.jpg
          43 kB
        4. numerical_error_4.jpg
          numerical_error_4.jpg
          14 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              peschtra Peter Kupfer
              Safat Shahin, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              9 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated: