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

Bulk download from Issued Certificates page does not work #229

Closed logan-reynolds closed 4 years ago

logan-reynolds commented 5 years ago

When viewing the Issued Certificates tab in an existing mod_simplecertificate instance, checking one or more boxes on the left-hand side, and clicking either "Download in Excel format" or "Download in text format", the page just redirects back to the same screen and no download prompt occurs. I do notice that when clicking "Download in ODS format" I get a download prompt, however the following error message is present in the downloaded file instead of the simplecertificate text, so this may be one place to start looking for the source of this error:

Notice: Undefined variable: ro6w in /var/www/html/MOODLE_34_STABLE/mod/simplecertificate/locallib.php on line 2110

This issue appears to affect at least the current Moodle 3.4 and 3.5 versions 2018082000 of mod_certificate currently published on Moodle.org.

Moodle Version(s) Moodle 3.4, 3.5

To Reproduce Steps to reproduce the behavior:

  1. Install latest version 2018082000 for Moodle 3.4 or 3.5 of mod_simplecertificate from Moodle.org
  2. Create a mod_simplecertificate instance within a course that has one or more test student(s)
  3. Login as the test student(s) and click the mod_simplecertificate instance to be granted the certificate
  4. Login as course instructor / Site Administrator and click the mod_simplecertificate instance
  5. Click the Issued certificates tab
  6. Check at least one (or more) boxes on the left-hand side
  7. Click either "Download in ODS format", "Download in Excel format", or "Download in text format" -- ODS format will result in a download prompt appearing and a document downloading, but when opened will show the above mentioned error about an undefined variable -- Excel/text format will result in a redirect back to that same page with no download prompt

Expected behavior Clicking either "Download in ODS format", "Download in Excel format", or "Download in text format" should cause a download prompt and allow the awarded certificate(s) to be viewed correctly in the corresponding document format.

Desktop (please complete the following information):