src/Config/ConfigInfo.php
public function getCurrentUrlFolder() {
        $url = self::getCurrentUrl();
        $pieces = explode('/', $url);
        array_pop($pieces);
        $retval = implode('/', $pieces);
        return $retval;
    }
public function getCurrentUrlFolder() {
        $url = self::getCurrentUrl();
        $pieces = explode('/', $url);
        array_pop($pieces);
        $retval = implode('/', $pieces);
        return $retval;
    }
public function getCurrentUrlFolder ( ) { $ url = self :: getCurrentUrl ( ) ; $ pieces = explode ( '/' , $ url ) ; array_pop ( $ pieces ) ; $ retval = implode ( '/' , $ pieces ) ; return $ retval ; }
Get the current folder of the URL we are executing - no trailing slash

input: http://localhost:8888/py4e/mod/peer-grade/maint.php
output: http://localhost:8888/py4e/mod/peer-grade
Get the current folder of the URL we are executing - no trailing slash