protected function view_remove_submission_confirm() {
        global $USER, $DB;

        $userid = optional_param('userid', $USER->id, PARAM_INT);

        if (!$this->can_edit_submission($userid, $USER->id)) {
            print_error('nopermission');
        }
        $user = $DB->get_record('user', array('id' => $userid), '*', MUST_EXIST);

        $o = '';
        $header = new assign_header($this->get_instance(),
                                    $this->get_context(),
                                    false,
                                    $this->get_course_module()->id);
        $o .= $this->get_renderer()->render($header);

        $urlparams = array('id' => $this->get_course_module()->id,
                           'action' => 'removesubmission',
                           'userid' => $userid,
                           'sesskey' => sesskey());
        $confirmurl = new moodle_url('/mod/assign/view.php', $urlparams);

        $urlparams = array('id' => $this->get_course_module()->id,
                           'action' => 'view');
        $cancelurl = new moodle_url('/mod/assign/view.php', $urlparams);

        if ($userid == $USER->id) {
            $confirmstr = get_string('removesubmissionconfirm', 'assign');
        } else {
            $name = $this->fullname($user);
            $confirmstr = get_string('removesubmissionconfirmforstudent', 'assign', $name);
        }
        $o .= $this->get_renderer()->confirm($confirmstr,
                                             $confirmurl,
                                             $cancelurl);
        $o .= $this->view_footer();

        \mod_assign\event\remove_submission_form_viewed::create_from_user($this, $user)->trigger();

        return $o;
    }