MDL-35851 Lesson module: fix page order id for import questions. Add upgrade script to fix lesson pages corrupted links
MDL-35851 lesson mod: separate chained ifs to individual validation.
make database upgrade as one continues process
MDL-35851: Add page validation for multiple first and last page.
Modify upgrading db script
MDL-35851 Lesson Mod: Update validation test through DB query instead of loop