For teachers

The MWC CLI provides tools for teachers to manage sections of Making With Code courses.

Tip

The documentation below describes the most common use cases for each command, does not include an exhaustive list of options. Add --help to any command in the CLI to see all its options.

mwc teach setup

Sets up your teacher role. Run mwc teach setup after running mwc setup.

Note

You will not be able to use teacher functionality unless your account is enabled as a teacher. If you are interested in using Making With Code in your classroom, please contact us.

% mwc teach setup
Welcome to Making with Code setup. This command will configure your teacher
role. If you also have a student role, the same config file will be used by
default. You can specify a separate config file using --config.

What is your MWC username? [chris]:
Where do you want to save your MWC work?:
Which code editor do you want to use? [code]:
Where do you want to save MWC student repositories?:

mwc teach section

Shows a list of your sections. Use --outfile to export as a CSV.

mwc teach section create

Create a new section. The following options can be used to specify properties of the section:

  • --name whatever you want to call this group of students.

  • --slug a short, unique identifier for this section.

  • --curriculum-site-url the location of your MWC curriculum. By default this is https://makingwithcode.org.

  • --course-name the name of the course.

  • --code a code students can use to join your course (this feature is not yet supported; currently only teachers can add students to sections.)

If any of the above options are not specified, you will be prompted for their values.

% mwc teach section create
Section name: Intro to CS
Section slug: cs-100-1
Curriculum site URL [https://makingwithcode.org]:
The following courses are published at https://makingwithcode.org:
- Making With Code I
- Making With Code II
Course name (Making With Code I, Making With Code II): Making With Code I
Join code: 123456

name         slug      curriculum_site_url         course_name           code
-----------  --------  --------------------------  ------------------  ------
Intro to CS  cs-100-1  https://makingwithcode.org  Making With Code I  123456

mwc teach section edit

Update properties of a section. All properties listed in mwc teach section create can be passed as options except the slug, which cannot be changed.

% mwc teach section edit cs-100-1 --name "Fun with computers"

mwc teach student create

Add a student user to a section. Provide a username, a password, and the section slug. To create a student, specify a (unique) username, password, and section slug.

% mwc teach student create student1 supersecret cs-100-1
Created student student1 in cs-100-1

Note

Bulk-addition of students to sections is coming but is not yet supported.

mwc teach student update

Update a student’s password, providing the username and the new password.

Note

Students only need their passwords when they initially set up their accounts: after a successful login, an access token is stored in the MWC config file. The password itself is not stored.

mwc teach update

Updates all student work repositories, pulling all commits.

mwc teach status

View a tabular summary of student work, by repository. This command has many options which can be powerfully combined:

Filter which students to show:

  • --section Filter by section name/slug

  • --user Filter by username

Filter which repositories to show:

  • --course Filter by course name

  • --unit Filter by unit name/slug

  • --module Filter by module name/slug

What to show about each module:

  • --measure Control what statistic to report about each repository. Choices include: * commits: Count the number of commits * py-lines: Count the number of lines changed in Python files * md-lines: Count the number of lines changed in markdown files

  • --begin Only consider commits on or after this date.

  • --end Only consider commits before this date.

Control the output format:

  • --anonymous Hide usernames

  • --short Show short module names

  • outfile Export results as CSV

Other options:

  • --update Runs mwc teach update first

  • --threads Maximum number of threads to use in parallel processing.

mwc teach log

Aggregate and report students’ commit messages. As with mwc teach status, there are many options to filter results:

Filter which students to show:

  • --section Filter by section name/slug

  • --user Filter by username

Filter which repositories to show:

  • --course Filter by course name

  • --unit Filter by unit name/slug

  • --module Filter by module name/slug

Filter which commits to include:

  • --begin Only consider commits on or after this date.

  • --end Only consider commits before this date.

Other options:

  • --update Runs mwc teach update first

  • --threads Maximum number of threads to use in parallel processing.