Skip to content

CS Tool

This repository provides the cs command line tool for Adam Blank's courses. This README is a specification of all commands provided by cs. References to specific commands in the doc are clickable links to their documentation.

There are two primary interfaces provided by cs: the interface for grading diagnostics and the interface for finalizing TA grading.

The Diagnostic Grading Interface

The diagnostic grading interface enables grading for all students' diagnostic at the same time. You can open it up with diagnostics <attempt> grade.

The top of the diagnostic grading interface shows the tabs for all the different questions on this diagnostic. The bottom of the diagnostic grading interface shows the keyboard shortcuts for interacting with the tool; certain components, such as the tabs and the questions, can be interacted with by clicking on them. The keyboard shortcuts included in this documentation are not exhaustive, and the tool should be consulted for a complete list of shortcuts.

There are a few different types of questions. For multiple choice questions, all options will be listed and you can mark answers as required with r, as accepted (but not required) with a, and as disallowed with d.

Free response questions will show all the responses of students. If one free response question had multiple boxes, the response for each box will be separated with a /. Here, you can mark answers as accepted or disallowed. If the question had multiple boxes, the grading interface will attempt to speed up your grading by automatically marking those students for which some of the responses match, but not all.

On second attempts of diagnostics, each student will also need to provide an explanation of an answer, as per a free response question. You can mark these answers with different colors; green is considered an accepted response, and the remaining colors will be mapped to specific comments provided on a per-diagnostic basis.

The Project Grading Interface

The project grading interface allows you to . You can open it up with grading grade.

The top of the project grading interface shows the tabs for all the different questions on this project. The bottom of the project grading interface shows the keyboard shortcuts for interacting with the tool; certain components, such as the tabs and the questions, can be interacted with by clicking on them. The keyboard shortcuts included in this documentation are not exhaustive, and the tool should be consulted for a complete list of shortcuts.

There are a few different interfaces, depending on how the TA grading website was set up. If the TA was provided a list of checkboxes to mark, you'll see a list of all the checkboxes that were marked, and can input how many points to deduct for each checkbox that was marked. The text box contains the student-facing text for the grade, and hovering over the text box contains the TA-facing text that they saw when marking the checkbox.

If the TA was asked to write a response, the response will be written in Markdown and you can view it, modify the response, and add point deductions. The access.caltech username of the TA that made the comment will also be visible.

Pressing the save button z will open up the final review interface for all students. The final comments, final grade, and all deductions for each student can be reviewed, and the final grade can be edited. If the box is blue, that means there has already been a grade pushed to Canvas for this student, so the student could have already viewed that grade. If the box is red, that means there are two active grading attempts for the student; usually, this means the grader marked two checkboxes that are meant to be mutually exclusive, so there are two grades active and so neither can be pushed.

Command Specification

Setting the Active Course: cs course

Course IDs take the form cs<num>-<yr><qtr>, where <num> is the course number (e.g., 0a, 1, 24), <yr> is the last two digits of the course's calendar year, and <qtr> is either fa, wi, sp, or su.

List of Active Course IDs

  • cs7-24su

cs course

Prints the ID of the active course in the Terminal.

cs course <id>

Sets the active course to <id>. There is currently not validation for if <id> is valid or not.

cs course pop

Sets the active course to the previously active course.

Diagnostic Grading : cs diagnostics

The first argument to a diagnostics command is the <attempt> of the diagnostic you want to grade, either 1 or 2.

To see the available diagnostic IDs for the currently active course, press Tab when you need to fill in the id.

cs diagnostics <attempt> (open|close) <id>

Opens or closes the diagnostic <id> for submissions on the course website.

The argument <attempt> specifies whether submissions will be opened or closed for students' 1st or 2nd attempt of the diagnostic.

cs diagnostics <attempt> grade <id>

Opens up the grading interface for a diagnostic <id> for all students.

The argument <attempt> opens up those attempts.

See The Diagnostic Grading Interface for a guide explaining how to use this interface.

cs diagnostics 1 summarize <id>

The summarize subcommand is only available for first attempts of diagnostics.

cs diagnostics output <id>

This command has not been tested by anyone on labradoodle, as far as I can tell; labradoodle is missing the required packages. Instead of handling a specific diagnostic attempt, you can see the output of a diagnostic.

Grading cs grading

cs grading setup <project>

  • Assigns students to TAs for that project.

cs grading view <project>

View the grading responses for all students, and the TA that graded the assignment.

The Status tab shows which TA got assignment to which student, and whether or not the response has been graded.

cs grading grade <project>

Opens up the grading interface for a project <project> for all students.

See The Grading Review Interface for a guide explaining how to use this interface.

Interacting with Canvas: cs canvas

cs canvas roster

Prints the access.caltech usernames of students that have enrolled in or dropped the course.

cs canvas tas

Prints the access.caltech usernames of the course's TAs on Canvas.

cs canvas find-user <user>

Prints the complete user information for any users in the course database matching the <user> query.

When provided with a <user> query, Canvas will search the course database and provide results for all users (student or TA, depending on command) returned by that search. Generally, providing a portion of a student's name or access.caltech username as <user> will provide results for (at least) that student.

Prints the link to the grades page in the course for any user matching the <user> query, which behaves identically to find-user.

Prints a download link to a .ics file containing the course's calendar.

cs canvas create-assignment <gr> <name> <due>

Creates an assignment on Canvas under the Canvas group <gr> with name <name> and will run the website accordingly.

The due date <due> can be a weekday string (e.g., monday): the selected date will be the nearest matching weekday that is neither today nor tomorrow.

cs canvas create-diagnostic <num> <due>

Creates a diagnostic on Canvas with number <num>, which should conform to the regex [0-9]+[a-z]*. The due date behaves identically to create-assignment.

cs canvas (setup-canvas|clean-canvas)

These commands are for Adam to use when setting up courses.

cs canvas clear-grades

Clears all grades from the active Canvas course. Do not use this command unless you know what you are doing.

Interacting with Gitlab: cs gitlab

cs gitlab get-repo <project> <user>

cs gitlab create-repo <project> <user>

cs gitlab create-all-repos <project>

This is equivalent to calling create-repo for all students in the Canvas roster for the active course.

cs gitlab repo-add-user <repo> <user>

cs gitlab (lock-repos|unlock-repos) <repo>

Lock or unlock a particular Github repository.

cs gitlab add-staff-to-repos

Adds all the TAs registered in Canvas to the course Gitlab group.

cs gitlab (patch-repos|undo-patch) <project>

Applies a patch or undoes a patch for all repos corresponding to <project>. Prompts for additional information in the command line input.

cs gitlab refresh-website

Rebuilds the website using the Gitlab pipeline.