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

Error in Item analysis report for short aswers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.4
    • Fix Version/s: 1.8.8, 1.9.4
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      OS : LINUX RedHat
      Moodle Version : 1.8.4
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      The "short answer" does not display correctly in Item analysis report. The answers wich are verified with wilcard appears as false as you can see on En-2008-06-19_090348.png screenshot.
      On the other hand, it works for user reports on the Overview.

      It doesn't compare correctly strings with wildcards as we can see on the second screenshot (exemple.png) :

      • For the answer "celine" it's correct. 1 user as answer "celine".
      • But for the answer "c*line", the user who has answered "caline" must be count or it appears as false. (same problem for the answer "*line" for "aline")

      The problem still in Moodle 1.9.1 on windows/Mysql

      I've fix the problem : /var/www/moodle184test/question/type/shortanswer/questiontype.php.
      I've replace the compare_responses function by :
      function compare_responses($question, $state, $teststate) {
      if (isset($state->responses['']) && isset($teststate->responses[''])) {
      return $this->compare_string_with_wildcard(stripslashes_safe($state->responses['']),
      $teststate->responses[''], !$question->options->usecase);
      }
      return false;
      }

        Attachments

        1. En-2008-06-19_090348.png
          22 kB
          Céline Bissler
        2. exemple.png
          24 kB
          Céline Bissler
        3. patch18.txt
          1 kB
          Joseph Rézeau
        4. patch19.txt
          1 kB
          Joseph Rézeau

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                28/Jan/09