Closed PhMemmel closed 1 week ago
@PhMemmel can you rebase this and resubmit. After the checks run I'll evaluate it.
@Syxton Sure, looks pretty green overall :)
@PhMemmel probably not a common problem, but it is a good sanity check to see if the course exists before trying to duplicate from/to. Looks good. merging
Well, as you might think this PR does not come out of nowhere... I saw the job fail on our instance... :) It probably will become more important once https://tracker.moodle.org/browse/MDL-77760 lands.
In rare cases when there's a delay in processing adhoc tasks on an instance for example it's possible that a course has already been deleted once the duplicate_task starts to run. In this case the task fails.
This PR introduces a check if the source and target course exists, before actually doing the duplication of activities.