public function col_tobedeleted($expiredctx) {
        if ($expiredctx->is_fully_expired()) {
            return get_string('defaultexpired', 'tool_dataprivacy');
        }

        $purpose = $this->get_purpose_for_expiry($expiredctx);

        $a = (object) [];

        $expiredroles = [];
        foreach ($expiredctx->get('expiredroles') as $roleid) {
            $expiredroles[] = html_writer::tag('li', $this->roles[$roleid]->localname);
        }
        $a->expired = html_writer::tag('ul', implode($expiredroles));

        $unexpiredroles = [];
        foreach ($expiredctx->get('unexpiredroles') as $roleid) {
            $unexpiredroles[] = html_writer::tag('li', $this->roles[$roleid]->localname);
        }
        $a->unexpired = html_writer::tag('ul', implode($unexpiredroles));

        if ($expiredctx->get('defaultexpired')) {
            return get_string('defaultexpiredexcept', 'tool_dataprivacy', $a);
        } else if (empty($unexpiredroles)) {
            return get_string('defaultunexpired', 'tool_dataprivacy', $a);
        } else {
            return get_string('defaultunexpiredwithexceptions', 'tool_dataprivacy', $a);
        }
    }