Skip to content

Commit 700c334

Browse files
committed
fix #7985 -- course: add new student dialog crashes cocalc
1 parent 93ed398 commit 700c334

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/packages/frontend/course/commands.ts

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
import { ENV_VARS_ICON } from "@cocalc/frontend/project/settings/environment";
2-
import { course } from "@cocalc/frontend/i18n";
32

4-
export const COMMANDS = {
3+
interface Command {
4+
icon: string;
5+
label: string;
6+
button: string;
7+
title: string;
8+
onClick: any;
9+
}
10+
11+
export const COMMANDS: { [name: string]: Command } = {
512
"add-students": {
613
icon: "users",
7-
label: course.add_students,
14+
label: "Add Students",
815
button: "+Student",
9-
title: course.add_students_tooltip,
16+
title: "Add one or more students to this course.",
1017
onClick: ({ props }) => {
1118
const { actions } = props;
1219
actions.setModal("add-students");
@@ -249,7 +256,7 @@ export const COMMANDS = {
249256
},
250257
"delete-shared-project": {
251258
icon: "trash",
252-
label: course.delete_shared_project,
259+
label: "Delete Shared Project",
253260
button: "Delete",
254261
title:
255262
"Student projects will not be deleted. If you make a mistake, students can still be undeleted from the Student tab or using TimeTravel.",
@@ -260,10 +267,10 @@ export const COMMANDS = {
260267
},
261268
"create-shared-project": {
262269
icon: "users",
263-
label: course.create_shared_project,
270+
label: "Create Shared Project",
264271
button: "Shared",
265272
title:
266-
"Create a single common shared project, which everybody students and all collaborators on this project (your TAs and other instructors) have write access to.",
273+
"Create a single common shared project, which everybody -- students and all collaborators on this project (your TAs and other instructors) -- have write access to.",
267274
onClick: ({ props }) => {
268275
const { actions } = props;
269276
actions.setModal("create-shared-project");

0 commit comments

Comments
 (0)