by Balázs Petróczi.
The source of the problem was that a javascript file did not load from the sub-folder because some rules in the .htaccess file in the root directory interfered.
I installed moodle in a sub-domain, so an easy solution was adding a RewriteCond statement at the top of each ruleset only to apply them if the request was coming from the base domain.
Something like:
RewriteCond %{HTTP_HOST} ^www\.mysite\.hu$ [NC]