Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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.

Issue Links

Activity

Hide
Jerome Mouneyrac added a comment -

Can add a random short answer question to a quizz in HEAD, 1.9, 1.8 and 1.7. It works fine, Thanks Tim.

Show
Jerome Mouneyrac added a comment - Can add a random short answer question to a quizz in HEAD, 1.9, 1.8 and 1.7. It works fine, Thanks Tim.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: