Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11316 Slashes displayed in correct answers for short answer questions
  3. MDL-11317

Slashes displayed in incorrect responses for short answer questions

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Questions
    • Labels:
      None
    • Environment:
       Fedora, Apache, PHP 5.1.6, MySQL 5.0.37, latest Moodle 1.8.2+
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      In item analysis, incorrect responses at short answer questions are displayed with slashes before quotes (see attachment).

      To get rid of this I did:

      — mod/quiz/report/analysis/report.php ORIGINAL
      +++ mod/quiz/report/analysis/report.php MODIFIED
      @@ -332,6 +332,7 @@
      } else

      { $qclass = 'partialcorrect'; }

      + $resp = s($resp, TRUE); // line added to get rid of slashes
      $response->credit = '<span class="'.$qclass.'">('.format_float($q['credits'][$aid],2).') </span>';
      $response->text = '<span class="'.$qclass.'">'.format_text("$resp", FORMAT_MOODLE, $format_options, $quiz->course).' </span>';
      $count = $q['rcounts'][$aid].'/'.$q['count'];

        Attachments

          Activity

            People

            • Assignee:
              timhunt Tim Hunt
              Reporter:
              mixik Daniel Miksik
              Tester:
              Nobody
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07