Steps to reproduce:
- Create a lesson activity
- Add question by clicking on "Add a question page"
- Select "Multichoice" question
- Click on image icon in "Answer 1" or "Answer 2" editor
- You will see following error in apache log.
[Thu Nov 27 16:22:22.148856 2014] [:error] [pid 1744] [client 127.0.0.1:41026] Default exception handler: A required parameter (pageid) was missing Debug: \nError code: missingparam\n* line 463 of /lib/setuplib.php: moodle_exception thrown\n* line 548 of /lib/moodlelib.php: call to print_error()\n* line 31 of /mod/lesson/editpage.php: call to required_param()\n, referer: http://rajesh.in.moodle.com/im/mod/lesson/editpage.php
Can also be reproduced by running behat with --name "In a lesson activity, teacher can add embedded images in questions answers and responses" and looking at error log