← Teacher guide

Show it's done: photos

Students give the chores checklist a photo per chore. A Photo object (camera allowed, or Choose a photo), a variable ForChore set when a chore's tick box is switched on, and one event, A photo is taken with Camera, whose sub-events check ForChore and show the photo beside the right chore. Nib's photo event skips the check, so every photo lands beside the bed.

App Builder apps · Pictures from the user · about 45 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Try 5 min · Build 1 6 min · Build 2 8 min · Build 3 12 min · Check 6 min · Make it yours 6 min

Before class

This lesson starts from the finished chores checklist (tick boxes and the dark mode button), with room made beside each chore for a hidden picture (BedPic, FeedPic, HomeworkPic). It's Level 3 (Photo); each step opens App Builder at Level 3. It follows Draw how you showed it, which met a picture the user makes, and the values journal, where a variable carried a choice between screens.

Camera: off unless Allow camera is ticked in the Photo's properties, and the browser asks too. Some school devices block cameras; Choose a photo (the button on every Photo) works everywhere, with no permission, and runs the same event. Photos stay in this browser (nothing is uploaded) and are shrunk to at most 1280 px.

Photos of things, not people: say so before the Try step. Students shouldn't photograph each other.

The second check question shows a gap on purpose: unticking doesn't clear ForChore, so a photo still goes to the last chore ticked. Make it yours hides the photo on untick; resetting ForChore to "" is in the ideas.

Running the lesson

  1. Before Try: photos of objects only. Choose a photo works if cameras are blocked.
  2. Build 2: ask what the photo event will know when it runs. Write ForChore on the board.
  3. Build 3: checkpoint: two chores, two photos, each beside its own chore.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

The tick and the photo are two different moments, and students expect the photo event to just know which chore it's for. Ask: when the photo arrives, what does the app know? Only what something wrote down earlier: ForChore.

When students get stuck

What you will seeA question to askThe fix
The camera says it's off for this app.Is Allow camera ticked in the Photo's properties? Is the camera blocked on this computer?Tick it, or use Choose a photo, which works either way.
Nothing appears after a photo.Did you tick a chore first? What does ForChore say on the left?Tick a chore first (ForChore is set when ticking), and check each sub-event has Show as well as Set picture.
Every photo goes beside the bed.Does each Set picture action sit inside a sub-event that checks ForChore?Put each one in its own sub-event: ForChore = "Bed", "Feed" or "Homework".

Answers to the checks

  1. Tick, untick, photo: You tick Do my homework, then untick it, then choose a photo. Where does the photo go?
    Beside Do my homework
    Unticking doesn't change ForChore, so it still says "Homework" and the photo goes there. (Make it yours fixes that.)
  2. Nib's photos: Every photo Nib adds appears beside Make my bed, whichever chore was ticked. Click the line where Nib goes wrong.
    line 3
    Line 3: Nib's photo event sets BedPic every time, without checking ForChore. The sub-events with ForChore = "Bed", "Feed" and "Homework" are what send each photo to its own chore.

Solutions

One possible solution for each task. Other correct programs are fine.

Make it yours: untick hides the photo

