Hi,
I do not understand widgets but sort of understand your issue. And I do not work very much with code.
You are saying that a widget works in a course HTML block and with the editor but not in Lesson. What version of Moodle are you using?
My guess is that something is cleaning up the code. Have you tried inserting it into say a quiz module multiple choice question or even a quiz module label question type? If it works there then it is a Lesson module issue.
We had a java script once that we could only insert via MySQL into a resource page. If we tried to edit the inserted page (not the code), something helpfully cleaned up the script so it would not work.
Chris
Lesson
Widgets in Lesson Modules
This discussion has been locked so you can no longer reply to it.