Path: blob/master/src/packages/frontend/course/handouts/handout-info-header.tsx
1503 views
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import { Col, Row } from "antd";6import { Tip } from "@cocalc/frontend/components";78interface StudentHandoutInfoHeaderProps {9title: string;10}1112export function StudentHandoutInfoHeader({13title,14}: StudentHandoutInfoHeaderProps) {15function render_col(step_number, key, width) {16const title = "Distribute to Student";17const tip =18"This column gives the status whether a handout was received by a student and lets you copy the handout to one student at a time.";19return (20<Col md={width} key={key}>21<Tip title={title} tip={tip}>22<b>23{step_number}. {title}24</b>25</Tip>26</Col>27);28}2930function render_headers() {31return <Row>{render_col(1, "last_handout", 24)}</Row>;32}3334const tip =35title === "Handout"36? "This column gives the directory name of the handout."37: "This column gives the name of the student.";3839return (40<div>41<Row style={{ borderBottom: "2px solid #aaa" }}>42<Col md={4} key="title">43<Tip title={title} tip={tip}>44<b>{title}</b>45</Tip>46</Col>47<Col md={20} key="rest">48{render_headers()}49</Col>50</Row>51</div>52);53}545556