original_string: public static function create_from_section($section) {
          $event = self::create([
              'context' => \context_course::instance($section->course),
              'objectid' => $section->id,
              'other' => ['sectionnum' => $section->section]
          ]);
          $event->add_record_snapshot('course_sections', $section);
          return $event;
      }
code: public static function create_from_section($section) {
          $event = self::create([
              'context' => \context_course::instance($section->course),
              'objectid' => $section->id,
              'other' => ['sectionnum' => $section->section]
          ]);
          $event->add_record_snapshot('course_sections', $section);
          return $event;
      }
code_tokens: public static function create_from_section ( $ section ) { $ event = self :: create ( [ 'context' => \ context_course :: instance ( $ section -> course ) , 'objectid' => $ section -> id , 'other' => [ 'sectionnum' => $ section -> section ] ] ) ; $ event -> add_record_snapshot ( 'course_sections' , $ section ) ; return $ event ; }
docstring: Creates event from the section object
  
  @param \stdClass $section
  @return course_section_created
docstring_tokens: Creates event from the section object