Moodle
  1. Moodle
  2. MDL-3899

addslashes missing in cvs:/mod/quiz/format/multianswer/format.php

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.2
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_15_STABLE
    • Rank:
      10990

      Description

      Addslashes is missing on line 30 in http://moodle.cvs.sourceforge.net/moodle/moodle/mod/quiz/format/multianswer/format.php.

      When the ' sign is present in the question, Moodle writes Could not insert new question! error and does not insert the question into database.

      original line 30:

      $thequestion->name = $lines[0];

      corrected line 30:

      $thequestion->name = addslashes($lines[0]);

      It would be nice to have the questions name limited to e.g. 30 characters, it can become very long now.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Howard Miller (howard.miller at udcf.gla.ac.uk) Friday, 26 August 2005, 07:02 PM:

        In testing this I noticed that this format generates some notices as well. I will endeavour to fix all of the issues before closing this.

        From Howard Miller (howard.miller at udcf.gla.ac.uk) Friday, 26 August 2005, 08:02 PM:

        addslashes added as noted. Also fixed a bug with notice being thrown.

        Thanks!

        Show
        Martin Dougiamas added a comment - From Howard Miller (howard.miller at udcf.gla.ac.uk) Friday, 26 August 2005, 07:02 PM: In testing this I noticed that this format generates some notices as well. I will endeavour to fix all of the issues before closing this. From Howard Miller (howard.miller at udcf.gla.ac.uk) Friday, 26 August 2005, 08:02 PM: addslashes added as noted. Also fixed a bug with notice being thrown. Thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: