Skip to content

Commit

Permalink
StudentQuiz: fix a minor code #812359
Browse files Browse the repository at this point in the history
  • Loading branch information
Khoa Nguyen Dang authored and Khoa Nguyen committed Aug 5, 2024
1 parent 9e03cb7 commit 5d38d47
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions classes/task/send_digest_notification_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function execute() {

foreach ($recipients as $userid => $datas) {
$contentdata = [
'recipientname' => $datas[0]['messagedata']->recepientname,
'recipientname' => $datas[0]->messagedata->recepientname,
'digesttype' => $studentquiz->digesttype == 1 ? $dailystring : $weeklystring,
'modulename' => $studentquiz->name,
'activityurl' => (new moodle_url('/mod/studentquiz/view.php',
Expand All @@ -87,11 +87,11 @@ public function execute() {
$total++;
$contentdata['notifications'][] = [
'seq' => $total,
'timestamp' => $data['messagedata']->timestamp,
'questionname' => $data['messagedata']->questionname,
'actiontype' => $data['eventname'],
'actorname' => $data['messagedata']->actorname,
'isstudent' => $data['messagedata']->isstudent,
'timestamp' => $data->messagedata->timestamp,
'questionname' => $data->messagedata->questionname,
'actiontype' => $data->eventname,
'actorname' => $data->messagedata->actorname,
'isstudent' => $data->messagedata->isstudent,
];
}
$fullmessagehtml = $renderer->render_from_template('mod_studentquiz/digest_email_notification', $contentdata);
Expand All @@ -111,7 +111,7 @@ public function execute() {

message_send($eventdata);
$messagetotal++;
mtrace("Notification to {$datas[0]['messagedata']->recepientname} has been sent", 1);
mtrace("Notification to {$datas[0]->messagedata->recepientname} has been sent", 1);
}
}

Expand Down

0 comments on commit 5d38d47

Please sign in to comment.