o365-moodle icon indicating copy to clipboard operation
o365-moodle copied to clipboard

error when submitting a onenote assignment containing an image

Open SYoung3000 opened this issue 9 months ago • 0 comments

We've had a report from a customer who has observed a replicatable bug - this has occured on 4.2 and 4.5 with various releases of the onenote submission plugin, though we've only recently identified how to replicate issue on the latest release of onenote.

Broadly it appears that when we submit to an assignment and it contains text, all is fine. When the submission contains an image, we receive the following error.

Note that this only happens when trying to view the submission. When the student tries to edit their submission, it's fine.

Microsoft OneNote local_onenote 4.5.1 2024100705

OneNote submissions assignsubmission_onenote 4.5.1 2024100705

Exception - count(): Argument #1 ($value) must be of type Countable|array, string given More information about this error Debug info: Error code: generalexceptionmessage×Dismiss this notification Stack trace: line 1029 of /local/onenote/classes/api/base.php: TypeError thrown line 1029 of /local/onenote/classes/api/base.php: call to count() line 695 of /local/onenote/classes/api/base.php: call to local_onenote\api\base->create_postdata_from_folder() line 806 of /local/onenote/classes/api/base.php: call to local_onenote\api\base->prepare_submission_postdata() line 43 of /local/onenote/onenote_actions.php: call to local_onenote\api\base->get_page()

SYoung3000 avatar Mar 07 '25 15:03 SYoung3000