public function get_mark_discussion_as_read_url_from_discussion(
        forum_entity $forum,
        discussion_entity $discussion
    ) : moodle_url {
        return new moodle_url('/mod/forum/markposts.php', [
            'f' => $discussion->get_forum_id(),
            'd' => $discussion->get_id(),
            'mark' => 'read',
            'sesskey' => sesskey(),
            'return' => $this->get_forum_view_url_from_forum($forum)->out(),
        ]);
    }
public function get_mark_discussion_as_read_url_from_discussion(
        forum_entity $forum,
        discussion_entity $discussion
    ) : moodle_url {
        return new moodle_url('/mod/forum/markposts.php', [
            'f' => $discussion->get_forum_id(),
            'd' => $discussion->get_id(),
            'mark' => 'read',
            'sesskey' => sesskey(),
            'return' => $this->get_forum_view_url_from_forum($forum)->out(),
        ]);
    }
public function get_mark_discussion_as_read_url_from_discussion ( forum_entity $ forum , discussion_entity $ discussion ) : moodle_url { return new moodle_url ( '/mod/forum/markposts.php' , [ 'f' => $ discussion -> get_forum_id ( ) , 'd' => $ discussion -> get_id ( ) , 'mark' => 'read' , 'sesskey' => sesskey ( ) , 'return' => $ this -> get_forum_view_url_from_forum ( $ forum ) -> out ( ) , ] ) ; }
Get the url to mark a discussion as read.

@param forum_entity $forum The forum that the discussion belongs to
@param discussion_entity $discussion The discussion
@return moodle_url
Get the url to mark a discussion as read .