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

Adding random questions from a category with an apostrophe in the name does not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.1
    • Fix Version/s: 1.7.5, 1.8.6, 1.9.2
    • Component/s: Quiz
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      http://moodle.org/mod/forum/discuss.php?d=65204

      Joseph Rézeau suggests the fix:

      Solution: In file moodle/mod/quiz/edit.php, towards line 185, replace:

      $form->name = get_string('random', 'quiz') .' ('. $category->name .')';

      with

      $form->name = get_string('random', 'quiz') .' ('. addslashes($category->name) .')';

      which is right. I'll apply it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Tester:
              Jérôme Mouneyrac
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, 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/Jul/08