Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed 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.

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

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: