Unable to remove module from course with more than one mandatory module: Error of You need to have at least one module that is mandatory

Error of You need to have at least one module that is mandatory when removing module from a course with more than one mandatory module