Block Logging

Re: Block Logging

by David Mudrák -
Number of replies: 1
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Ok, not sure if it is related to your issue, but I can see two problems.

 return new moodle_url('http://localhost/moodle/blocks/globals/view.php', array('blockid' => 17, 'courseid' => 1, 'global' => 'site'));//todo: get these dynamic

should be something like

 return new moodle_url('/blocks/globals/view.php', array( ... ));

with the actually parameters passed dynamically, as your todo note says.

'objectid' => $PAGE->cm->instance,

As far as I know, the $PAGE->cm is only set when you are viewing a real course module (cm), that is an activity module. Modules usually set it by calling require_login() with the $cm record provided.

Do you have debugging enabled? I believe it would throw an error about accessing property of a non-object, or something like that.

In reply to David Mudrák

Re: Block Logging

by philipp steiner -

Thank you for your input! Yes i have debugging enabled and it was the error you said displayed smile