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:
--namewhatever you want to call this group of students.--sluga short, unique identifier for this section.--curriculum-site-urlthe location of your MWC curriculum. By default this is https://makingwithcode.org.--course-namethe name of the course.--codea 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:
--sectionFilter by section name/slug--userFilter by username
Filter which repositories to show:
--courseFilter by course name--unitFilter by unit name/slug--moduleFilter by module name/slug
What to show about each module:
--measureControl 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--beginOnly consider commits on or after this date.--endOnly consider commits before this date.
Control the output format:
--anonymousHide usernames--shortShow short module namesoutfileExport results as CSV
Other options:
--updateRuns mwc teach update first--threadsMaximum 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:
--sectionFilter by section name/slug--userFilter by username
Filter which repositories to show:
--courseFilter by course name--unitFilter by unit name/slug--moduleFilter by module name/slug
Filter which commits to include:
--beginOnly consider commits on or after this date.--endOnly consider commits before this date.
Other options:
--updateRuns mwc teach update first--threadsMaximum number of threads to use in parallel processing.