by Daniel Palou.
Hello Alvarez,
I checked your code and you're adding the console.log to the wrong function. You added it to the function $mmCourse->getModule and that function is barely used. If you want to see that console.log when listing the sections you need to add it to $mmCourse->getSections function. I suggest you to use the development files and use gulp to build mm.bundle.js, that way code is more readable. This guide can help you:
https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2
Regards,
Dani