original_string: public static function user_enrolment_created(\core\event\user_enrolment_created $event) {
          if (!enrol_is_enabled('meta')) {
              // No more enrolments for disabled plugins.
              return true;
          }
  
          if ($event->other['enrol'] === 'meta') {
              // Prevent circular dependencies - we can not sync meta enrolments recursively.
              return true;
          }
  
          self::sync_course_instances($event->courseid, $event->relateduserid);
          return true;
      }
code: public static function user_enrolment_created(\core\event\user_enrolment_created $event) {
          if (!enrol_is_enabled('meta')) {
              // No more enrolments for disabled plugins.
              return true;
          }
  
          if ($event->other['enrol'] === 'meta') {
              // Prevent circular dependencies - we can not sync meta enrolments recursively.
              return true;
          }
  
          self::sync_course_instances($event->courseid, $event->relateduserid);
          return true;
      }
code_tokens: public static function user_enrolment_created ( \ core \ event \ user_enrolment_created $ event ) { if ( ! enrol_is_enabled ( 'meta' ) ) { // No more enrolments for disabled plugins. return true ; } if ( $ event -> other [ 'enrol' ] === 'meta' ) { // Prevent circular dependencies - we can not sync meta enrolments recursively. return true ; } self :: sync_course_instances ( $ event -> courseid , $ event -> relateduserid ) ; return true ; }
docstring: Triggered via user_enrolment_created event.
  
  @param \core\event\user_enrolment_created $event
  @return bool true on success.
docstring_tokens: Triggered via user_enrolment_created event .