learnweb/moodle-mod_ratingallocate

CSV/Excel download drops error

stefan612 opened this issue · 5 comments

Hello, when trying to download the userlist i get folling error:
Fehler in der Kodierung gefunden, den nur ein Programmierer korrigieren kann: Output can not be buffered before instantiating table_dataformat_export_format

DebugINFO:
Default exception handler: Fehler in der Kodierung gefunden, den nur ein Programmierer korrigieren kann: Output can not be buffered before instantiating table_dataformat_export_format Debug: \nError code: codingerror\n* line 1731 of /lib/tablelib.php: coding_exception thrown\n* line 187 of /lib/tablelib.php: call to table_dataformat_export_format->__construct()\n* line 171 of /lib/tablelib.php: call to flexible_table->export_class_instance()\n* line 70 of /mod/ratingallocate/classes/ratings_and_allocations_table.php: call to flexible_table->is_downloading()\n* line 651 of /mod/ratingallocate/renderer.php: call to mod_ratingallocate\ratings_and_allocations_table->__construct()\n* line 531 of /mod/ratingallocate/locallib.php: call to mod_ratingallocate_renderer->ratings_table_for_ratingallocate()\n* line 727 of /mod/ratingallocate/locallib.php: call to ratingallocate->process_action_show_ratings_and_alloc_table()\n* line 61 of /mod/ratingallocate/view.php: call to ratingallocate->handle_view()\n, referer:

image

Hey,

thanks for the report. Unfortunately, I couldn't reproduce the error yet.

It would be very helpful to know your moodle version and plugin version. What theme do you use? Could you provide a backup of this activity, so we can try to reproduce the error?

Best regards,
Justus

Hello Justus,
we have moodle Version 3.5.11 running and the latest Version of ratingallocate.
We have a custom theme…. But for testing Purpose i tried it with Standard boost theme as well - without success.
Maybe it has something to do with fileencoding.
It is utf-8 on our System.

Hey,

Strange, it worked for me with Moodle 3.5.11 as well.
"Fehler in der Kodierung gefunden" is a pretty bad translation of the english "Coding error detected", so the error isn't meant to say that there is an error with the encoding.

Could you please provide a backup of the activity? That would be very helpful in trying to reproduce the error.

Best regards,
Justus

Ahhh.. just found out that other things for downloading Xls (or other formats) do not work neither.
So... i think it is not a Problem with ratingallocate.
I get exactly the same like these people when trying to download the reports:
https://moodle.org/mod/forum/discuss.php?d=362971

Thanks for the notice!

It seems that somehow, on your moodle instance, some output is generated before <moodleroot>/lib/tablelib.php Line 1731, which should not happen when downloading a file.

Since it doesn't seem to be a problem with ratingallocate, I'll close this issue.
Justus