public function get_marking_allocation_filters($export = false) {
        $markingallocation = $this->get_instance()->markingworkflow &&
            $this->get_instance()->markingallocation &&
            has_capability('mod/assign:manageallocations', $this->context);
        // Get markers to use in drop lists.
        $markingallocationoptions = array();
        if ($markingallocation) {
            list($sort, $params) = users_order_by_sql('u');
            // Only enrolled users could be assigned as potential markers.
            $markers = get_enrolled_users($this->context, 'mod/assign:grade', 0, 'u.*', $sort);
            $markingallocationoptions[''] = get_string('filternone', 'assign');
            $markingallocationoptions[ASSIGN_MARKER_FILTER_NO_MARKER] = get_string('markerfilternomarker', 'assign');
            $viewfullnames = has_capability('moodle/site:viewfullnames', $this->context);
            foreach ($markers as $marker) {
                $markingallocationoptions[$marker->id] = fullname($marker, $viewfullnames);
            }
        }
        if ($export) {
            $allocationfilter = get_user_preferences('assign_markerfilter', '');
            $result = [];
            foreach ($markingallocationoptions as $option => $label) {
                array_push($result, [
                    'key' => $option,
                    'name' => $label,
                    'active' => ($allocationfilter == $option),
                ]);
            }
            return $result;
        }
        return $markingworkflowoptions;
    }