|
| 1 | +import { ENV_VARS_ICON } from "@cocalc/frontend/project/settings/environment"; |
| 2 | + |
| 3 | +export const COMMANDS = { |
| 4 | + "add-students": { |
| 5 | + icon: "users", |
| 6 | + label: "Add Students", |
| 7 | + button: "+Student", |
| 8 | + title: "Add one or more students to this course.", |
| 9 | + onClick: ({ props }) => { |
| 10 | + const { actions } = props; |
| 11 | + actions.setModal("add-students"); |
| 12 | + }, |
| 13 | + }, |
| 14 | + "add-assignments": { |
| 15 | + icon: "share-square", |
| 16 | + label: "Add Assignments", |
| 17 | + button: "+Assignment", |
| 18 | + title: "Add one or more assignments to this course.", |
| 19 | + onClick: ({ props }) => { |
| 20 | + const { actions } = props; |
| 21 | + actions.setModal("add-assignments"); |
| 22 | + }, |
| 23 | + }, |
| 24 | + "add-handouts": { |
| 25 | + icon: "text1", |
| 26 | + label: "Add Handouts", |
| 27 | + button: "+Handouts", |
| 28 | + title: "Add one or more handouts to this course.", |
| 29 | + onClick: ({ props }) => { |
| 30 | + const { actions } = props; |
| 31 | + actions.setModal("add-handouts"); |
| 32 | + }, |
| 33 | + }, |
| 34 | + "title-and-description": { |
| 35 | + icon: "header", |
| 36 | + label: "Course Title and Description", |
| 37 | + button: "Title", |
| 38 | + title: "Set the course title and description.", |
| 39 | + onClick: ({ props }) => { |
| 40 | + const { actions } = props; |
| 41 | + actions.setModal("title-and-description"); |
| 42 | + }, |
| 43 | + }, |
| 44 | + "email-invitation": { |
| 45 | + icon: "mail", |
| 46 | + label: "Email Invitation", |
| 47 | + button: "Invite", |
| 48 | + title: |
| 49 | + "If you add a student to this course using their email address, and they do not have a CoCalc account, then they will receive this email invitation.", |
| 50 | + onClick: ({ props }) => { |
| 51 | + const { actions } = props; |
| 52 | + actions.setModal("email-invitation"); |
| 53 | + }, |
| 54 | + }, |
| 55 | + "copy-limit": { |
| 56 | + icon: "users", |
| 57 | + label: "Parallel Copy Limit", |
| 58 | + button: "Limit", |
| 59 | + title: "Max number of students to copy and collect files from in parallel.", |
| 60 | + onClick: ({ props }) => { |
| 61 | + const { actions } = props; |
| 62 | + actions.setModal("copy-limit"); |
| 63 | + }, |
| 64 | + }, |
| 65 | + "collaborator-policy": { |
| 66 | + icon: "mail", |
| 67 | + label: "Collaborator Policy", |
| 68 | + button: "Collab", |
| 69 | + title: |
| 70 | + "Control if the owner and any collaborator on this student project may add collaborators to this project.", |
| 71 | + onClick: ({ props }) => { |
| 72 | + const { actions } = props; |
| 73 | + actions.setModal("collaborator-policy"); |
| 74 | + }, |
| 75 | + }, |
| 76 | + "restrict-student-projects": { |
| 77 | + icon: "lock", |
| 78 | + label: "Restrict Student Projects", |
| 79 | + button: "Restrict", |
| 80 | + title: "Remove functionality from student projects", |
| 81 | + onClick: ({ props }) => { |
| 82 | + const { actions } = props; |
| 83 | + actions.setModal("restrict-student-projects"); |
| 84 | + }, |
| 85 | + }, |
| 86 | + nbgrader: { |
| 87 | + icon: "graduation-cap", |
| 88 | + label: "Configure Nbgrader", |
| 89 | + button: "Nbgrader", |
| 90 | + title: "Configure how nbgrader works.", |
| 91 | + onClick: ({ props }) => { |
| 92 | + const { actions } = props; |
| 93 | + actions.setModal("nbgrader"); |
| 94 | + }, |
| 95 | + }, |
| 96 | + "software-environment": { |
| 97 | + icon: "laptop", |
| 98 | + label: "Software Environment", |
| 99 | + button: "Software", |
| 100 | + title: |
| 101 | + "Configure the software environment that all student projects will use.", |
| 102 | + onClick: ({ props }) => { |
| 103 | + const { actions } = props; |
| 104 | + actions.setModal("software-environment"); |
| 105 | + }, |
| 106 | + }, |
| 107 | + "network-file-systems": { |
| 108 | + icon: "database", |
| 109 | + label: "Cloud Storage & Remote File Systems", |
| 110 | + button: "Nbgrader", |
| 111 | + title: |
| 112 | + "Give all student projects read-only access to the same cloud stores and remote file systems as this instructor project.", |
| 113 | + onClick: ({ props }) => { |
| 114 | + const { actions } = props; |
| 115 | + actions.setModal("network-file-systems"); |
| 116 | + }, |
| 117 | + }, |
| 118 | + "env-variables": { |
| 119 | + icon: ENV_VARS_ICON, |
| 120 | + label: "Configure Environment Variables", |
| 121 | + button: "Environment", |
| 122 | + title: |
| 123 | + "Configure whether or not student projects inherit the environment variables of this instructor project.", |
| 124 | + onClick: ({ props }) => { |
| 125 | + const { actions } = props; |
| 126 | + actions.setModal("env-variables"); |
| 127 | + }, |
| 128 | + }, |
| 129 | + "configuration-copying": { |
| 130 | + icon: "clone", |
| 131 | + label: "Copy Course Configuration", |
| 132 | + button: "Config", |
| 133 | + title: "Easily copy configuration from this course to other courses.", |
| 134 | + onClick: ({ props }) => { |
| 135 | + const { actions } = props; |
| 136 | + actions.setModal("configuration-copying"); |
| 137 | + }, |
| 138 | + }, |
| 139 | + upgrades: { |
| 140 | + icon: "gears", |
| 141 | + label: "Configure Upgrades (Student or Instructor Pay)", |
| 142 | + button: "Upgrades", |
| 143 | + title: |
| 144 | + "Use a license to upgrade all projects, or require your students to purchase a specific license.", |
| 145 | + onClick: ({ props }) => { |
| 146 | + const { actions } = props; |
| 147 | + actions.setModal("upgrades"); |
| 148 | + }, |
| 149 | + }, |
| 150 | + |
| 151 | + "start-all-projects": { |
| 152 | + icon: "bolt", |
| 153 | + label: "Start or Stop all Student Projects", |
| 154 | + button: "Start All", |
| 155 | + title: |
| 156 | + "You can start all projects associated with this course so they are immediately ready for your students to use.", |
| 157 | + onClick: ({ props }) => { |
| 158 | + const { actions } = props; |
| 159 | + actions.setModal("start-all-projects"); |
| 160 | + }, |
| 161 | + }, |
| 162 | + "terminal-command": { |
| 163 | + icon: "terminal", |
| 164 | + label: "Run Terminal Command in all Student Projects", |
| 165 | + button: "Terminal", |
| 166 | + title: |
| 167 | + "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.", |
| 168 | + onClick: ({ props }) => { |
| 169 | + const { actions } = props; |
| 170 | + actions.setModal("terminal-command"); |
| 171 | + }, |
| 172 | + }, |
| 173 | + "reconfigure-all-projects": { |
| 174 | + icon: "mail", |
| 175 | + label: "Reconfigure all Projects", |
| 176 | + button: "Reconfigure", |
| 177 | + title: "Update all projects with correct students, descriptions, etc.", |
| 178 | + onClick: ({ props }) => { |
| 179 | + const { actions } = props; |
| 180 | + actions.setModal("reconfigure-all-projects"); |
| 181 | + }, |
| 182 | + }, |
| 183 | + "export-grades": { |
| 184 | + icon: "table", |
| 185 | + label: "Export Grades", |
| 186 | + button: "Grades", |
| 187 | + title: |
| 188 | + "Export all the grades you have recorded for students in your course to a csv or Python file.", |
| 189 | + onClick: ({ props }) => { |
| 190 | + const { actions } = props; |
| 191 | + actions.setModal("export-grades"); |
| 192 | + }, |
| 193 | + }, |
| 194 | + "resend-invites": { |
| 195 | + icon: "mail", |
| 196 | + label: "Resend Outstanding Invites", |
| 197 | + button: "Invites", |
| 198 | + title: |
| 199 | + "Send another email to every student who didn't sign up yet. This sends a maximum of one email every 1 day.", |
| 200 | + onClick: ({ props }) => { |
| 201 | + const { actions } = props; |
| 202 | + actions.setModal("resend-invites"); |
| 203 | + }, |
| 204 | + }, |
| 205 | + "copy-missing-handouts-and-assignments": { |
| 206 | + icon: "graph", |
| 207 | + label: "Copy Missing Handouts and Assignments", |
| 208 | + button: "Copy Missing", |
| 209 | + title: |
| 210 | + "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.", |
| 211 | + onClick: ({ props }) => { |
| 212 | + const { actions } = props; |
| 213 | + actions.setModal("copy-missing-handouts-and-assignments"); |
| 214 | + }, |
| 215 | + }, |
| 216 | + "empty-trash": { |
| 217 | + icon: "trash", |
| 218 | + label: "Empty Trash", |
| 219 | + button: "Trash", |
| 220 | + title: |
| 221 | + "Empty trash by purging deleted students, assignments, and handouts.", |
| 222 | + onClick: ({ props }) => { |
| 223 | + const { actions } = props; |
| 224 | + actions.setModal("empty-trash"); |
| 225 | + }, |
| 226 | + }, |
| 227 | + "delete-student-projects": { |
| 228 | + icon: "trash", |
| 229 | + label: "Delete Student Projects", |
| 230 | + button: "Delete", |
| 231 | + title: |
| 232 | + "If for some reason you would like to delete all the student projects created for this course, you may do so by clicking above.", |
| 233 | + onClick: ({ props }) => { |
| 234 | + const { actions } = props; |
| 235 | + actions.setModal("delete-student-projects"); |
| 236 | + }, |
| 237 | + }, |
| 238 | + "delete-students": { |
| 239 | + icon: "trash", |
| 240 | + label: "Delete Students", |
| 241 | + button: "Delete", |
| 242 | + title: |
| 243 | + "Student projects will not be deleted. If you make a mistake, students can still be undeleted from the Student tab or using TimeTravel.", |
| 244 | + onClick: ({ props }) => { |
| 245 | + const { actions } = props; |
| 246 | + actions.setModal("delete-students"); |
| 247 | + }, |
| 248 | + }, |
| 249 | + "delete-shared-project": { |
| 250 | + icon: "trash", |
| 251 | + label: "Delete Shared Project", |
| 252 | + button: "Delete", |
| 253 | + title: |
| 254 | + "Student projects will not be deleted. If you make a mistake, students can still be undeleted from the Student tab or using TimeTravel.", |
| 255 | + onClick: ({ props }) => { |
| 256 | + const { actions } = props; |
| 257 | + actions.setModal("delete-shared-project"); |
| 258 | + }, |
| 259 | + }, |
| 260 | + "create-shared-project": { |
| 261 | + icon: "users", |
| 262 | + label: "Create Shared Project", |
| 263 | + button: "Shared", |
| 264 | + title: |
| 265 | + "Create a single common shared project, which everybody -- students and all collaborators on this project (your TAs and other instructors) -- have write access to.", |
| 266 | + onClick: ({ props }) => { |
| 267 | + const { actions } = props; |
| 268 | + actions.setModal("create-shared-project"); |
| 269 | + }, |
| 270 | + }, |
| 271 | +}; |
0 commit comments