Nginx considerations

When the Moodle configuration setting slasharguments is enabled, Level Up XP uses PATH_INFO to determine which view to display to the user. If your web server is not properly configured, you may encounter an error reading: Coding error: Controller for route not found.

Firstly, please ensure that Nginx was set-up according to the Moodle documentation on Nginx. The plugin has been confirmed to work in this configuration.

If you still do not have success with this, you might have the following rewrite rule in your site definition:

rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last;

The latter rule assumes that the path should be passed to the file argument, and thus creates a conflict with the way Level Up XP handles the routes. If Nginx is configured according to the Moodle documentation, that rewrite should not be needed, and thus you may try to remove it and see if it works.

Alternatively, and note that this is discouraged, you can add the follow rewrite rule before the previous rewrite rule. Your Nginx site definition should therefore read this:

rewrite ^/(blocks/xp/.*.php)(/)(.*)$ /$1?_r=/$3 last;
rewrite ^/(.*.php)(/)(.*)$ /$1?file=/$3 last;

If at this point you're not having any success, consider disabling the Moodle admin setting slasharguments.

Related links