public function perpage_select() {
        global $PAGE, $OUTPUT;

        $options = array_combine(self::$validperpage, self::$validperpage);

        $url = new moodle_url($PAGE->url);
        $url->remove_params(['page', 'perpage']);

        $out = '';
        $select = new \single_select($url, 'perpage', $options, $this->perpage, null, 'perpagechanger');
        $select->label = get_string('itemsperpage', 'gradereport_singleview');
        $out .= $OUTPUT->render($select);

        return $out;
    }