ngandrass / moodle-quiz_archiver

Archives quiz attempts as PDF and HTML files for long-term storage independent of Moodle
GNU General Public License v3.0
5 stars 3 forks source link

[Request]: Changing GET request length #14

Closed braunJ42 closed 4 months ago

braunJ42 commented 4 months ago

Description

When trying to archive a bigger quiz (300+ attempts) the final GET request gets too long (10.000+) as it includes all the attempt-IDs of the quiz, so it crashes and ends with an HTTP 414 error.

Is there a chance that this could be changed in the future?

Additional resources and references

No response

ngandrass commented 4 months ago

Hi,

thanks for your report. Sounds like it is time to create a test quiz with a lot of attempts ;)

I assume you are talking about the final step of fetching the metadata for all attempts? If so, it should be easy to paginate the attempt metadata queries :)

braunJ42 commented 4 months ago

Hi,

thanks for your quick response :)

Yes, it's the final step of fetching the metadata for all attempts. And as we have even bigger quizzes (900+ attempts) it would be awesome if we could get it to work somehow :)

ngandrass commented 4 months ago

Ok, it's on my list now. I'll check if I can easily create a quiz with that many attempts programmatically and see what I can do :)

I'll come back to you within the next few days.

ngandrass commented 4 months ago

Attempt metadata is now processed in batches of 100 attempts, as per commit d4e45b4120b008639de026b08e5586bb7c804c3d.

Version 1.3.3 of the quiz archive worker was just released and includes this fix. You can simply update to the latest Docker image from Docker Hub. An upgrade of the Moodle plugin is not required.

For testing, I extended the quiz archiver reference course to include quizzes with 100, 250, 500, and 1000 attempts. All quizzes, even with 1000 attempts, were now exported correctly :tada:

Theoretically we can still encounter problems if the resulting quiz archive outgrows certain thresholds, such as the maximum file size your Moodle accepts. Please open another issue, if you encounter such problems.