Skip to content

Commit f1def33

Browse files
committed
course: do not change tab on doing menu action
1 parent 7ee50c7 commit f1def33

File tree

1 file changed

+36
-24
lines changed
  • src/packages/frontend/frame-editors/course-editor

1 file changed

+36
-24
lines changed

src/packages/frontend/frame-editors/course-editor/editor.ts

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ const COMMANDS = {
7474
button: "+Student",
7575
title: "Add one or more students to this course.",
7676
onClick: ({ props }) => {
77-
const { id, actions } = props;
78-
actions.set_frame_type(id, "course_students");
77+
// const { id, actions } = props;
78+
// actions.set_frame_type(id, "course_students");
79+
const { actions } = props;
7980
actions.setModal("add-students");
8081
},
8182
},
@@ -86,8 +87,9 @@ const COMMANDS = {
8687
title:
8788
"You can start all projects associated with this course so they are immediately ready for your students to use.",
8889
onClick: ({ props }) => {
89-
const { id, actions } = props;
90-
actions.set_frame_type(id, "course_actions");
90+
// const { id, actions } = props;
91+
// actions.set_frame_type(id, "course_actions");
92+
const { actions } = props;
9193
actions.setModal("start-all-projects");
9294
},
9395
},
@@ -98,8 +100,9 @@ const COMMANDS = {
98100
title:
99101
"Run a bash terminal command in the home directory of all student projects. Up to 30 commands run in parallel, with a timeout of 1 minutes.",
100102
onClick: ({ props }) => {
101-
const { id, actions } = props;
102-
actions.set_frame_type(id, "course_actions");
103+
// const { id, actions } = props;
104+
// actions.set_frame_type(id, "course_actions");
105+
const { actions } = props;
103106
actions.setModal("terminal-command");
104107
},
105108
},
@@ -109,8 +112,9 @@ const COMMANDS = {
109112
button: "Reconfigure",
110113
title: "Update all projects with correct students, descriptions, etc.",
111114
onClick: ({ props }) => {
112-
const { id, actions } = props;
113-
actions.set_frame_type(id, "course_actions");
115+
// const { id, actions } = props;
116+
// actions.set_frame_type(id, "course_actions");
117+
const { actions } = props;
114118
actions.setModal("reconfigure-all-projects");
115119
},
116120
},
@@ -121,8 +125,9 @@ const COMMANDS = {
121125
title:
122126
"Export all the grades you have recorded for students in your course to a csv or Python file.",
123127
onClick: ({ props }) => {
124-
const { id, actions } = props;
125-
actions.set_frame_type(id, "course_actions");
128+
// const { id, actions } = props;
129+
// actions.set_frame_type(id, "course_actions");
130+
const { actions } = props;
126131
actions.setModal("export-grades");
127132
},
128133
},
@@ -133,8 +138,9 @@ const COMMANDS = {
133138
title:
134139
"Send another email to every student who didn't sign up yet. This sends a maximum of one email every 1 day.",
135140
onClick: ({ props }) => {
136-
const { id, actions } = props;
137-
actions.set_frame_type(id, "course_actions");
141+
// const { id, actions } = props;
142+
// actions.set_frame_type(id, "course_actions");
143+
const { actions } = props;
138144
actions.setModal("resend-invites");
139145
},
140146
},
@@ -145,8 +151,9 @@ const COMMANDS = {
145151
title:
146152
"If you add new students to your course, you can ensure they have all the assignments and handouts that you have already assigned to other students in the course.",
147153
onClick: ({ props }) => {
148-
const { id, actions } = props;
149-
actions.set_frame_type(id, "course_actions");
154+
// const { id, actions } = props;
155+
// actions.set_frame_type(id, "course_actions");
156+
const { actions } = props;
150157
actions.setModal("copy-missing-handouts-and-assignments");
151158
},
152159
},
@@ -157,8 +164,9 @@ const COMMANDS = {
157164
title:
158165
"Empty trash by purging deleted students, assignments, and handouts.",
159166
onClick: ({ props }) => {
160-
const { id, actions } = props;
161-
actions.set_frame_type(id, "course_actions");
167+
// const { id, actions } = props;
168+
// actions.set_frame_type(id, "course_actions");
169+
const { actions } = props;
162170
actions.setModal("empty-trash");
163171
},
164172
},
@@ -169,8 +177,9 @@ const COMMANDS = {
169177
title:
170178
"If for some reason you would like to delete all the student projects created for this course, you may do so by clicking above.",
171179
onClick: ({ props }) => {
172-
const { id, actions } = props;
173-
actions.set_frame_type(id, "course_actions");
180+
// const { id, actions } = props;
181+
// actions.set_frame_type(id, "course_actions");
182+
const { actions } = props;
174183
actions.setModal("delete-student-projects");
175184
},
176185
},
@@ -181,8 +190,9 @@ const COMMANDS = {
181190
title:
182191
"Student projects will not be deleted. If you make a mistake, students can still be undeleted from the Student tab or using TimeTravel.",
183192
onClick: ({ props }) => {
184-
const { id, actions } = props;
185-
actions.set_frame_type(id, "course_actions");
193+
// const { id, actions } = props;
194+
// actions.set_frame_type(id, "course_actions");
195+
const { actions } = props;
186196
actions.setModal("delete-students");
187197
},
188198
},
@@ -193,8 +203,9 @@ const COMMANDS = {
193203
title:
194204
"Student projects will not be deleted. If you make a mistake, students can still be undeleted from the Student tab or using TimeTravel.",
195205
onClick: ({ props }) => {
196-
const { id, actions } = props;
197-
actions.set_frame_type(id, "course_shared_project");
206+
// const { id, actions } = props;
207+
// actions.set_frame_type(id, "course_shared_project");
208+
const { actions } = props;
198209
actions.setModal("delete-shared-project");
199210
},
200211
},
@@ -205,8 +216,9 @@ const COMMANDS = {
205216
title:
206217
"Create a single common shared project, which everybody -- students and all collaborators on this project (your TAs and other instructors) -- have write access to.",
207218
onClick: ({ props }) => {
208-
const { id, actions } = props;
209-
actions.set_frame_type(id, "course_shared_project");
219+
// const { id, actions } = props;
220+
// actions.set_frame_type(id, "course_shared_project");
221+
const { actions } = props;
210222
actions.setModal("create-shared-project");
211223
},
212224
},

0 commit comments

Comments
 (0)