-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Answer sheet evaluation for the offlinequiz-plugin failed : division by zero #237
Comments
Hello, The error "Division by 0" seems to be related to the pdf file. Indeed, I converted the file from pdf to png and the evaluation is working. Regards, Olivier |
Hello, I have the same issue trying to import PDF for processing. PDF is well uploaded to the server but it fails when processed :
It's working well with png files. But I would prefere to be able to use pdf. Thanks for support, |
Hi @opodeur and @helper1276, Thanks, |
Hi mwreichel, |
Hello, Thanks, |
Hi @opodeur, @helper1276, All the best, |
Hi, |
Hi,
I commented the line with “PDF” and the problem is resolved !
Thanks,
Olivier
De : univietw ***@***.***>
Envoyé : jeudi 23 mai 2024 18:03
À : academic-moodle-cooperation/moodle-mod_offlinequiz ***@***.***>
Cc : Olivier PODEUR ***@***.***>; Mention ***@***.***>
Objet : Re: [academic-moodle-cooperation/moodle-mod_offlinequiz] Answer sheet evaluation for the offlinequiz-plugin failed : division by zero (Issue #237)
ATTENTION: Ce courriel provient d'un émetteur externe. Soyez vigilant sur les liens ou les pièces jointes qu'il contient.
Hi,
i was looking a bit deeper into this issue.
First thanks to @opodeur<https://github.com/opodeur> and @helper1276<https://github.com/helper1276>, I checked your files and they seem to be working on our end, this includes the test system as well as So there is some difference between our and your system.
Sadly I don't even know exactly where in the code this division by zero happens since the backtrace doesn't say the line, only the function.
The good news is: I have some ideas what the problem might be.
After uploading the file to offlinequiz the pdf gets separated into page-images and then added to the queue. If this fails the pdf is still added as a whole file into the queue to display the error to the user.
My guess is that this conversion into subfiles fails, because Ubuntu blocks it because of a security bug in "convert" (the program converting the pdf into images) many years ago:
https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion/59193253#59193253
WARNING: YOU SHOULD ONLY DELETE/COMMENT THE LINE WITH "PDF", otherwise you may put your Server at risk!
It's the only thing you need for this problem to be resolved.
Can anybody of you check if this helps?
If this fixes the issue I will try to make a more appropriate feedback for server administrators.
—
Reply to this email directly, view it on GitHub<#237 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWAWQBBUUKHZDIMAR7P2VVLZDYHLBAVCNFSM6AAAAABCUODHYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGUYTINZWGU>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
The workaround solves the problem.
But our GS version is 10.02.1, a newer version of 9.24 where the vulnerability has been addressed. We shouldn’t have the problem (in stackoverflow : “if you have that or a newer version, you don't need the workaround anymore”).
What do you think ?
Olivier
De : univietw ***@***.***>
Envoyé : jeudi 23 mai 2024 18:03
À : academic-moodle-cooperation/moodle-mod_offlinequiz ***@***.***>
Cc : Olivier PODEUR ***@***.***>; Mention ***@***.***>
Objet : Re: [academic-moodle-cooperation/moodle-mod_offlinequiz] Answer sheet evaluation for the offlinequiz-plugin failed : division by zero (Issue #237)
ATTENTION: Ce courriel provient d'un émetteur externe. Soyez vigilant sur les liens ou les pièces jointes qu'il contient.
Hi,
i was looking a bit deeper into this issue.
First thanks to @opodeur<https://github.com/opodeur> and @helper1276<https://github.com/helper1276>, I checked your files and they seem to be working on our end, this includes the test system as well as So there is some difference between our and your system.
Sadly I don't even know exactly where in the code this division by zero happens since the backtrace doesn't say the line, only the function.
The good news is: I have some ideas what the problem might be.
After uploading the file to offlinequiz the pdf gets separated into page-images and then added to the queue. If this fails the pdf is still added as a whole file into the queue to display the error to the user.
My guess is that this conversion into subfiles fails, because Ubuntu blocks it because of a security bug in "convert" (the program converting the pdf into images) many years ago:
https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion/59193253#59193253
WARNING: YOU SHOULD ONLY DELETE/COMMENT THE LINE WITH "PDF", otherwise you may put your Server at risk!
It's the only thing you need for this problem to be resolved.
Can anybody of you check if this helps?
If this fixes the issue I will try to make a more appropriate feedback for server administrators.
—
Reply to this email directly, view it on GitHub<#237 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWAWQBBUUKHZDIMAR7P2VVLZDYHLBAVCNFSM6AAAAABCUODHYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMRXGUYTINZWGU>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Thank you for confirming that that's the issue. For all the other, I will change the code to make the error more clear. Thanks again. |
Hello,
The scheduled task failed with Division by zero error :
Execute scheduled task: Answer sheet evaluation for the offlinequiz-plugin (mod_offlinequiz\task\page_evaluation_task)
... started 20:22:02. Current memory use 24.3 MB.
Debugging increased temporarily due to faildelay of 60
job 5: evaluating /var/www/moodledata/temp/offlinequiz/import/1706728662589734444/Scae2-copie24013120140.pdf
... used 20 dbqueries
... used 0.029645919799805 seconds
Scheduled task failed: Answer sheet evaluation for the offlinequiz-plugin (mod_offlinequiz\task\page_evaluation_task),Division by zero
Backtrace:
Moodle [4.1.6+
Offline Quiz v4.1.2
PHP Version 8.0.30
Regards,
Olivier
The text was updated successfully, but these errors were encountered: