Skip to content
Browse files

MDL-26119 fixing regression caused by previous merge in PULL-294

We can not use empty() on function directly, the PHP docs were incorrect.
  • Loading branch information...
1 parent da622b4 commit d83bad412aab54ee7240c22b2e885ad8deed3d91 @skodak skodak committed Feb 15, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 mod/quiz/locallib.php
View
10 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;

0 comments on commit d83bad4

Please sign in to comment.
Something went wrong with that request. Please try again.