original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Get all the items IDs from course IDs.
  
  @param array $courseids The course IDs.
  @return array
docstring_tokens: Get all the items IDs from course IDs .