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

Notice error after deleting a question behaviour

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2, 2.3
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. On a fresh 2.1 or 2.2 install, go to admin/qbehaviours.php (If you want to avoid making a fresh install, just go and delete all the rows from config_plugins where component is 'question'.)
      2. Click Delete to uninstall one of the behaviours.
      3. Verify their are no notices.

      Also verify:

      4. That any behaviour with 1 or more question attempts OR another behaviour depending on it, cannot be deleted. (The logic was incorrectly && before).

      Ideally, test this on 2.1 and 2.2, since the code is different in both places.

      Show
      1. On a fresh 2.1 or 2.2 install, go to admin/qbehaviours.php (If you want to avoid making a fresh install, just go and delete all the rows from config_plugins where component is 'question'.) 2. Click Delete to uninstall one of the behaviours. 3. Verify their are no notices. Also verify: 4. That any behaviour with 1 or more question attempts OR another behaviour depending on it, cannot be deleted. (The logic was incorrectly && before). Ideally, test this on 2.1 and 2.2, since the code is different in both places.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Upon deleting a question behaviour, the following error message is displayed (in debug mode).

      Deleting question behaviour 'Adaptive mode (no penalties)'

      Notice: Trying to get property of non-object in ...\moodle\admin\qbehaviours.php on line 184

      All data associated with the question behaviour 'Adaptive mode (no penalties)' has been deleted from the database. To complete the deletion (and to prevent the behaviour from re-installing itself), you should now delete this directory from your server: ...\moodle/question/behaviour/adaptivenopenalty

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jan/12