bozoh / moodle-mod_simplecertificate

It's NOT RECOMMENDED to install version below 2.2.6 (MOODLE_31), due a security issues See more in README
17 stars 44 forks source link

Issued certificates tab - error #251

Closed goose2000 closed 2 years ago

goose2000 commented 2 years ago

Describe the bug When I visit the Issued certificates tab (and no certificates have been issued yet), I see this error :

notify() is removed, please use $OUTPUT->notification() instead

Moodle Version(s) Moodle 3.9

To Reproduce Steps to reproduce the behavior:

  1. Create a new course with Simple Certificate activity.
  2. Click on on the activity from the course page, and then visit "Issued certificates" tab.
  3. Should see the error :

Coding error detected, it must be fixed by a programmer: notify() is removed, please use $OUTPUT->notification() instead

Expected behavior

This looks like a core change that needs updating for S.C. Expect to see a message - No certificates have been issued.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information): NA

Additional context

I am an administrator role when this error is shown.

goose2000 commented 2 years ago

Easy to update locallib.php

start at line 1860

if (!$users) { // notify(get_string('nocertificatesissued', 'simplecertificate')); $nocerts = get_string('nocertificatesissued', 'simplecertificate'); echo $OUTPUT->notification($nocerts, $classes='test'); echo $OUTPUT->footer(); exit(); }