-
Bug
-
Resolution: Fixed
-
Blocker
-
2.0.6, 2.1.3, 2.2
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
MDL-30460-master -
Easy
-
Found this while testing MDLQA-1395 (A student can add images to a wiki). I uploaded an image file in the wiki Files tab. Then I went to edit a Creole-formatted wiki page, and the image file would not appear in the drop down for inserting an image. After some investigation, I found that the cause was that the file extension of the image file was in upper case. I then tried an image file with a lower-case file extension and that worked.
This looks very similar to MDL-30165 except that it affects a different area. The problem appears to be in mod/wiki/edit_form.php with this condition in the definition method:
if (preg_match('#'.$ext.'$#', $filename)) {
The fix for MDL-30165 fixed a similar issue in repository/lib.php by change the preg_match pattern to '#'.$ext.'$#i' (Note the addition of 'i'.)
- Testing discovered
-
MDLQA-1395 CLONE - A student can add images to a wiki
- Passed