learnweb/moodle-mod_ratingallocate

Database exception when submitting explanations with more than 255 chars

Closed this issue · 2 comments

abias commented

Currently, the explanation field is limited to 255 chars in the DB (see https://github.com/learnweb/moodle-mod_ratingallocate/blob/master/db/install.xml#L39) but this limitation is not enforced in the UI (see https://github.com/learnweb/moodle-mod_ratingallocate/blob/master/form_modify_choice.php#L77-L79).

That way, if a user currently submits an explanation which is longer than 255 chars, he will trigger a DB write exception.

The solution would be to enforce the limit of 255 chars in the UI as well if this limit is really intended.

Hallo @abias,
The change to a text field in #222 has been merged in (commit 2c08c5c), so the new version should support longer explanations now.

abias commented

That's great!
Thank you very much, @DrCuriosity !