{"version":1,"name":"Daily chores (photos)","features":{"level":3},"variables":[{"name":"ForChore","value":""}],"screens":[{"id":"main","name":"Chores","objects":[{"name":"Title","kind":"text","instanceVars":[],"instances":[{"id":"title","x":229,"y":40,"w":342,"h":36,"text":"My jobs today","visible":true,"vars":{}}]},{"name":"Card","kind":"shape","instanceVars":[],"instances":[{"id":"card","x":213,"y":96,"w":374,"h":168,"text":"","visible":true,"vars":{},"color":"#f1f4f9"}]},{"name":"BedJob","kind":"toggle","instanceVars":[],"instances":[{"id":"bedjob","x":229,"y":108,"w":250,"h":40,"text":"Make my bed","visible":true,"vars":{},"on":false,"look":"tick"}]},{"name":"BedPic","kind":"image","instanceVars":[],"instances":[{"id":"bedp1","x":525,"y":106,"w":44,"h":44,"text":"","visible":false,"vars":{},"image":""}]},{"name":"FeedJob","kind":"toggle","instanceVars":[],"instances":[{"id":"feedjob","x":229,"y":160,"w":250,"h":40,"text":"Feed the dog","visible":true,"vars":{},"on":false,"look":"tick"}]},{"name":"FeedPic","kind":"image","instanceVars":[],"instances":[{"id":"feedp1","x":525,"y":158,"w":44,"h":44,"text":"","visible":false,"vars":{},"image":""}]},{"name":"HomeworkJob","kind":"toggle","instanceVars":[],"instances":[{"id":"homeworkjob","x":229,"y":212,"w":250,"h":40,"text":"Do my homework","visible":true,"vars":{},"on":false,"look":"tick"}]},{"name":"HomeworkPic","kind":"image","instanceVars":[],"instances":[{"id":"homeworkp1","x":525,"y":210,"w":44,"h":44,"text":"","visible":false,"vars":{},"image":""}]},{"name":"ModeButton","kind":"button","instanceVars":[],"instances":[{"id":"modebutton","x":229,"y":312,"w":160,"h":46,"text":"🌙 Dark","visible":true,"vars":{}}]},{"name":"Camera","kind":"photo","instanceVars":[],"instances":[{"id":"cam1","x":229,"y":372,"w":293,"h":220,"text":"","visible":true,"vars":{},"shutter":true}]}],"events":[{"id":"m1","else":false,"conds":[{"type":"onClicked","target":"ModeButton"}],"actions":[],"children":[{"id":"m1a","else":false,"conds":[{"type":"compareVar","var":"Dark","op":"=","value":"false"}],"actions":[{"type":"setVar","var":"Dark","value":"true"},{"type":"setBackground","value":"\"#1c2333\""},{"type":"setColour","target":"Title","value":"\"white\""},{"type":"setText","target":"ModeButton","value":"\"☀️ Light\""}],"children":[]},{"id":"m1e","else":true,"conds":[],"actions":[{"type":"setVar","var":"Dark","value":"false"},{"type":"setBackground","value":"\"white\""},{"type":"setColour","target":"Title","value":"\"black\""},{"type":"setText","target":"ModeButton","value":"\"🌙 Dark\""}],"children":[]}]},{"id":"BedJob","else":false,"conds":[{"type":"onToggled","target":"BedJob"}],"actions":[],"children":[{"id":"BedJoba","else":false,"conds":[{"type":"isOn","target":"BedJob","state":"on"}],"actions":[{"type":"setVar","var":"ForChore","value":"\"Bed\""}],"children":[]},{"id":"BedJobe","else":true,"conds":[],"actions":[{"type":"setVisible","target":"BedPic","visible":"hide"}],"children":[]}]},{"id":"FeedJob","else":false,"conds":[{"type":"onToggled","target":"FeedJob"}],"actions":[],"children":[{"id":"FeedJoba","else":false,"conds":[{"type":"isOn","target":"FeedJob","state":"on"}],"actions":[{"type":"setVar","var":"ForChore","value":"\"Feed\""}],"children":[]},{"id":"FeedJobe","else":true,"conds":[],"actions":[{"type":"setVisible","target":"FeedPic","visible":"hide"}],"children":[]}]},{"id":"HomeworkJob","else":false,"conds":[{"type":"onToggled","target":"HomeworkJob"}],"actions":[],"children":[{"id":"HomeworkJoba","else":false,"conds":[{"type":"isOn","target":"HomeworkJob","state":"on"}],"actions":[{"type":"setVar","var":"ForChore","value":"\"Homework\""}],"children":[]},{"id":"HomeworkJobe","else":true,"conds":[],"actions":[{"type":"setVisible","target":"HomeworkPic","visible":"hide"}],"children":[]}]},{"id":"phe","else":false,"conds":[{"type":"onPhotoTaken","target":"Camera"}],"actions":[],"children":[{"id":"ph0","else":false,"conds":[{"type":"compareVar","var":"ForChore","op":"=","value":"\"Bed\""}],"actions":[{"type":"setImageFrom","target":"BedPic","value":"Camera.picture"},{"type":"setVisible","target":"BedPic","visible":"show"}],"children":[]},{"id":"ph1","else":false,"conds":[{"type":"compareVar","var":"ForChore","op":"=","value":"\"Feed\""}],"actions":[{"type":"setImageFrom","target":"FeedPic","value":"Camera.picture"},{"type":"setVisible","target":"FeedPic","visible":"show"}],"children":[]},{"id":"ph2","else":false,"conds":[{"type":"compareVar","var":"ForChore","op":"=","value":"\"Homework\""}],"actions":[{"type":"setImageFrom","target":"HomeworkPic","value":"Camera.picture"},{"type":"setVisible","target":"HomeworkPic","visible":"show"}],"children":[]}]}]}],"device":"web","allowCamera":true}

Stretch and support

Stretch: Keep the photos in a table instead (chore, photo), so the app could show a history: that's how Data apps' A journal with drawings works.

Support: Do Build 3's first sub-event together; pairs copy it for Feed and Homework.

Exit ticket

A parcel app takes a photo for whichever parcel was tapped last. What does the app need to remember, and where does it check it?

A variable with the tapped parcel (set when it's tapped), checked in the photo event's sub-events so the photo goes with the right parcel.

What each step is for

Where it leads

Next: Creature stats. A variable that remembers which one (ForChore here, ClickedItem later) comes back whenever an app handles several things with one event.