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

Conditions: If you delete a module that another module had a condition on, it throws exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Conditional activities
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      To reproduce:

      0. Turn on the completion/condition features (at site level settings and in course).
      1. Create forum 'xxx' and turn on completion, e.g. manual tickboxes
      2. Create web page 'yyy' and add a condition that xxx must be completed before it is shown.
      3. Delete forum 'xxx'

      At present, this causes an exception to be thrown and the page dies.

        Gliffy Diagrams

          Activity

          Hide
          quen Sam Marshall added a comment -

          Resolved. My changes are as follows:

          1. In this situation, the key library functions now ignore the problem and treat it as if the condition did not exist.

          2. When on the course view page, a debugging() call displays a warning that the module does not exist any more. It gives the name of the activity (the one that still does exist) and advises users that they can clear the error by editing that activity.

          Show
          quen Sam Marshall added a comment - Resolved. My changes are as follows: 1. In this situation, the key library functions now ignore the problem and treat it as if the condition did not exist. 2. When on the course view page, a debugging() call displays a warning that the module does not exist any more. It gives the name of the activity (the one that still does exist) and advises users that they can clear the error by editing that activity.

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Tester:
              Nobody
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10