Getting started
===============
.. note::
This is a guide for teachers who want to get started with
*Making With Code*. If you are a student in a *Making With Code*
course, your teacher will show you how to use this program.
You can use the :ref:`students` section for reference if you want.
This guide will help you create a
section of a *Making With Code* course, either using sample data
to try out the system or to prepare a course for your real students.
You will need a MWC teacher account before you can use the
MWC CLI. If you don't have an account, please contact us
(see :ref:`contact`).
Install the CLI
---------------
Follow the `student setup instructions `_ to install the CLI on your computer. You can confirm the CLI is installed by opening Terminal and
running ``mwc version``:
.. code-block::
% mwc version
MWC 3.2.0
Set up your teacher role
------------------------
Run ``mwc setup`` to set up your computer for MWC.
Then run ``mwc teach setup`` to configure your teacher role.
Don't worry too much about these questions--you can always
re-run the setup commands to change any of your settings.
If you see "This is not a teacher account" please contact us
(see :ref:`contact`) to add the teacher role to your account.
Create a section
----------------
A section is a group of students with one or more teachers,
using a specific *Making With Code* curriculum. In this guide
we will use the standard curriculum, published at
https://makingwithcode.org. Create a new section using the
``mwc teach section create`` command.
When you create a section, you are asked to provide some information:
* The section name is whatever you want to call this group of students.
* The slug is a short, unique identifier for this section.
* The curriculum site URL is the location of your MWC curriculum.
* The course name is a course published at the curriculum site URL.
* The join code is a code students can use to join your course. (This feature is not yet supported; currently only teachers can add students to sections.)
.. tip::
The section slug and join code must be unique, so use different values from those below.
.. code-block::
% 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
Add students
------------
Now let's add students to the section. In this guide we will add students
one-by-one, but in a real course you would want to bulk-create students instead.
To create a student, specify a (unique) username, password, and section slug.
Again, use different values from those below.
.. note::
If the student user already exists as part of your school's MWC account (e.g.
because they were part of a previous course), the existing user will be
added to the section instead of creating a new user.
.. code-block::
%mwc teach student create student1 supersecret cs-100-1
Created student student1 in cs-100-1
Generate some student activity
------------------------------
The rest of this guide involves interacting with student activity, so we are going to
impersonate the student you just created and submit a lab on their behalf. First we will
set up your student's account :ref:`using a separate config file `.
.. code-block::
% mwc setup --config ~/Desktop/mwc_demo/student1.yaml
Welcome to Making with Code setup. This program will ask you for some settings
and make sure all the required software is installed on your computer. Some of
the steps may take a while to complete. A few notes:
- You can re-run this script if you want to make any changes.
- You can quit this program by pressing Control + C at the same time.
- Many questions have default values, shown in [brackets]. Press enter to accept
the default.
- The setup may ask for your password. As a security measure, you won't see any
characters when you type it in.
- If you get stuck or have any questions, ask a teacher.
What is your MWC username?: student1
What is your MWC password?:
Where do you want to save your MWC work?: ~/Desktop/mwc_demo
...
You now have all of student1's work at ``~/Desktop/mwc_demo``, and can use ``mwc`` as
student1 by specifying ``~/Desktop/mwc_demo/student1.yaml`` as the config file.
(In a similar way, multiple students could use the same computer, or one student could
work on multiple computers.)
Now let's edit the student's lab and submit their work.
.. code-block::
% cd ~/Desktop/mwc_demo/mwc1/unit1/lab_turtle
% code .
The `Turtle Lab ` will open
in your editor. Make a few changes to ``drawing.py``, save the file, and close the editor.
Now we will submit the student's work:
.. code-block::
% mwc submit
You will be shown the changes you made (enter ``y`` to confirm this is what you want to submit),
and then your editor will open so you can type your submit message. Every time students submit
their work, they describe what they have changed, and often answer reflective questions as well.
Save and close the file, and you will see confirmation that your work has been submitted.
Status
------
OK, back to teacher mode. You will frequently want to check on students' progress.
``mwc teach status`` will pull all students' work and summarize it
:ref:`with a powerful set of options to filter the query `.
For now, let's see how many lines of code our student has changed:
.. code-block::
% mwc teach status --update --unit 1 --measure py-lines
Counting changed lines in Python files: 1/1
cs-100-1 | Making With Code I
username lab_turtle
---------- ------------
student1 1
Logs
----
``mwc teach log`` aggregates students' commit messages, with the same filtering
options as ``mwc teach status``. Logs can be used to see students' answers to checkpoints
in labs, or as an "exit ticket" for status updates at the end of class.
.. code-block::
% mwc teach log --module turtle
Collecting logs: 1/1
--------------------------------------------------------------------------------
cs-100-1/student1/unit1/lab_turtle
Author: student1
Date: 2025-08-20T21:53:38-04:00
I tried my best.