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/configuration/delete-all-student-projects.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Button, Card, Popconfirm } from "antd";6import { FormattedMessage, useIntl } from "react-intl";78import { Icon, Paragraph } from "@cocalc/frontend/components";9import { course } from "@cocalc/frontend/i18n";1011export function DeleteAllStudentProjects({ actions }) {12const intl = useIntl();1314return (15<Card16title={17<>18<Icon name="trash" />{" "}19{intl.formatMessage(course.delete_student_projects)}20</>21}22>23<Popconfirm24title={intl.formatMessage({25id: "course.delete-all-student-projects.confirm.title",26defaultMessage:27"Delete all student projects and remove students from them?",28})}29description={30<div style={{ maxWidth: "400px" }}>31<FormattedMessage32id="course.delete-all-student-projects.confirm"33defaultMessage={`You will still temporarily have access to the deleted projects34in the Projects page (select "Deleted and Hidden"),35but students will be removed from the deleted projects immediately.`}36/>37</div>38}39onConfirm={() => actions.student_projects.deleteAllStudentProjects()}40okText={intl.formatMessage({41id: "course.delete-all-student-projects.confirm.yes",42defaultMessage: "YES, DELETE all Student Projects",43})}44>45<Button danger>46<Icon name="trash" />{" "}47{intl.formatMessage(course.delete_student_projects)}...48</Button>49</Popconfirm>50<hr />51<Paragraph type="secondary">52<FormattedMessage53id="course.delete-all-student-projects.info"54defaultMessage={`If for some reason you would like to delete all the student projects55created for this course, you may do so by clicking above.56Be careful!57Students will be removed from the deleted projects.`}58/>59</Paragraph>60</Card>61);62}636465