src/Config/ConfigInfo.php
public function getCurrentUrl() {
        $script = self::getScriptName();
        if ( $script === false ) return false; 
        $pieces = $this->apphome;
        if ( $this->apphome ) {
            $pieces = parse_url($this->apphome);
        }
        // We only take scheme, host, and port from wwwroot / apphome
        if ( ! isset($pieces['scheme']) ) return false;
        $retval = $pieces['scheme'].'://'.$pieces['host'];
        if ( isset($pieces['port']) ) $retval .= ':'.$pieces['port'];
        return $retval . $script;
    }
public function getCurrentUrl() {
        $script = self::getScriptName();
        if ( $script === false ) return false; 
        $pieces = $this->apphome;
        if ( $this->apphome ) {
            $pieces = parse_url($this->apphome);
        }
        // We only take scheme, host, and port from wwwroot / apphome
        if ( ! isset($pieces['scheme']) ) return false;
        $retval = $pieces['scheme'].'://'.$pieces['host'];
        if ( isset($pieces['port']) ) $retval .= ':'.$pieces['port'];
        return $retval . $script;
    }
public function getCurrentUrl ( ) { $ script = self :: getScriptName ( ) ; if ( $ script === false ) return false ; $ pieces = $ this -> apphome ; if ( $ this -> apphome ) { $ pieces = parse_url ( $ this -> apphome ) ; } // We only take scheme, host, and port from wwwroot / apphome if ( ! isset ( $ pieces [ 'scheme' ] ) ) return false ; $ retval = $ pieces [ 'scheme' ] . '://' . $ pieces [ 'host' ] ; if ( isset ( $ pieces [ 'port' ] ) ) $ retval .= ':' . $ pieces [ 'port' ] ; return $ retval . $ script ; }
Get the current URL we are executing - no query parameters

http://localhost:8888/py4e/mod/peer-grade/maint.php
Get the current URL we are executing - no query parameters