public function get_mark_post_as_read_url_from_post(post_entity $post, int $displaymode = FORUM_MODE_THREADED) : moodle_url {
        $params = [
            'd' => $post->get_discussion_id(),
            'postid' => $post->get_id(),
            'mark' => 'read'
        ];

        $url = new moodle_url('/mod/forum/discuss.php', $params);

        if ($displaymode == FORUM_MODE_THREADED) {
            $url->param('parent', $post->get_parent_id());
        } else {
            $url->set_anchor('p' . $post->get_id());
        }

        return $url;
    }