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;
    }
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;
    }
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 ; }
Creates event from the section object

@param \stdClass $section
@return course_section_created
Creates event from the section object