jcrodriguez-dis / moodle-mod_vpl

Virtual Programming Lab for Moodle (Module)
GNU General Public License v3.0
98 stars 85 forks source link

Submission download not working #98

Closed t-schroeder closed 3 years ago

t-schroeder commented 4 years ago

When I download submission via the "Download submissions" or "Download all submissions" buttons I get a zip file of size 0KB which cannot be opened. When I turn on Debugging in Moodle I get lots of "Invalid or uninitialized Zip object" warnings.

t-schroeder commented 4 years ago

I'm not sure on which branch the fix should go. So I added pull requests for both the v3.3.6 and v3.4dev branches.

t-schroeder commented 4 years ago

The cause of the error was that tempnam() already generates a file so you need the ZipArchive::OVERWRITE flag.

t-schroeder commented 3 years ago

Closing this since a fix has been merged.