Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4245

Notice: Undefined variable: resid

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Module: Questionnaire
    • Labels:
      None
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE

      Description

      Create a Check boxes question with one !other possible answer.
      Take questionnaire and, on that question page, tick the !other choice but leave the box/field empty. then click Next page or Submit.
      You get the expected questionnaire warning messages:
      There is something wrong with question: #1.
      and
      If you tick this choice you must enter some text in the text box!
      But - if DEBUG mode is ON - you also get a PHP Notice:
      Notice: Undefined variable: resid in moodle\mod\questionnaire\questiontypes\questiontypes.class.php on line 361.

      Very easy fix : in questiontypes.class.php at the beginning of function insert_resp_multiple($rid), line 320 add: $resid = '';

        Attachments

          Activity

            People

            Assignee:
            rezeau Joseph Rézeau
            Reporter:
            rezeau Joseph Rézeau
            Participants:
            Component watchers:
            Mike Churchward
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Dec/12