bozoh / moodle-mod_simplecertificate

It's NOT RECOMMENDED to install version below 2.2.6 (MOODLE_31), due a security issues See more in README
17 stars 44 forks source link

Leaving Enable Certificate Back page set to NO results in error in Moodle 3.5 #213

Closed heather-williams closed 4 years ago

heather-williams commented 5 years ago

Describe the bug On Moodle 3.5.2 if you add a simplecertificate and leave Enable Certificate Back page set to NO and try to save it results in this error:

Exception - Argument 1 passed to file_get_all_files_in_draftarea() must be of the type integer, null given, called in [dirroot]/lib/form/filemanager.php on line 336

More information about this error

×Debug info: 
Error code: generalexceptionmessage
×Stack trace:
line 767 of /lib/filelib.php: TypeError thrown
line 336 of /lib/form/filemanager.php: call to file_get_all_files_in_draftarea()
line 580 of /lib/formslib.php: call to MoodleQuickForm_filemanager->validateSubmitValue()
line 526 of /lib/formslib.php: call to moodleform->validate_defined_fields()
line 636 of /lib/formslib.php: call to moodleform->is_validated()
line 1096 of /course/moodleform_mod.php: call to moodleform->get_data()
line 325 of /mod/simplecertificate/mod_form.php: call to moodleform_mod->get_data()
line 150 of /course/modedit.php: call to mod_simplecertificate_mod_form->get_data()

Moodle Version(s) 3.5.2

To Reproduce Steps to reproduce the behavior: on 3.5.2 site add simplecertificate. set Enable Certificate Back page set to NO and save.

heather-williams commented 5 years ago

If you set to yes and then just don't upload a background image it saves without error.

bozoh commented 4 years ago

can't reproduce in moodle 3.9dev version