original_string: public static function course_module_created(\core\event\course_module_created $event) {
          global $CFG;
  
          if ($event->other['modulename'] === 'forum') {
              // Include the forum library to make use of the forum_instance_created function.
              require_once($CFG->dirroot . '/mod/forum/lib.php');
  
              $forum = $event->get_record_snapshot('forum', $event->other['instanceid']);
              forum_instance_created($event->get_context(), $forum);
          }
      }
code: public static function course_module_created(\core\event\course_module_created $event) {
          global $CFG;
  
          if ($event->other['modulename'] === 'forum') {
              // Include the forum library to make use of the forum_instance_created function.
              require_once($CFG->dirroot . '/mod/forum/lib.php');
  
              $forum = $event->get_record_snapshot('forum', $event->other['instanceid']);
              forum_instance_created($event->get_context(), $forum);
          }
      }
code_tokens: public static function course_module_created ( \ core \ event \ course_module_created $ event ) { global $ CFG ; if ( $ event -> other [ 'modulename' ] === 'forum' ) { // Include the forum library to make use of the forum_instance_created function. require_once ( $ CFG -> dirroot . '/mod/forum/lib.php' ) ; $ forum = $ event -> get_record_snapshot ( 'forum' , $ event -> other [ 'instanceid' ] ) ; forum_instance_created ( $ event -> get_context ( ) , $ forum ) ; } }
docstring: Observer for \core\event\course_module_created event.
  
  @param \core\event\course_module_created $event
  @return void
docstring_tokens: Observer for \ core \ event \ course_module_created event .