We received a call from an internal user of Moodle, reporting that even concluding all activities of a topic the next topic was not released, we were checked and noticed that because we deleted a file involved in this problem. We do not understand why the restriction related to that activity was not deleted along with the file, because it seems that it would be more logical to happen, but all that happened was that the message of restriction present in the topic dependent on the completion of that activity was no longer:
Available if the XPTO activity is marked complete.
Available if the activity "Missing activity" is marked complete.
This also occurs when you partially back up a course and restore in a new course, the constraint conditions are taken together with the backup, although the file has not been selected to be backed up, generating the problem previously reported as well.
We suggest at least one message before confirming the deletion of the file, that it is associated with a restriction. We also suggest that you evaluate all aspects of maintaining the restriction of an unselected file for backup when restoring to another course.