original_string: public static function get_course_competency($courseid, $competencyid) {
          global $DB;
  
          $sql = 'SELECT crscomp.*
                    FROM {' . self::TABLE . '} crscomp
                   WHERE crscomp.courseid = ? AND crscomp.competencyid = ?';
          $params = array($courseid, $competencyid);
  
          $result = $DB->get_record_sql($sql, $params);
          if (!$result) {
              throw new coding_exception('The competency does not belong to this course: ' . $competencyid . ', ' . $courseid);
          }
  
          return new course_competency(0, $result);
      }
code: public static function get_course_competency($courseid, $competencyid) {
          global $DB;
  
          $sql = 'SELECT crscomp.*
                    FROM {' . self::TABLE . '} crscomp
                   WHERE crscomp.courseid = ? AND crscomp.competencyid = ?';
          $params = array($courseid, $competencyid);
  
          $result = $DB->get_record_sql($sql, $params);
          if (!$result) {
              throw new coding_exception('The competency does not belong to this course: ' . $competencyid . ', ' . $courseid);
          }
  
          return new course_competency(0, $result);
      }
code_tokens: public static function get_course_competency ( $ courseid , $ competencyid ) { global $ DB ; $ sql = 'SELECT crscomp.*
                    FROM {' . self :: TABLE . '} crscomp
                   WHERE crscomp.courseid = ? AND crscomp.competencyid = ?' ; $ params = array ( $ courseid , $ competencyid ) ; $ result = $ DB -> get_record_sql ( $ sql , $ params ) ; if ( ! $ result ) { throw new coding_exception ( 'The competency does not belong to this course: ' . $ competencyid . ', ' . $ courseid ) ; } return new course_competency ( 0 , $ result ) ; }
docstring: Get the specified course_competency in this course.
  
  @param int $courseid The course id
  @param int $competencyid The competency id
  @return course_competency
docstring_tokens: Get the specified course_competency in this course .