MDL-42429 mod_lesson: removed unnecessary conditional check causing PHP notice to display