IITBombayWeb / moodle-quiz_downloadsubmissions

Moodle Quiz Report Plugin for downloading essay submissions.
5 stars 13 forks source link

Download fails with "This file is no longer required" when debugging enabled in Moodle 4.2 #22

Open leonstr opened 1 month ago

leonstr commented 1 month ago

Steps to reproduce issue

  1. Set up Moodle 4.2 site and install quiz_downloadsubmissions.
  2. Change Debug messages to DEVELOPER and Display debug messages to Yes.
  3. Create a course, enrol a student, add a quiz with an essay question.
  4. As the student attempt the quiz.
  5. As a site admin go to the course page and click on the quiz.
  6. Click on the Results tab and select Download essay submissions from the drop-down menu.
  7. Click Download.

Expect results

The zip file is downloaded.

Actual results

A page of warning messages:

This file is no longer required in Moodle 4.2+. Please do not include/require it.

    line 25 of /mod/quiz/report/attemptsreport.php: call to debugging()
    line 32 of /mod/quiz/report/downloadsubmissions/report.php: call to require_once()
    line 75 of /mod/quiz/report.php: call to include_once()

Class 'quiz_attempts_report' has been renamed for the autoloader and is now deprecated. Please use 'mod_quiz\local\reports\attempts_report' instead.

    line 153 of /lib/classes/component.php: call to debugging()
    line 44 of /mod/quiz/report/downloadsubmissions/report.php: call to core_component::classloader()
    line 75 of /mod/quiz/report.php: call to include_once()

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/form/classes/util.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2399

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2401

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2402

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2403

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2214

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2218

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2241

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2264

Warning: Cannot modify header information - headers already sent by (output started at /var/www/m42.box.ideapad/moodle/lib/weblib.php:3424) in /var/www/m42.box.ideapad/moodle/lib/filelib.php on line 2312
PKk^�X��Wx ZQ1 - Essay 1/student1 - Student One - Attempt1 - 2024-05-23 11_50 am/Attempt1_textresponseThe quick PKk^�Xoq�% Q1 - Essay 1/Question textEssay 1 PK?k^�X��Wx Z��Q1 - Essay 1/student1 - Student One - Attempt1 - 2024-05-23 11_50 am/Attempt1_textresponsePK?k^�Xoq�% ���Q1 - Essay 1/Question textPK��

Using versions: Moodle 4.2.7+ (Build: 20240516) and quiz_downloadsubmissions 2020100700.

steveorulez commented 1 week ago

Hello, i just had the same problem on Moodle 4.3.

in file reports.php line 32 comment/delete //require_once($CFG->dirroot . '/mod/quiz/report/attemptsreport.php'); line 44 change from: class quiz_downloadsubmissions_report extends quiz_attempts_report to: class quiz_downloadsubmissions_report extends mod_quiz\local\reports\attempts_report

christian