protected static function get_item_ids_from_course_ids($courseids) {
        global $DB;
        if (empty($courseids)) {
            return [];
        }
        list($insql, $inparams) = $DB->get_in_or_equal($courseids, SQL_PARAMS_NAMED);
        return $DB->get_fieldset_select('grade_items', 'id', "courseid $insql", $inparams);
    }
protected static function get_item_ids_from_course_ids($courseids) {
        global $DB;
        if (empty($courseids)) {
            return [];
        }
        list($insql, $inparams) = $DB->get_in_or_equal($courseids, SQL_PARAMS_NAMED);
        return $DB->get_fieldset_select('grade_items', 'id', "courseid $insql", $inparams);
    }
protected static function get_item_ids_from_course_ids ( $ courseids ) { global $ DB ; if ( empty ( $ courseids ) ) { return [ ] ; } list ( $ insql , $ inparams ) = $ DB -> get_in_or_equal ( $ courseids , SQL_PARAMS_NAMED ) ; return $ DB -> get_fieldset_select ( 'grade_items' , 'id' , "courseid $insql" , $ inparams ) ; }
Get all the items IDs from course IDs.

@param array $courseids The course IDs.
@return array
Get all the items IDs from course IDs .