public static function get_sections_from_courseid($courseid) {
        global $DB;

        // Get all sections belonging to requested course
        $sectionsarr = array();
        $sections = $DB->get_records('course_sections', array('course' => $courseid), 'section');
        foreach ($sections as $section) {
            $sectionsarr[] = $section->id;
        }
        return $sectionsarr;
    }
public static function get_sections_from_courseid($courseid) {
        global $DB;

        // Get all sections belonging to requested course
        $sectionsarr = array();
        $sections = $DB->get_records('course_sections', array('course' => $courseid), 'section');
        foreach ($sections as $section) {
            $sectionsarr[] = $section->id;
        }
        return $sectionsarr;
    }
public static function get_sections_from_courseid ( $ courseid ) { global $ DB ; // Get all sections belonging to requested course $ sectionsarr = array ( ) ; $ sections = $ DB -> get_records ( 'course_sections' , array ( 'course' => $ courseid ) , 'section' ) ; foreach ( $ sections as $ section ) { $ sectionsarr [ ] = $ section -> id ; } return $ sectionsarr ; }
Given one course id, return one array with all the course_sections belonging to it
Given one course id return one array with all the course_sections belonging to it