original_string: public static function list_courses_min($competencyid) {
          global $DB;
  
          $results = $DB->get_records_sql('SELECT course.id as id, course.visible as visible
                                             FROM {' . self::TABLE . '} coursecomp
                                             JOIN {course} course
                                               ON coursecomp.courseid = course.id
                                            WHERE coursecomp.competencyid = ? ', array($competencyid));
  
          return $results;
      }
code: public static function list_courses_min($competencyid) {
          global $DB;
  
          $results = $DB->get_records_sql('SELECT course.id as id, course.visible as visible
                                             FROM {' . self::TABLE . '} coursecomp
                                             JOIN {course} course
                                               ON coursecomp.courseid = course.id
                                            WHERE coursecomp.competencyid = ? ', array($competencyid));
  
          return $results;
      }
code_tokens: public static function list_courses_min ( $ competencyid ) { global $ DB ; $ results = $ DB -> get_records_sql ( 'SELECT course.id as id, course.visible as visible
                                             FROM {' . self :: TABLE . '} coursecomp
                                             JOIN {course} course
                                               ON coursecomp.courseid = course.id
                                            WHERE coursecomp.competencyid = ? ' , array ( $ competencyid ) ) ; return $ results ; }
docstring: Return the course IDs and visible flags that include this competency.
  
  Only the ids and visible flag are returned, for the full records use list_courses.
  
  @param int $competencyid The competency id
  @return array containing courseid and visible.
docstring_tokens: Return the course IDs and visible flags that include this competency .