Пример #1
0
 /**
  * Get descendant ids.
  *
  * @param competency $competency The competency.
  * @return array Array of competencies ids.
  */
 public static function get_descendants_ids($competency)
 {
     global $DB;
     $path = $DB->sql_like_escape($competency->get_path() . $competency->get_id() . '/') . '%';
     $like = $DB->sql_like('path', ':likepath');
     return $DB->get_fieldset_select(self::TABLE, 'id', $like, array('likepath' => $path));
 }