Steps to reproduce:
- Set the setting maxsections to 10 .
- Create a course with 10 sections.
- Lower the setting maxsections to 5.
- Add a label activity to section 1. This will succed .
- And a label activity to section 10 . The following error will be thrown: "Cannot create new section as it would exceed the maximum number of sections allowed for this course (5)".
This is not the expected behavoir since this is inconsistant between step 4 and step 5.
Since the number of sections is not increased it should be allowed to add activities.