Skip to content

Commit

Permalink
DEF-2908: Fixing pipeline error
Browse files Browse the repository at this point in the history
  • Loading branch information
ojnadjarm committed Aug 22, 2024
1 parent 76f1331 commit 9043e54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/task/issue_certificates_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ public function execute() {
}

foreach ($customcerts as $customcert) {

// Check if the certificate is hidden, quit early.
$cm = get_course_and_cm_from_instance($customcert->id, 'customcert', $customcert->course)[1];
if (!$cm->visible) {
continue;
}

// Do not process an empty certificate.
$sql = "SELECT ce.*
FROM {customcert_elements} ce
Expand Down
2 changes: 1 addition & 1 deletion tests/email_certificate_task_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ public function test_email_certificates_others(): void {
* Tests the email certificate task when the certificate is not visible.
*
* @covers \mod_customcert\task\issue_certificates_task
* @covers \mod_customcert\task\email_certificate_task
* @covers \mod_customcert\task\email_certificate_task
*/
public function test_email_certificates_students_not_visible(): void {
global $DB;
Expand Down

0 comments on commit 9043e54

Please sign in to comment.