From 68c8a5deb83375569f315057b049e018345baa02 Mon Sep 17 00:00:00 2001 From: Artem Andreev Date: Sat, 22 Dec 2012 15:42:56 +0400 Subject: [PATCH] Fixed #29 issues with attforblock_scale_used_anywhere and attforblock_scale_used. --- lib.php | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/lib.php b/lib.php index 3abf9a5..bb6e791 100644 --- a/lib.php +++ b/lib.php @@ -420,13 +420,30 @@ function attforblock_get_participants($attforblockid) { return false; } +/** + * This function returns if a scale is being used by one attendance + * it it has support for grading and scales. Commented code should be + * modified if necessary. See book, glossary or journal modules + * as reference. + * + * @param int $attforblockid + * @param int $scaleid + * @return boolean True if the scale is used by any attendance + */ function attforblock_scale_used ($attforblockid, $scaleid) { -//This function returns if a scale is being used by one attforblock -//it it has support for grading and scales. Commented code should be -//modified if necessary. See forum, glossary or journal modules -//as reference. - - $return = false; + return false; +} + +/** + * Checks if scale is being used by any instance of attendance + * + * This is used to find out if scale used anywhere + * + * @param int $scaleid + * @return bool true if the scale is used by any book + */ +function attforblock_scale_used_anywhere($scaleid) { + return false; } /**