bbcarchdev / moodle-repository_res

A Moodle plugin for incorporating RES content into Moodle courses.
http://res.space/
0 stars 0 forks source link

Does not work in a subdirectory of webserver document root #1

Open mudrd8mz opened 6 years ago

mudrd8mz commented 6 years ago

The script service/app.inc.php provides the URLs in the controller capabilities ($paths) as relative paths. If the Moodle is installed in a subdirectory of the web server (such as https://our.school.org/moodle/) then it does not work in the filepicker.

Also, this file should either perform the MOODLE_INTERNAL check (assuming it is supposed to be required from other script). At the moment, it provides full access via direct URL without performing authentication and authorization checks (so even anonymous users without repository/res:view can call it).

townxelliot commented 6 years ago

I've modified the app.inc.php script to use moodle_url() for constructing paths. This script also now requires a user to login for it to be accessible. I will upload a new version of the plugin to the repository. Thanks.