Uncaught Error: No define call for ...

Uncaught Error: No define call for ...

by Conn Warwicker -
Number of replies: 1
Picture of Core developers Picture of Plugin developers

My block doesn't seem to be working in Moodle 3.5 (as far as I can remember, it works up to 3.4).

The error message I am getting in the console says there is no define call for block_quick_user/module


But I have a define in my module.js file: 

`

define(['jquery'], function($) {

    return {

        init: function(courseID) { 

            // stuff here cut out to save space

        }

    };

});

`


I have a call to it in my block file:   

`$this->page->requires->js_call_amd('block_quick_user/module', 'init', array($COURSE->id));`


And in the source of the page, Moodle is call it: 

`require(["block_quick_user/module"], function(amd) { amd.init("1"); });;`



I can't see what the problem is. 


Can anyone shed any light on it?


Thanks


Average of ratings: Useful (1)
In reply to Conn Warwicker

Re: Uncaught Error: No define call for ...

by Conn Warwicker -
Picture of Core developers Picture of Plugin developers

Seems you need a build folder with a minified version of the script now.