Added a checking flag to check_enrolment_plugins() to make sure that it never repeats more than once in an invocation.  Otherwise it's sometimes possible for role_assign() during the enrolment process to cause loops.
Added a checking flag to check_enrolment_plugins() to make sure that it
never repeats more than once in an invocation.  Otherwise it's sometimes
possible for role_assign() during the enrolment process to cause loops.

dilawar/moodle