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 Bug
    • Status: Closed
    • Priority: Minor 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
          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
          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:
              Sam Marshall
              Reporter:
              Sam Marshall
              Tester:
              Nobody
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: