public static function list_course_module_competencies($cmid) {
        global $DB;

        $sql = 'SELECT coursemodcomp.*
                  FROM {' . self::TABLE . '} coursemodcomp
                  JOIN {' . competency::TABLE . '} comp
                    ON coursemodcomp.competencyid = comp.id
                 WHERE coursemodcomp.cmid = ?
                 ORDER BY coursemodcomp.sortorder ASC';
        $params = array($cmid);

        $results = $DB->get_recordset_sql($sql, $params);
        $instances = array();
        foreach ($results as $result) {
            array_push($instances, new course_module_competency(0, $result));
        }
        $results->close();

        return $instances;
    }
public static function list_course_module_competencies($cmid) {
        global $DB;

        $sql = 'SELECT coursemodcomp.*
                  FROM {' . self::TABLE . '} coursemodcomp
                  JOIN {' . competency::TABLE . '} comp
                    ON coursemodcomp.competencyid = comp.id
                 WHERE coursemodcomp.cmid = ?
                 ORDER BY coursemodcomp.sortorder ASC';
        $params = array($cmid);

        $results = $DB->get_recordset_sql($sql, $params);
        $instances = array();
        foreach ($results as $result) {
            array_push($instances, new course_module_competency(0, $result));
        }
        $results->close();

        return $instances;
    }
public static function list_course_module_competencies ( $ cmid ) { global $ DB ; $ sql = 'SELECT coursemodcomp.*
                  FROM {' . self :: TABLE . '} coursemodcomp
                  JOIN {' . competency :: TABLE . '} comp
                    ON coursemodcomp.competencyid = comp.id
                 WHERE coursemodcomp.cmid = ?
                 ORDER BY coursemodcomp.sortorder ASC' ; $ params = array ( $ cmid ) ; $ results = $ DB -> get_recordset_sql ( $ sql , $ params ) ; $ instances = array ( ) ; foreach ( $ results as $ result ) { array_push ( $ instances , new course_module_competency ( 0 , $ result ) ) ; } $ results -> close ( ) ; return $ instances ; }
List the course_module_competencies in this course module.

@param int $cmid The course module id
@return course_module_competency[]
List the course_module_competencies in this course module .