moodleou / moodle-mod_ouwiki

Alternative wiki module for Moodle 2 (designed for use in teaching and learning)
36 stars 32 forks source link

Cannot export excel #81

Closed dsoini closed 5 years ago

dsoini commented 5 years ago

I'm having trouble with the download table data as Excel under the Participation by user page. All the other download types work except Excel. Excel works as an export format for other things such as grades. When I download excel I get a file not found error in the browser and in the logs the error reads:

Default exception handler: Exception - The sheet's name ("Participation") is invalid. It did not respect these rules:
 - It should be unique Debug: 
Error code: generalexceptionmessage
* line 137 of /lib/spout/src/Spout/Writer/Common/Sheet.php: Box\Spout\Writer\Exception\InvalidSheetNameException thrown
* line 87 of /lib/spout/src/Spout/Writer/Common/Sheet.php: call to Box\Spout\Writer\Common\Sheet->throwIfNameIsInvalid()
* line 89 of /lib/classes/dataformat/spout_base.php: call to Box\Spout\Writer\Common\Sheet->setName()
* line 1782 of /lib/tablelib.php: call to core\dataformat\spout_base->start_sheet()
* line 187 of /mod/ouwiki/participation_table.php: call to table_dataformat_export_format->output_headers()
* line 757 of /lib/tablelib.php: call to ouwiki_participation_table->start_output()
* line 1021 of /mod/ouwiki/renderer.php: call to flexible_table->add_data()
* line 104 of /mod/ouwiki/participation.php: call to mod_ouwiki_renderer->ouwiki_render_participation_list()

UPDATE: I discovered that if I remove the start_output function from mod/ouwiki/participation_table.php this problem goes away.

jason-platts commented 5 years ago

Thanks for reporting this (many moths ago, sorry) - a fix will be in our next release (September).