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

Error in Item analysis report for short aswers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.8, 1.9.4
    • 1.8.4
    • Quiz
    • None
    • OS : LINUX RedHat
      Moodle Version : 1.8.4
    • MySQL
    • MOODLE_18_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      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;
      }

        1. En-2008-06-19_090348.png
          En-2008-06-19_090348.png
          22 kB
        2. exemple.png
          exemple.png
          24 kB
        3. patch18.txt
          1 kB
        4. patch19.txt
          1 kB

            timhunt Tim Hunt
            cbissler Céline Bissler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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