are customscripts broken in moodle 3 ?

are customscripts broken in moodle 3 ?

by tim st.clair -
Number of replies: 1
Mmàggini di 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 -
Mmàggini di Core developers Mmàggini di Documentation writers Mmàggini di Moodle HQ Mmàggini di Particularly helpful Moodlers Mmàggini di Peer reviewers Mmàggini di Plugin developers Mmàggini di Plugins guardians Mmàggini di Testers Mmàggini di 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.