Hello,
I am getting the course id for the loaded page in a Moodle block using:
$course = $DB->get_record('course', array(id => $_POST['pageID']), '*', MUST_EXIST);
It works, but it's giving a soft error in the log of:
Use of undefined constant id - assumed 'id' in /usr/local/moodle/blocks/page_status/block_page_status.php
I don't see why "id" is being assumed as "id" here. It's not a big deal now as the code works but I worry it will eventually break in a future version if that assumption is no longer made.
I AM including config.php and MOODLE_INTERNAL is defined.