diff --git a/form/sectionfilemanager.php b/form/sectionfilemanager.php index cadcda41..13c07d7b 100644 --- a/form/sectionfilemanager.php +++ b/form/sectionfilemanager.php @@ -136,6 +136,11 @@ public function validateSubmitValue($value) { $toolbox = \format_grid\toolbox::get_instance(); try { $toolbox->setup_displayed_image($sectionimage, $file, $course->id, $sectionid, $format); + } catch (\moodle_exception $me) { + if (!defined('BEHAT_SITE_RUNNING')) { + $lock->release(); + } + $failure = $me->getMessage(); } catch (\Exception $e) { if (!defined('BEHAT_SITE_RUNNING')) { $lock->release(); diff --git a/lang/en/format_grid.php b/lang/en/format_grid.php index 7410b80b..8f197628 100644 --- a/lang/en/format_grid.php +++ b/lang/en/format_grid.php @@ -158,7 +158,7 @@ $string['originalheightempty'] = 'Original height is empty - {$a}'; $string['originalwidthempty'] = 'Original width is empty - {$a}'; $string['noimageinformation'] = 'Image information is empty - {$a}'; -$string['reporterror'] = 'Please use the error details and the information contained in the php.log to understand the nature of why the uploaded image cannot be used'; +$string['reporterror'] = 'Please use the error information to understand the nature of why the uploaded image cannot be used'; // Privacy. $string['privacy:nop'] = 'The Grid format stores lots of settings that pertain to its configuration. None of the settings are related to a specific user. It is your responsibilty to ensure that no user data is entered in any of the free text fields. Setting a setting will result in that action being logged within the core Moodle logging system against the user whom changed it, this is outside of the formats control, please see the core logging system for privacy compliance for this. When uploading images, you should avoid uploading images with embedded location data (EXIF GPS) included or other such personal data. It would be possible to extract any location / personal data from the images. Please examine the code carefully to be sure that it complies with your interpretation of your privacy laws. I am not a lawyer and my analysis is based on my interpretation. If you have any doubt then remove the format forthwith.';