Forum Problems Installing LAMS: Re: Problem to open Lams Lesson into Moodle


 
Search: 

2: Re: Problem to open Lams Lesson into Moodle
In response to 1 12/15/15 04:48 AM
[ Reply | Forward ]
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!

Posted by George Avgeris

Reply to first post on this page
Back to Problems Installing LAMS