mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
NOBUG wiki: Fixing wiki_scale_used_anywhere()
Firstly, the conditions array was passed incorrectly. Secondly, the scale id would be probably saved as negative integer. Thirdly, the column does not exist in the new wiki yet.
This commit is contained in:
parent
5cca21a665
commit
75a8ba5461
1 changed files with 7 additions and 5 deletions
|
@ -367,11 +367,13 @@ function wiki_scale_used($wikiid, $scaleid) {
|
||||||
function wiki_scale_used_anywhere($scaleid) {
|
function wiki_scale_used_anywhere($scaleid) {
|
||||||
global $DB;
|
global $DB;
|
||||||
|
|
||||||
if ($scaleid and $DB->record_exists('wiki', array('grade', $scaleid))) {
|
//if ($scaleid and $DB->record_exists('wiki', array('grade' => -$scaleid))) {
|
||||||
return true;
|
// return true;
|
||||||
} else {
|
//} else {
|
||||||
return false;
|
// return false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue