For teachers
The MWC CLI provides tools for teachers to manage sections of Making With Code courses.
Entities and Permissions
Making With Code aims to have a simple permissions system which aligns with laws protecting student privacy. We have not yet published formal terms of use, but if you have specific questions about policies or permissions, please contact us.
Each mwc user account, whether student or teacher, exists within an organization. No users are allowed to interact across organizational boundaries–for example, a teacher cannot add a student which is part of another organization to one of their sections.
Teachers manage students by adding them to sections. Sections can have more than one teacher, and each teacher in a section can edit the section, including adding or removing students or deleting the section altogether. Teachers are able to access their students’ work and change students’ passwords. When a student is removed from a section (or the section is deleted), teachers lose these permissions.
When a student is part of a section, any of that section’s teachers can access the student’s work,
Each student owns their own work, which is stored in private git repositories and accessed with a secure token
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 (unique) username, a password, and section slug. If the student account already exists, they are added to the section (and the password is not updated).
% 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 edit
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 student remove
Remove a student from a section.
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.