Skip to content

Commit

Permalink
Merge branch 'MDL-58754-31' of git://github.com/andrewnicols/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_31_STABLE
  • Loading branch information
stronk7 committed May 3, 2017
2 parents 315214f + 6adcb47 commit 2588195
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion competency/classes/competency.php
Expand Up @@ -676,7 +676,8 @@ protected function validate_scaleconfiguration($value) {
public static function share_same_framework(array $ids) {
global $DB;
list($insql, $params) = $DB->get_in_or_equal($ids);
return $DB->count_records_select(self::TABLE, "id $insql", $params, "COUNT(DISTINCT(competencyframeworkid))") == 1;
$sql = "SELECT COUNT('x') FROM (SELECT DISTINCT(competencyframeworkid) FROM {" . self::TABLE . "} WHERE id {$insql}) f";
return $DB->count_records_sql($sql, $params) == 1;
}

/**
Expand Down

0 comments on commit 2588195

Please sign in to comment.