CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/course/configuration/delete-all-students.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Button, Card, Popconfirm } from "antd";
7
import { Icon } from "../../components";
8
9
export function DeleteAllStudents({ actions }) {
10
return (
11
<Card
12
title={
13
<>
14
<Icon name="trash" /> Delete all Students
15
</>
16
}
17
>
18
<Popconfirm
19
title="All students will be deleted and upgrades removed from their projects."
20
onConfirm={() => actions.students.deleteAllStudents()}
21
okText={"YES, DELETE all Students"}
22
>
23
<Button danger>
24
<Icon name="trash" /> Delete all Students...
25
</Button>
26
</Popconfirm>
27
<hr />
28
<span style={{ color: "#666" }}>
29
Student projects will not be deleted. If you make a mistake, students
30
can still be undeleted from the Student tab or using TimeTravel.
31
</span>
32
</Card>
33
);
34
}
35
36