original_string: public static function get_least_proficient_competencies_for_course($courseid, $skip = 0, $limit = 100) {
          static::require_enabled();
          $coursecontext = context_course::instance($courseid);
  
          if (!has_any_capability(array('moodle/competency:coursecompetencyview', 'moodle/competency:coursecompetencymanage'),
                  $coursecontext)) {
              throw new required_capability_exception($coursecontext, 'moodle/competency:coursecompetencyview', 'nopermissions', '');
          }
  
          return user_competency_course::get_least_proficient_competencies_for_course($courseid, $skip, $limit);
      }
code: public static function get_least_proficient_competencies_for_course($courseid, $skip = 0, $limit = 100) {
          static::require_enabled();
          $coursecontext = context_course::instance($courseid);
  
          if (!has_any_capability(array('moodle/competency:coursecompetencyview', 'moodle/competency:coursecompetencymanage'),
                  $coursecontext)) {
              throw new required_capability_exception($coursecontext, 'moodle/competency:coursecompetencyview', 'nopermissions', '');
          }
  
          return user_competency_course::get_least_proficient_competencies_for_course($courseid, $skip, $limit);
      }
code_tokens: public static function get_least_proficient_competencies_for_course ( $ courseid , $ skip = 0 , $ limit = 100 ) { static :: require_enabled ( ) ; $ coursecontext = context_course :: instance ( $ courseid ) ; if ( ! has_any_capability ( array ( 'moodle/competency:coursecompetencyview' , 'moodle/competency:coursecompetencymanage' ) , $ coursecontext ) ) { throw new required_capability_exception ( $ coursecontext , 'moodle/competency:coursecompetencyview' , 'nopermissions' , '' ) ; } return user_competency_course :: get_least_proficient_competencies_for_course ( $ courseid , $ skip , $ limit ) ; }
docstring: Get the most often not completed competency for this course.
  
  Requires moodle/competency:coursecompetencyview capability at the course context.
  
  @param int $courseid The course id
  @param int $skip The number of records to skip
  @param int $limit The max number of records to return
  @return competency[]
docstring_tokens: Get the most often not completed competency for this course .