Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/frontend/course/students/deleted-account.tsx
Views: 687
import { Button, Modal, Popconfirm } from "antd";1import { useState } from "react";2import { Icon } from "@cocalc/frontend/components/icon";34export default function DeletedAccount({5actions,6student_id,7name,8email_address,9}) {10const [open, setOpen] = useState<boolean>(false);11return (12<span style={{ color: "#666" }}>13<Modal14centered15title={16<>17<Icon name="trash" /> {name ?? "This Student"} Deleted their CoCalc18Account19</>20}21open={open}22onCancel={() => setOpen(false)}23>24<p>25Your student {name} {email_address} deleted their Cocalc account. They26may have created a new CoCalc account, left the course, or something27else. You can leave things as is, or you can delete them entirely from28this course. If they want to be in the course, delete them below, then29add them back to the course as usual.30</p>31<p>32If you delete the student, any grades you recorded for them will also33be deleted.34</p>35<div style={{ margin: "10px 0", textAlign: "center" }}>36<Popconfirm37title={<>Completely delete {name} from your course?</>}38onConfirm={async () => {39await actions.students.delete_student(student_id, true);40setOpen(false);41}}42okText={"DELETE"}43>44<Button danger>Delete {name}...</Button>45</Popconfirm>46</div>47</Modal>48<a49onClick={() => {50setOpen(true);51}}52>53(they deleted their account...)54</a>55</span>56);57}585960