public final function get_section($section, $strictness = IGNORE_MISSING) {
        if (is_object($section)) {
            $sectionnum = $section->section;
        } else {
            $sectionnum = $section;
        }
        $sections = $this->get_sections();
        if (array_key_exists($sectionnum, $sections)) {
            return $sections[$sectionnum];
        }
        if ($strictness == MUST_EXIST) {
            throw new moodle_exception('sectionnotexist');
        }
        return null;
    }
public final function get_section($section, $strictness = IGNORE_MISSING) {
        if (is_object($section)) {
            $sectionnum = $section->section;
        } else {
            $sectionnum = $section;
        }
        $sections = $this->get_sections();
        if (array_key_exists($sectionnum, $sections)) {
            return $sections[$sectionnum];
        }
        if ($strictness == MUST_EXIST) {
            throw new moodle_exception('sectionnotexist');
        }
        return null;
    }
public final function get_section ( $ section , $ strictness = IGNORE_MISSING ) { if ( is_object ( $ section ) ) { $ sectionnum = $ section -> section ; } else { $ sectionnum = $ section ; } $ sections = $ this -> get_sections ( ) ; if ( array_key_exists ( $ sectionnum , $ sections ) ) { return $ sections [ $ sectionnum ] ; } if ( $ strictness == MUST_EXIST ) { throw new moodle_exception ( 'sectionnotexist' ) ; } return null ; }
Returns information about section used in course

@param int|stdClass $section either section number (field course_section.section) or row from course_section table
@param int $strictness
@return section_info
Returns information about section used in course