are customscripts broken in moodle 3 ?

are customscripts broken in moodle 3 ?

by tim st.clair -
Number of replies: 1
Picture of Plugin developers

In my Moodle 3 config.php file I have

$CFG->customscripts = dirname(__FILE__).'/local/customscripts';
In my /local/customscripts/ folder I have
mod/scorm/player.php

In player.php I have thrown everything out and written

<?php echo "hi there"; exit;

But when I open a scorm page, it still loads. Tried with other paths (e.g. /course/view.php). Verified permissions on disk are correct, purged caches.

Average of ratings: -
In reply to tim st.clair

Re: are customscripts broken in moodle 3 ?

by David Mudrák -
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

Negative. I just checked and it works as expected.

In my config.php I have

$CFG->customscripts = __DIR__.'/local/customscripts';

When the file ./local/customscripts/course/view.php exists, it is correctly loaded at the top of the standard file as a part of the setup - see lib/setup.php#L945.

You may want to try to debug this by adding something like print_object(custom_script_path()); die(); near that line no. 945 there.