From 75a8ba5461a6a9ec9da9ea3a007cb431a8ff6368 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Tue, 1 Jun 2010 13:01:20 +0000 Subject: [PATCH] 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. --- mod/wiki/lib.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mod/wiki/lib.php b/mod/wiki/lib.php index d2cacf1fc86..55990ee3136 100644 --- a/mod/wiki/lib.php +++ b/mod/wiki/lib.php @@ -367,11 +367,13 @@ function wiki_scale_used($wikiid, $scaleid) { function wiki_scale_used_anywhere($scaleid) { global $DB; - if ($scaleid and $DB->record_exists('wiki', array('grade', $scaleid))) { - return true; - } else { - return false; - } + //if ($scaleid and $DB->record_exists('wiki', array('grade' => -$scaleid))) { + // return true; + //} else { + // return false; + //} + + return false; } /**