From d83bad412aab54ee7240c22b2e885ad8deed3d91 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 15 Feb 2011 15:06:24 +0100 Subject: [PATCH] MDL-26119 fixing regression caused by previous merge in PULL-294 We can not use empty() on function directly, the PHP docs were incorrect. --- mod/quiz/locallib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index a27bc32a34755..06914cdfdad15 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -1002,7 +1002,7 @@ function quiz_get_combined_reviewoptions($quiz, $attempts, $context) { * * @param stdClass $a associative array of replaceable fields for the templates * - * @return bool|string result of events_triger + * @return bool */ function quiz_send_confirmation($a) { @@ -1034,7 +1034,7 @@ function quiz_send_confirmation($a) { $eventdata->contexturl = $a->quizurl; $eventdata->contexturlname = $a->quizname; - return message_send($eventdata); + return (bool)message_send($eventdata); // returns message id or false } /** @@ -1043,7 +1043,7 @@ function quiz_send_confirmation($a) { * @param object $recipient user object of the intended recipient * @param stdClass $a associative array of replaceable fields for the templates * - * @return bool|string result of events_triger() + * @return bool */ function quiz_send_notification($recipient, $a) { @@ -1075,7 +1075,7 @@ function quiz_send_notification($recipient, $a) { $eventdata->contexturl = $a->quizreviewurl; $eventdata->contexturlname = $a->quizname; - return message_send($eventdata); + return (bool)message_send($eventdata); } /** @@ -1154,7 +1154,7 @@ function quiz_send_notification_emails($course, $quiz, $attempt, $context, $cm) // send confirmation if required if ($sendconfirm) { // send the email and update stats - switch (!empty(quiz_send_confirmation($a))) { + switch (quiz_send_confirmation($a)) { case true: $emailresult['good']++; break;