public static function get_proxy_url($tool) {
        global $CFG;
        $url = null;

        $id = $tool->id;
        $token = self::generate_proxy_token($tool->id);
        if ($CFG->slasharguments) {
            $url = new \moodle_url('/enrol/lti/proxy.php/' . $id . '/' . $token . '/');
        } else {
            $url = new \moodle_url('/enrol/lti/proxy.php',
                    array(
                        'id' => $id,
                        'token' => $token
                    )
                );
        }
        return $url;
    }