I was having the same problem with Moodle version 2.9 using Lams Moodle plugin 20150220
I use this as workaround:
Downgrade Moodle Lams plugin to 20120322 (Moodle 2.3)
Edit mod/lamslesson/mod_form.php
Comment out lines 32 and 33
// $PAGE->requires->yui2_lib('yahoo-dom-event');
// $PAGE->requires->yui2_lib('treeview');
Replace line 131 and 132
$treecomponent .= html_writer::tag('script', 'var tree = new YAHOO.widget.TreeView("treeDiv",['. $lds .']);tree.getNodeByIndex(1).expand(true);tree.getNodeByIndex(2).expand(true);', array('type' => 'text/javascript'));
$treecomponent .= html_writer::tag('script', 'var tree = new YAHOO.widget.TreeView("treeDiv",['. $lds .']);tree.getNodeByIndex(1).expand(true);tree.getNodeByIndex(2).expand(true);', array('type' => 'text/javascript'));
$treecomponent .= html_writer::script('', $CFG->wwwroot.'/mod/lamslesson/tree.js');
with this line (taken from Moodle Lams plugin 20150220):
$treecomponent .= html_writer::tag('script', 'YUI().use("yui2-treeview","yui2-dom-event", function(Y) {var YAHOO = Y.YUI2; var tree = new YAHOO.widget.TreeView("treeDiv",['. $lds .']);tree.getNodeByIndex(1).expand(true);tree.getNodeByIndex(2).expand(true);tree.render();tree.subscribe("clickEvent",function(oArgs) {selectSequence(oArgs.node.data.id, oArgs.node.label);})});', array('type' => 'text/javascript'));
Now Open Lesson link and Create a new Lams Lesson works!
I also had to alter the index.php file.I attach the 2 altered files.
Posted by George Avgeris