diff --git a/docs/project.prd b/docs/project.prd index d5eed24f4456d44f90418f71d52a6d02b3b6f87d..32860096cfa1f5323520f71ed544432d921e47ac 100644 --- a/docs/project.prd +++ b/docs/project.prd @@ -1,3 +1,9 @@ +The app is written from scratch. Kept from the current app: +- the exercises (app/math_algebra9.json) +- the drawing board (static/math-board.js, static/board-math.js, static/vendor/mathlive) + + + Glossary: - skill (מיומנות): a specific topic like פירוק טרינום diff --git a/docs/tasks/prd-mathly.md b/docs/tasks/prd-mathly.md index 0a51fc5d9b1ee150bf7a39c755e7366c6b0d2617..f1ca1bb8a8254651b06bd9210c768beb56518140 100644 --- a/docs/tasks/prd-mathly.md +++ b/docs/tasks/prd-mathly.md @@ -15,10 +15,8 @@ Mathly solves this with two tools: Teachers give and check assignments, set tests, and see the class's progress per skill and per lesson. -Much of the app already exists. Each requirement below is tagged: -- **[exists]** – already built; keep as is. -- **[change]** – already built, but must change to match this PRD. -- **[new]** – not built yet. +**The app is written from scratch.** Only two parts of the current app are kept (see 7.1): +the **exercise bank** and the **drawing board**. Everything else – screens, server, database, sign-in – is new. ### Glossary @@ -49,9 +47,10 @@ Much of the app already exists. Each requirement below is tagged: - As a student, I want to see how many days are left until my test, how ready I am, and what to do today, so I don't have to plan by myself. - As a student, I want to practice with timed, mixed tests before the real test, so the real test doesn't surprise me. - As a student, I want one full simulation of the real test, so I know where I stand while there is still time to fix gaps. +- As a student, I want to solve on a drawing board when a question needs a full solution, and hand it in from there. **Teacher** -- As a teacher, I want to give an assignment from a file, from the classroom smart board, or from a photo, so I can use whatever material I already have. +- As a teacher, I want to give an assignment from a file, from a photo, or by writing it on the drawing board, so I can use whatever material I already have. - As a teacher, I want to check submitted assignments and give a grade and feedback. - As a teacher, I want to set a test date and the lessons it covers, so the app prepares my students for it. - As a teacher, I want to see who has taken the simulation test. @@ -64,46 +63,39 @@ Much of the app already exists. Each requirement below is tagged: Each skill takes the student through four stages, in this order. -1. **[change] Worked example.** The system must show a fully solved example of the skill, one step at a time. - After each step, the system must ask the student "why this step?" (multiple choice or short answer) before revealing the next one. - *Today the worked example exists inside the help window and shows the explanation of each step, but does not ask the student.* -2. **[new] Faded examples.** The system must show solved examples with steps removed: first one step missing, then two, and so on. - The student must fill in each missing step. A wrong step gets immediate feedback (see 4). -3. **[change] Practice.** The system must give the student practice questions on the skill. -4. **[change] Feedback on mistakes.** After a wrong answer, the system must: - - show feedback that names the specific mistake (e.g. "the sign changed when moving the term across"), not only "wrong"; +1. **Worked example.** The system must show a fully solved example of the skill, one step at a time. + After each step, the system must ask the student "why this step?" (multiple choice) before revealing the next one. +2. **Faded examples.** The system must show solved examples with steps removed: first one step missing, then two, and so on. + The student must fill in each missing step. A wrong step gets immediate feedback (see requirement 4). +3. **Practice.** The system must give the student practice questions on the skill, taken from the exercise bank. +4. **Feedback on mistakes.** After a wrong answer, the system must: + - show feedback that names the specific mistake, using the mistake attached to the chosen wrong answer in the exercise bank + (its name and tip, e.g. "טעות סימן באיבר האמצעי"); - not reveal the correct answer; - - give the student a **similar** question (same skill, different numbers or wording), not the same question again. - *Today the same question comes back after the others.* -5. **[change] Mastery.** A skill must become **mastered** when the student answers 3 questions correctly in a row, + - give the student a **similar** question (same skill, a different question), not the same question again. +5. **Mastery.** A skill must become **mastered** when the student answers 3 questions correctly in a row, on the first try, without opening help or the worked example, and these answers are spread over at least 2 different calendar days. - *Today a star turns gold after several correct first-try answers in a row, with no "2 days" rule.* -6. **[change] Skill states.** Every skill, for every student, must be in one of these states: +6. **Skill states.** Every skill, for every student, must be in one of these states: - **not started** – no answers yet; - **learning** – at least one answer, not yet mastered; - **mastered** – met the rule in requirement 5. A mastered skill stays mastered. It must **not** fade or decay over time. - *Today a star fades after two weeks without practice. Remove the fading, and remove the "mixed review" that is triggered by it.* -7. **[exists] All lessons open.** The student must be able to open any lesson, and any skill inside it, at any time, in any order. -8. **[exists] Daily goal and streak.** 5 correct answers per day builds a streak. -9. **[exists] Collection.** Each skill is a star; each completed lesson draws a constellation. The collection tab shows them. +7. **All lessons open.** The student must be able to open any lesson, and any skill inside it, at any time, in any order. +8. **Daily goal and streak.** 5 correct answers per day builds a streak. +9. **Collection.** The student must have a collection screen that shows what they achieved: each mastered skill and each completed lesson. ### 4.2 Quizzes (בוחן) -10. **[exists] Quiz per lesson.** Each lesson has a quiz. The student can retake it; the best grade counts; every retake draws new questions. +10. **Quiz per lesson.** Each lesson must have a quiz. The student can retake it; the best grade counts; every retake draws new questions. The quiz's best grade is the lesson's grade. -11. **[change] One quiz type only.** The retakeable quiz is the only quiz. The system must remove the end-of-lesson summary quiz (בוחן מסכם): - it is taken once, opened by the teacher, and is today the lesson's official grade. - *Today each lesson has two quizzes: a retakeable practice quiz (בוחן חיזוק, not graded) and the summary quiz.* -12. **[exists] After a quiz,** the system must list the skills where the student lost points, so they can practice them before retaking. +11. **After a quiz,** the system must list the skills where the student lost points, so they can practice them before retaking. ### 4.3 Test countdown -13. **[change] Setting a test.** The teacher must be able to set a test: date + the lessons it covers (+ an optional note), +12. **Setting a test.** The teacher must be able to set a test: date + the lessons it covers (+ an optional note), plus the real test's **number of questions** and **time limit**. These start with defaults (12 questions, 90 minutes) that the teacher can change. - *Today date, lessons and note exist; number of questions and time limit are new.* -14. **[change] The countdown plan.** From the moment a test is set, the system must show the student a plan that depends on the days left: +13. **The countdown plan.** From the moment a test is set, the system must show the student a plan that depends on the days left: | Days before the test | What the app asks the student to do | |---|---| @@ -115,21 +107,19 @@ Each skill takes the student through four stages, in this order. The day numbers are **recommendations**: the student can start each step earlier or later. If the test is set less than 9 days ahead, the system must keep the same order and shorten the gaps evenly. -15. **[change] Home screen reminder.** The home screen must show, for the nearest test: +14. **Home screen reminder.** The home screen must show, for the nearest test: days left, the readiness meter (see 4.6), and **one task for today** taken from the plan. When several tests are coming up, "today's task" comes from the **closest** one. ### 4.4 Exercise tests (מבחן תרגול) -16. **[change] Created by the app.** When the teacher sets a test, the system must create 2 exercise tests for every student in the class and place them on the student's countdown. -17. **[change] Teacher can assign one.** The teacher must be able to send an exercise test to the whole class as an assignment. - *Today only admins can assign exercise tests to a class.* -18. **[exists] Retakes.** The student can start or retake an exercise test at any time. Each retake draws new questions; the best grade counts. -19. **[change] Like the simulation.** Exercise tests must have the same number of questions and the same time limit as the simulation - (that is, as the real test, requirement 13), mix questions from all covered lessons, and not show the skill name. +15. **Created by the app.** When the teacher sets a test, the system must create 2 exercise tests for every student in the class and place them on the student's countdown. +16. **Teacher can assign one.** The teacher must be able to send an exercise test to the whole class as an assignment. +17. **Retakes.** The student can start or retake an exercise test at any time. Each retake draws new questions; the best grade counts. +18. **Like the simulation.** Exercise tests must have the same number of questions and the same time limit as the simulation + (that is, as the real test, requirement 12), mix questions from all covered lessons, and not show the skill name. Feedback comes **only at the end**, not after each question. - *Today exercise tests 1 and 2 give feedback after each question.* -20. **[change] Question mix.** The system must pick questions in these proportions: +19. **Question mix.** The system must pick questions in these proportions: | Exercise test | Weak skills | Other covered skills | |---|---|---| @@ -139,79 +129,95 @@ Each skill takes the student through four stages, in this order. "Weak skill" = a skill in the "learning" state, or one the student answered wrong in a previous exercise test. Skills in the "not started" state must not appear; instead, the card must list them as "practice these first". If the student has fewer weak skills than needed, fill the rest from the other covered skills. -21. **[exists] Result links back.** After an exercise test, the system must show the weak skills it found and link each one to its place in the path. +20. **Result links back.** After an exercise test, the system must show the weak skills it found and link each one to its place in the path. ### 4.5 Simulation test (מבחן סימולציה) -22. **[new] Required, one attempt.** Every student must take one simulation test per real test. It can be taken only once. -23. **[new] Like the real test.** The simulation must cover all the lessons of the real test, with the number of questions and the time limit the teacher set for the real test (requirement 13), +21. **Required, one attempt.** Every student must take one simulation test per real test. It can be taken only once. +22. **Like the real test.** The simulation must cover all the lessons of the real test, with the number of questions and the time limit the teacher set for the real test (requirement 12), no skill names, and no feedback until the end. -24. **[new] Window.** The simulation becomes available ~5 days before the test and stays available until the test day. +23. **Window.** The simulation becomes available ~5 days before the test and stays available until the test day. It must be shown as **required** on the student's home screen until it is taken. -25. **[new] After the simulation,** the system must list the skills that failed and turn them into the review tasks of the last days (requirement 14). +24. **After the simulation,** the system must list the skills that failed and turn them into the review tasks of the last days (requirement 13). ### 4.6 Readiness meter -26. **[change] Readiness meter.** For each upcoming test, the system must show the student (and the teacher) a readiness meter made of: +25. **Readiness meter.** For each upcoming test, the system must show the student (and the teacher) a readiness meter made of: - % of the covered skills that are mastered; - the best grade of each exercise test; - the simulation test grade (once taken). - *Today the test-prep screen shows readiness per skill and recent quiz grades.* ### 4.7 Student screens -27. **[exists] Home:** my assignments (המשימות שלי) from the teacher; the upcoming-test reminder (requirement 15); continue the path. -28. **[exists] Path:** all lessons and skills. -29. **[change] Grades:** all quiz (best grade), exercise test, simulation and homework grades. - *Today it also lists summary quizzes, marked ★; remove them.* -30. **[exists] Collection:** stars, constellations, and the class test calendar. +26. **Home:** my assignments (המשימות שלי) from the teacher; the upcoming-test reminder (requirement 14); continue the path. +27. **Path:** all lessons and skills, each skill showing its state. +28. **Grades:** all quiz (best grade), exercise test, simulation and assignment grades. +29. **Collection:** see requirement 9. +30. **Drawing board.** Wherever a question needs a written solution (open questions, assignments), the student must be able to + solve on the drawing board and hand in the board as their answer. ### 4.8 Teacher screens -31. **[change] Give an assignment.** The teacher must be able to create an assignment and load its content from: - - the computer (file upload: PDF or images) – **[exists]**; - - a photo taken with the device camera – **[new]** for assignments (exists today only for lesson resources); - - the app's drawing board (static/math-board.js, the same board students solve on) – **[new]** for assignments: - the teacher draws or writes the assignment on the board, and it is saved as the assignment's page(s). -32. **[exists] Check assignments.** The teacher must be able to open each student's submission, give a grade (0–100) and a note, or send it back for correction. -33. **[change] Tests tab.** The teacher must be able to set a test (requirement 13) and see, for each test, which students have taken the simulation test and which have not. -34. **[new] Class heat map.** +31. **Give an assignment.** The teacher must be able to create an assignment (title, note, due date) and load its content from: + - the computer (file upload: PDF or images); + - a photo taken with the device camera; + - the drawing board: the teacher writes or draws the assignment on the board, and it is saved as the assignment's page(s). +32. **Check assignments.** The teacher must be able to open each student's submission, give a grade (0–100) and a note, or send it back for correction. +33. **Tests tab.** The teacher must be able to set a test (requirement 12) and see, for each test, which students have taken the simulation test and which have not. +34. **Class heat map.** - Rows: students. Columns: skills (grouped by lesson). - Each cell is colored by the skill state: not started / learning / mastered. - Tabs for the period: **Sep–Dec** and **Jan–Jun**. A period shows the skills of the lessons taught in it, and states as they were at the end of the period (or today, for the current period). -35. **[new] Student lesson coverage.** +35. **Student lesson coverage.** - Rows: students. Columns: lessons. - Each cell shows the % of the lesson's skills the student has mastered, and the student's best quiz (בוחן) grade for that lesson. - Same period tabs: **Sep–Dec** and **Jan–Jun**. ## 5. Non-Goals (Out of Scope) +- Reusing any part of the current app other than the exercise bank and the drawing board. - Skills do not decay or need re-mastering over time. - Lessons are never locked; the app does not force an order. +- There is no one-time summary quiz (בוחן מסכם). - The app does not grade the real school test or import its grades. - The app does not replace the teacher's lesson plan or teach new material in class. - No student-to-student features (chat, leaderboards). ## 6. Design Considerations -- Hebrew, right-to-left. Works on phones first. -- Keep the existing look: the path as constellations, a skill as a star, the collection tab. -- Mastered skills should look clearly different from "learning" ones (today: gold star). With fading removed, there is no "dim" star. +- Hebrew, right-to-left. Works on phones first; the teacher views (heat map, coverage) must also work well on a computer. +- Math is written in LaTeX inside `$…$` in the exercise bank; the app must render it. +- Mastered skills must look clearly different from "learning" and "not started" ones. - Heat map colors must be readable in light and dark mode and must not rely on color alone (add a symbol or text in each cell). - The "one task for today" on home must be a single, obvious button. ## 7. Technical Considerations -- Grades that matter (quiz, simulation) must be computed and stored on the server, so a student cannot change them from the device. - Today some progress data (skill progress, practice tests) is reported by the student's device; the heat map and coverage views should mark device-reported data the same way the class report does today. +### 7.1 What is kept from the current app + +**Exercise bank** – `app/math_algebra9.json` (9th grade algebra/geometry): +- `units`: 24 lessons (id, name, month, and for 4 of them a `quiz` with open questions, points, minutes and the skills each question tests). +- `skills`: 96 skills (id, lesson, name, short name, description, prerequisites, month, `questions`). +- `questions`: 1,050 multiple-choice questions. Each wrong choice has a `mistake` id. +- `mistakes`: 244 mistakes, each with a name, a tip, and the skill to go back to (`back`). + +**Drawing board** – `static/math-board.js` (the board), `static/board-math.js` (typed math on the board) and +`static/vendor/mathlive/` (the math keyboard library, MIT license, loaded by board-math.js). +It exposes `window.MathlyBoard` and turns a sketch into a picture for handing in. + +### 7.2 Notes for the new build + +- **Content gaps in the bank.** The new app needs content the bank does not have yet: + - worked examples and faded examples (requirements 1–2): no skill has one today; + - "why this step?" choices for each step of a worked example; + - quizzes for 20 of the 24 lessons (requirement 10); + - one skill has no questions; + - enough questions per skill for "similar question" (requirement 4) and for retakes that draw new questions. + `scripts/draft_examples.py` from the current app drafts worked examples with AI for a teacher to approve; it may be reused as a tool. +- Grades that matter (quiz, exercise test, simulation) must be computed and stored on the server, so a student cannot change them from the device. - Mastery (requirement 5) needs the date of each answer, so the server can check the "2 different days" rule. -- "Similar question" (requirement 4) requires each skill to have enough questions, or question templates with changing numbers. -- The simulation's timer must be kept on the server (like the end-of-lesson quiz today), so refreshing or closing the app does not reset it. -- Removing the summary quiz (requirement 11) affects existing code: the "summary quizzes" tab in the class report, - opening/closing windows, extra attempts, publishing results, the AI-queue and "to review" entries for it, and the ★ grades. - Its server-kept timer and server-side grading should be reused for the simulation test (and for the retakeable quiz's grade) before the rest is removed. - Decide what happens to summary-quiz grades already stored (see Open Questions). -- Removing star fading affects existing code: the fading logic, "mixed review", and any "fading" status in the class report and test prep. +- The simulation's timer must be kept on the server, so refreshing or closing the app does not reset it. +- Open questions in quizzes and assignments need checking: by the teacher (requirement 32), possibly with AI help (see Open Questions). ## 8. Success Metrics @@ -222,5 +228,9 @@ Each skill takes the student through four stages, in this order. ## 9. Open Questions -1. **Existing summary-quiz grades:** when the summary quiz is removed, should grades students already got stay visible (read-only), or be dropped? -2. **Default time limit:** 90 minutes was chosen as the default for a real test. Is that right for most tests, or should it be 45? +1. **Default time limit:** 90 minutes was chosen as the default for a real test. Is that right for most tests, or should it be 45? +2. **Existing data:** should students, classes and progress from the current app move to the new one, or does the new app start empty? +3. **Sign-in and roles:** keep sign-in with the school's Google accounts? Is there an admin role (creates classes, adds students), or does the teacher do that? +4. **Subjects:** math only, or also science (the current app has a small science part)? +5. **Checking open answers:** does the teacher check everything by hand, or should AI suggest a grade for the teacher to approve? +6. **Tech stack and location:** same repository (new folder) or a new one? Any preferred stack, or keep Python + Supabase? diff --git a/mathly2/Dockerfile b/mathly2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a674f558c0a7b66890aed76519dd1143ed55470e --- /dev/null +++ b/mathly2/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1 +# Build from the repository root: docker build -f mathly2/Dockerfile -t mathly2 . +# CPU image; runs on Hugging Face Spaces (Docker SDK), Render, Fly, or any VM. +FROM python:3.11-slim + +# Spaces runs the container as uid 1000 +RUN useradd -m -u 1000 user +ENV HOME=/home/user PYTHONUNBUFFERED=1 +WORKDIR /home/user/app + +COPY mathly2/requirements.txt mathly2/requirements.txt +RUN pip install --no-cache-dir -r mathly2/requirements.txt + +USER user +COPY --chown=user mathly2 ./mathly2 + +EXPOSE 7860 +CMD ["sh", "-c", "uvicorn mathly2.main:app --host 0.0.0.0 --port ${PORT:-7860}"] diff --git a/mathly2/Dockerfile.dockerignore b/mathly2/Dockerfile.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..4ad9e8d7e67ee31cbe86e11790227dcf12faf689 --- /dev/null +++ b/mathly2/Dockerfile.dockerignore @@ -0,0 +1,4 @@ +* +!mathly2 +mathly2/tests +mathly2/**/__pycache__ diff --git a/mathly2/README.md b/mathly2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7e845b0e301316da121e59be0b5ca0eaf7071f1a --- /dev/null +++ b/mathly2/README.md @@ -0,0 +1,64 @@ +# Mathly 2 + +The rebuilt Mathly app. Requirements: `docs/tasks/prd-mathly.md`; specs and plans: `openspec/`. +The current app (`app/`, `static/`) is separate and keeps running until this one replaces it. + +## Run locally + +Run these from the repository root. + +```bash +python3 -m venv venv +venv/bin/python -m pip install -r mathly2/requirements-dev.txt +venv/bin/python -m uvicorn mathly2.main:app --port 7861 +``` + +Open . With the Supabase settings empty, the app uses an in-memory store and a +"dev only" sign-in that takes an email address; nothing is saved after a restart. +Add teachers with `TEACHER_EMAILS=you@school.example venv/bin/python -m uvicorn …`. + +## Tests + +```bash +venv/bin/python -m playwright install chromium # once, for the browser tests +venv/bin/python -m pytest mathly2/tests +``` + +## Settings + +| Setting | Meaning | +|---|---| +| `SUPABASE_URL` | The Supabase project's URL | +| `SUPABASE_PUBLISHABLE_KEY` | The publishable key. Sent to the browser for Google sign-in | +| `SUPABASE_SECRET_KEY` | The secret key. Server only; never sent to the browser | +| `TEACHER_EMAILS` | Teachers' email addresses, separated by commas, spaces or new lines | +| `PORT` | The port in the container (default 7860) | + +Set all three Supabase values or none. With none, the app runs locally with the in-memory store and the +"dev only" sign-in; with only some, the server refuses to start (so a half-configured deployment can never +accept any email address as a sign-in). + +## Database + +Run the files in `mathly2/supabase/migrations/` in order (the Supabase SQL editor or `supabase db push`). +They add only tables named `m2_…`, which only the server can read or write; the current app's tables are untouched. +Turn on Google sign-in in the Supabase project and add the app's address to its redirect URLs. + +## Docker + +Build from the repository root: + +```bash +docker build -f mathly2/Dockerfile -t mathly2 . +docker run --rm -p 7860:7860 mathly2 # then open http://localhost:7860 +``` + +Add `-e SUPABASE_URL=… -e SUPABASE_PUBLISHABLE_KEY=… -e SUPABASE_SECRET_KEY=… -e TEACHER_EMAILS=…` for a real run. +A Hugging Face Space needs the Dockerfile at the top of its repository: create the Space from a copy of this repository +whose root `Dockerfile` is `mathly2/Dockerfile` with the `mathly2/` paths unchanged, and set the settings above as Space secrets. + +## Content the bank still lacks + +```bash +venv/bin/python -m mathly2.scripts.content_gaps +``` diff --git a/mathly2/__init__.py b/mathly2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3b3d5456e5506aa09d05d09c640a900c98c466ec --- /dev/null +++ b/mathly2/__init__.py @@ -0,0 +1 @@ +"""Mathly 2: the rebuilt app (see docs/tasks/prd-mathly.md).""" diff --git a/mathly2/auth.py b/mathly2/auth.py new file mode 100644 index 0000000000000000000000000000000000000000..ce01d9e67ccc0447093e8fd2d70ec7d4e78dc307 --- /dev/null +++ b/mathly2/auth.py @@ -0,0 +1,87 @@ +"""Who is calling. The browser signs in with Google through Supabase and sends its access token; +the server asks Supabase who the token belongs to. Teachers are the emails in TEACHER_EMAILS; everyone else is a student.""" +from __future__ import annotations + +import json +import re +import threading +import time +import urllib.error +import urllib.request +import uuid + +from fastapi import Depends, HTTPException, Request + +TIMEOUT = 10 +CACHE_SECONDS = 300 +EMAIL = re.compile(r"^[^@\s]{1,64}@[^@\s]{1,255}\.[^@\s]{2,}$") + + +class AuthUnavailable(RuntimeError): + """Supabase could not be reached.""" + + +class SupabaseAuthenticator: + def __init__(self, url: str, key: str) -> None: + self.url, self.key = url.rstrip("/"), key + self._cache: dict[str, tuple[float, dict]] = {} + self._lock = threading.Lock() + + def user(self, token: str) -> dict | None: + now = time.monotonic() + with self._lock: + cached = self._cache.get(token) + if cached and cached[0] > now: + return cached[1] + request = urllib.request.Request(self.url + "/auth/v1/user", + headers={"Authorization": f"Bearer {token}", "apikey": self.key, "User-Agent": "mathly2/1.0"}) + try: + with urllib.request.urlopen(request, timeout=TIMEOUT) as response: + data = json.load(response) + except urllib.error.HTTPError as exc: + if exc.code in (400, 401, 403): + return None + raise AuthUnavailable(f"supabase answered {exc.code}") from exc + except (urllib.error.URLError, TimeoutError, ValueError) as exc: + raise AuthUnavailable(str(exc)) from exc + email = str(data.get("email") or "").strip().lower() + # An email nobody confirmed could belong to someone else: never trust it, least of all for teacher rights. + if not data.get("id") or not email or not (data.get("email_confirmed_at") or data.get("confirmed_at")): + return None + user = {"id": data["id"], "email": email} + with self._lock: + self._cache[token] = (now + CACHE_SECONDS, user) + return user + + +class DevAuthenticator: + """Local development only (no Supabase settings): the token is "dev:" and is trusted as it is.""" + + def user(self, token: str) -> dict | None: + if not token.startswith("dev:"): + return None + email = token[4:].strip().lower() + if not EMAIL.match(email): + return None + return {"id": str(uuid.uuid5(uuid.NAMESPACE_DNS, email)), "email": email} + + +def current_user(request: Request) -> dict: + header = request.headers.get("authorization", "") + token = header[7:].strip() if header.lower().startswith("bearer ") else "" + if not token: + raise HTTPException(401, "sign in required") + try: + user = request.app.state.authenticator.user(token) + except AuthUnavailable: + raise HTTPException(503, "sign-in service unavailable, try again") from None + if not user: + raise HTTPException(401, "sign in required") + role = "teacher" if user["email"] in request.app.state.settings.teachers else "student" + return {**user, "role": role} + + +def teacher_only(user: dict = Depends(current_user)) -> dict: + if user["role"] != "teacher": + raise HTTPException(403, "teachers only") + return user diff --git a/mathly2/bank.py b/mathly2/bank.py new file mode 100644 index 0000000000000000000000000000000000000000..92b87805cd469deadca6f36ab60b64ad4996b15d --- /dev/null +++ b/mathly2/bank.py @@ -0,0 +1,108 @@ +"""The exercise bank: lessons (units), skills, questions and mistakes. Loaded once and checked on start-up.""" +from __future__ import annotations + +import json +from dataclasses import dataclass +from pathlib import Path + +BANK_PATH = Path(__file__).parent / "content" / "math_algebra9.json" + + +class BankError(RuntimeError): + """The bank is broken; the message lists every problem found.""" + + +def check_bank(data: dict) -> list[str]: + """Every problem found in a bank, as short messages. An empty list means the bank is sound.""" + problems: list[str] = [] + for key in ("units", "skills", "mistakes"): + if key not in data: + return [f"missing '{key}'"] + + def duplicates(kind: str, ids: list[str]) -> None: + seen: set[str] = set() + for item in ids: + if item in seen: + problems.append(f"duplicate {kind} id '{item}'") + seen.add(item) + + unit_ids = [u.get("id") for u in data["units"]] + skill_ids = [s.get("id") for s in data["skills"]] + duplicates("lesson", unit_ids) + duplicates("skill", skill_ids) + units, skills, mistakes = set(unit_ids), set(skill_ids), data["mistakes"] + + for unit in data["units"]: + for number, question in enumerate((unit.get("quiz") or {}).get("questions", []), 1): + for skill in question.get("skills", []): + if skill not in skills: + problems.append(f"lesson '{unit['id']}' quiz question {number}: unknown skill '{skill}'") + + for skill in data["skills"]: + sid = skill["id"] + if skill.get("unit") not in units: + problems.append(f"skill '{sid}': unknown lesson '{skill.get('unit')}'") + for pre in skill.get("prereqs", []): + if pre not in skills: + problems.append(f"skill '{sid}': unknown prerequisite '{pre}'") + for number, question in enumerate(skill.get("questions", []), 1): + where = f"skill '{sid}' question {number}" + choices = question.get("choices", []) + if len(choices) < 2: + problems.append(f"{where}: fewer than 2 choices") + right = sum(1 for c in choices if c.get("correct")) + if right != 1: + problems.append(f"{where}: {right} correct choices, expected 1") + for choice in choices: + mistake = choice.get("mistake") + if mistake is not None and mistake not in mistakes: + problems.append(f"{where}: unknown mistake '{mistake}'") + + for mid, mistake in mistakes.items(): + # `back` is filled in for only some mistakes today (see scripts/content_gaps.py); check it when given. + back = mistake.get("back") + if back and back not in skills: + problems.append(f"mistake '{mid}': unknown skill to go back to '{back}'") + return problems + + +@dataclass(frozen=True) +class Bank: + data: dict + + @property + def lessons(self) -> list[dict]: + return self.data["units"] + + @property + def skills(self) -> list[dict]: + return self.data["skills"] + + @property + def mistakes(self) -> dict: + return self.data["mistakes"] + + def lessons_with_skills(self) -> list[dict]: + """Lessons with their skills, without any questions (those are served by later endpoints, + which hide which choice is correct).""" + by_lesson: dict[str, list[dict]] = {} + for skill in self.skills: + by_lesson.setdefault(skill["unit"], []).append({ + "id": skill["id"], "name": skill["name"], "short": skill.get("short", skill["name"]), + "description": skill.get("description", ""), "prereqs": skill.get("prereqs", []), + "month": skill.get("month", ""), + }) + return [{ + "id": lesson["id"], "name": lesson["name"], "when": lesson.get("when", ""), + "has_quiz": bool(lesson.get("quiz")), "skills": by_lesson.get(lesson["id"], []), + } for lesson in self.lessons] + + +def load_bank(path: Path = BANK_PATH) -> Bank: + data = json.loads(Path(path).read_text(encoding="utf-8")) + problems = check_bank(data) + if problems: + shown = "\n - ".join(problems[:20]) + more = f"\n … and {len(problems) - 20} more" if len(problems) > 20 else "" + raise BankError(f"The exercise bank {path} has {len(problems)} problem(s):\n - {shown}{more}") + return Bank(data) diff --git a/mathly2/classes.py b/mathly2/classes.py new file mode 100644 index 0000000000000000000000000000000000000000..03ab22476d230cd6fad9aca875c2ee8c5cee0f38 --- /dev/null +++ b/mathly2/classes.py @@ -0,0 +1,98 @@ +"""A teacher's classes and their students.""" +from __future__ import annotations + +import re + +from fastapi import APIRouter, Depends, HTTPException, Request +from pydantic import BaseModel, Field + +from .auth import EMAIL, teacher_only +from .store import ClassExists, MemberExists + +MAX_EMAILS = 200 +router = APIRouter(prefix="/api/classes") + + +class NewClass(BaseModel): + name: str = Field(max_length=200) + + +class NewStudents(BaseModel): + emails: str = Field(max_length=20000) # pasted text: addresses separated by spaces, commas, semicolons or new lines + + +def parse_emails(text: str) -> tuple[list[str], list[str]]: + """(valid, invalid) addresses from pasted text: lower-case, without repeats, in the order given.""" + valid: list[str] = [] + invalid: list[str] = [] + for part in re.split(r"[\s,;]+", text.strip().lower()): + if not part: + continue + bucket = valid if EMAIL.match(part) and len(part) <= 254 else invalid + if part not in bucket: + bucket.append(part) + return valid, invalid + + +def own_class(request: Request, class_id: int, user: dict) -> dict: + row = request.app.state.store.get_class(class_id) + if not row or row["teacher_email"] != user["email"]: + raise HTTPException(404, "הכיתה לא נמצאה") + return row + + +@router.get("") +def list_classes(request: Request, user: dict = Depends(teacher_only)) -> list[dict]: + return [{"id": c["id"], "name": c["name"], "students": c["students"]} + for c in request.app.state.store.classes_of(user["email"])] + + +@router.post("", status_code=201) +def create_class(body: NewClass, request: Request, user: dict = Depends(teacher_only)) -> dict: + name = " ".join(body.name.split()) + if not 1 <= len(name) <= 60: + raise HTTPException(422, "שם הכיתה צריך להיות בין תו אחד ל־60 תווים") + try: + row = request.app.state.store.create_class(user["email"], name) + except ClassExists: + raise HTTPException(409, "כבר יש לך כיתה בשם הזה") from None + return {"id": row["id"], "name": row["name"], "students": 0} + + +@router.get("/{class_id}") +def show_class(class_id: int, request: Request, user: dict = Depends(teacher_only)) -> dict: + row = own_class(request, class_id, user) + members = request.app.state.store.members(class_id) + return {"id": row["id"], "name": row["name"], + "students": [{"email": m["email"], "signed_in": bool(m["user_id"])} for m in members]} + + +@router.post("/{class_id}/students") +def add_students(class_id: int, body: NewStudents, request: Request, user: dict = Depends(teacher_only)) -> dict: + own_class(request, class_id, user) + store = request.app.state.store + valid, invalid = parse_emails(body.emails) + if len(valid) > MAX_EMAILS: + raise HTTPException(422, f"אפשר להוסיף עד {MAX_EMAILS} תלמידים בכל פעם") + result: dict = {"added": [], "already_here": [], "elsewhere": [], "invalid": invalid} + for email in valid: + current = store.membership(email) + if current is None: + try: + store.add_member(class_id, email) + result["added"].append(email) + continue + except MemberExists: # added to another class a moment ago + current = store.membership(email) + if current and current["class_id"] == class_id: + result["already_here"].append(email) + else: + result["elsewhere"].append({"email": email, "class_name": current["class_name"] if current else ""}) + return result + + +@router.delete("/{class_id}/students/{email:path}", status_code=204) +def remove_student(class_id: int, email: str, request: Request, user: dict = Depends(teacher_only)) -> None: + own_class(request, class_id, user) + if not request.app.state.store.remove_member(class_id, email.strip().lower()): + raise HTTPException(404, "התלמיד לא נמצא בכיתה") diff --git a/mathly2/clock.py b/mathly2/clock.py new file mode 100644 index 0000000000000000000000000000000000000000..913674b20a7613448bb4a3912b890f40d29b78e2 --- /dev/null +++ b/mathly2/clock.py @@ -0,0 +1,20 @@ +"""Server time. Every rule that depends on days (mastery, the countdown, the simulation window) uses this, +never the device's clock.""" +from __future__ import annotations + +from datetime import date, datetime, timezone +from zoneinfo import ZoneInfo + +ISRAEL = ZoneInfo("Asia/Jerusalem") + + +def now() -> datetime: + return datetime.now(timezone.utc) + + +def school_day(moment: datetime | None = None) -> date: + """The calendar day in Israel at `moment` (default: now).""" + moment = moment or now() + if moment.tzinfo is None: + raise ValueError("moment must have a timezone") + return moment.astimezone(ISRAEL).date() diff --git a/mathly2/config.py b/mathly2/config.py new file mode 100644 index 0000000000000000000000000000000000000000..05ce7686cc7f9d48ecc5c799a4d3b4b6a6987f69 --- /dev/null +++ b/mathly2/config.py @@ -0,0 +1,40 @@ +"""Settings, read from the environment when the app is created.""" +from __future__ import annotations + +import os +import re +from dataclasses import dataclass, field + + +def _emails(name: str) -> frozenset[str]: + return frozenset(re.split(r"[\s,;]+", os.environ.get(name, "").strip().lower())) - {""} + + +@dataclass(frozen=True) +class Settings: + supabase_url: str = "" + supabase_key: str = "" # publishable key, sent to the browser for Google sign-in + supabase_secret: str = "" # secret key, server only + teachers: frozenset[str] = field(default_factory=frozenset) + + @property + def supabase_on(self) -> bool: + return bool(self.supabase_url and self.supabase_key and self.supabase_secret) + + def check(self) -> "Settings": + """Either all three Supabase settings are set, or none (local development with the "dev only" sign-in). + A half-configured server must not fall back to dev sign-in, which trusts any email address.""" + given = [bool(self.supabase_url), bool(self.supabase_key), bool(self.supabase_secret)] + if any(given) and not all(given): + raise ValueError("Set all of SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY and SUPABASE_SECRET_KEY, or none of them.") + return self + + +def load_settings() -> Settings: + env = lambda name: os.environ.get(name, "").strip() + return Settings( + supabase_url=env("SUPABASE_URL").rstrip("/"), + supabase_key=env("SUPABASE_PUBLISHABLE_KEY"), + supabase_secret=env("SUPABASE_SECRET_KEY"), + teachers=_emails("TEACHER_EMAILS"), + ).check() diff --git a/mathly2/content/math_algebra9.json b/mathly2/content/math_algebra9.json new file mode 100644 index 0000000000000000000000000000000000000000..a9a5a1edea1d3aef30369f172374e62f9026ee0f --- /dev/null +++ b/mathly2/content/math_algebra9.json @@ -0,0 +1,23808 @@ +{ + "source": { + "schedule": "https://meyda.education.gov.il/files/Pop/0files/matmatika/Chativat-Beynayim/tashpaz/prisa_9A.pdf" + }, + "mastery": "כל השאלות של תת־הנושא נענו נכון", + "units": [ + { + "id": "t", + "subject": "מתמטיקה", + "name": "טכניקה אלגברית 1", + "source": "פריסת ט׳ תשפ״ז", + "when": "ספטמבר", + "quiz": { + "minutes": 45, + "questions": [ + { + "points": 25, + "question": "פתחו סוגריים ופשטו. הראו את דרך הפתרון.\nא. $(x + 4)(x − 3)$\nב. $(2x − 5)²$\nג. $(3x + 2)(3x − 2) − 9x²$", + "skills": [ + "t_ext", + "t_simplify", + "t_formulas" + ] + }, + { + "points": 25, + "question": "פתרו את המשוואה ובדקו את הפתרון שמצאתם: $(x + 3)(x − 2) = (x − 1)(x + 4) + 4$", + "skills": [ + "t_ext_eq" + ] + }, + { + "points": 25, + "question": "אורך מלבן גדול ב־$5$ ס״מ מצלע של ריבוע, ורוחבו קטן ב־$3$ ס״מ מצלע הריבוע. נסמן את צלע הריבוע ב־$x$.\nא. בטאו בעזרת $x$ את שטח המלבן ופשטו.\nב. שטח המלבן גדול ב־$1$ סמ״ר משטח הריבוע. מצאו את צלע הריבוע ואת מידות המלבן.", + "skills": [ + "t_area", + "t_ext_eq" + ] + }, + { + "points": 25, + "question": "א. חשבו בלי מחשבון, בעזרת נוסחאות הכפל המקוצר, והראו כיצד: $49²$ ו־$102 · 98$.\nב. הוכיחו שלכל $x$ מתקיים: $(x + 3)² − (x − 3)² = 12x$.", + "skills": [ + "t_formulas" + ] + } + ] + } + }, + { + "id": "t2", + "subject": "מתמטיקה", + "name": "טכניקה אלגברית 2", + "source": "פריסת ט׳ תשפ״ז", + "when": "אוקטובר", + "from": [ + "t" + ], + "quiz": { + "minutes": 45, + "questions": [ + { + "points": 30, + "question": "פרקו לגורמים:\nא. $6x² − 9x$\nב. $x² − 7x + 12$\nג. $4x² − 25$", + "skills": [ + "t_gcf", + "t_trinomial", + "t_factor_formula" + ] + }, + { + "points": 25, + "question": "פתרו בעזרת פירוק לגורמים:\nא. $x² − 5x = 0$\nב. $x² + 2x − 15 = 0$", + "skills": [ + "t_quad_eq" + ] + }, + { + "points": 20, + "question": "מצאו את תחום ההצבה וצמצמו: $(x² − 16) / (x² − 4x)$", + "skills": [ + "t_reduce" + ] + }, + { + "points": 25, + "question": "מצאו את תחום ההצבה, חשבו ופשטו: $(x² − 4) / (3x) · (6x) / (x + 2)$", + "skills": [ + "t_muldiv", + "t_factor_formula" + ] + } + ] + } + }, + { + "id": "k", + "subject": "מתמטיקה", + "name": "דלתון", + "source": "פריסת ט׳ תשפ״ז", + "when": "ספטמבר", + "quiz": { + "minutes": 45, + "questions": [ + { + "points": 20, + "question": "בדלתון $ABCD$: $AB = AD$ ו־$CB = CD$. נתון: $∢BAD = 70°$ ו־$∢BCD = 50°$. חשבו את $∢ABC$ ונמקו.", + "figure": "A=0,3.71; B=-2.6,0; C=0,-5.58; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang B A D 70°; ang D C B 50°", + "skills": [ + "k_angles" + ] + }, + { + "points": 30, + "question": "בדלתון $ABCD$: $AB = AD$ ו־$CB = CD$, ו־$AC$ הוא האלכסון הראשי.\nא. הוכיחו: $△ABC ≅ △ADC$.\nב. הוכיחו ש־$AC$ חוצה את $∢BAD$ ואת $∢BCD$.", + "figure": "A=0,3.71; B=-2.6,0; C=0,-5.58; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C", + "skills": [ + "k_def", + "k_diag" + ] + }, + { + "points": 25, + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) האלכסונים נחתכים בנקודה $E$. נתון: $AB = 10$ ס״מ, $BD = 12$ ס״מ, $CE = 15$ ס״מ.\nא. מהו אורך $BE$? נמקו לפי תכונות האלכסונים בדלתון.\nב. חשבו את $AE$.\nג. חשבו את שטח הדלתון.", + "figure": "A=0,8; B=-6,0; C=0,-15; D=6,0; E=0,0@ne; poly A B C D; line A C; line B D; right A E D; len A B 10; len E C 15; tick A B 1; tick A D 1; tick C B 2; tick C D 2", + "skills": [ + "k_diag" + ] + }, + { + "points": 25, + "question": "במערכת צירים נתונות הנקודות $A(0, 6)$, $B(3, 2)$, $C(0, −4)$, $D(−3, 2)$.\nא. חשבו את אורכי הצלעות והראו ש־$ABCD$ הוא דלתון.\nב. חשבו את שטח הדלתון.", + "figure": "grid; A=0,6@ne; B=3,2@e; C=0,-4@se; D=-3,2@w; poly A B C D", + "skills": [ + "k_axes" + ] + } + ] + } + }, + { + "id": "i", + "subject": "מתמטיקה", + "name": "משולש שווה שוקיים", + "source": "פריסת ט׳ תשפ״ז", + "when": "אוקטובר", + "from": [ + "k" + ], + "quiz": { + "minutes": 45, + "questions": [ + { + "points": 25, + "question": "במשולש $ABC$, הקטע $AD$ הוא גם גובה לצלע $BC$ וגם תיכון לצלע $BC$. הוכיחו ש־$△ABC$ שווה שוקיים.", + "figure": "A=0,4; B=-3,0; C=3,0; D=0,0@s; poly A B C; line A D; right A D C; tick B D 1; tick D C 1", + "skills": [ + "i_converse_lines" + ] + }, + { + "points": 25, + "question": "במשולש $ABC$: $AB = AC$ ו־$∢A = 36°$. הקטע $BD$ חוצה את $∢B$ (הנקודה $D$ על $AC$).\nא. חשבו את זוויות המשולש $BDC$.\nב. הוכיחו שהמשולשים $ABD$ ו־$BDC$ שווי שוקיים.", + "figure": "A=0,3.08; B=-1,0; C=1,0; D=0.62,1.18@e; poly A B C; line B D; tick A B 1; tick A C 1; ang B A C 36°; ang A B D; ang D B C", + "skills": [ + "i_props", + "i_converse_angles" + ] + }, + { + "points": 25, + "question": "במשולש $ABC$, הקטע $BD$ חוצה את $∢ABC$ (הנקודה $D$ על $AC$). דרך $D$ העבירו ישר המקביל ל־$BC$, והוא חותך את $AB$ בנקודה $E$. הוכיחו ש־$△EBD$ שווה שוקיים.", + "figure": "A=-1,4; B=-3,0; C=3,0; D=0.71,2.29@e; E=-1.85,2.29@w; poly A B C; line B D; line E D; par E D 1; par B C 1; ang E B D; ang D B C", + "skills": [ + "i_converse_angles" + ] + }, + { + "points": 25, + "question": "במערכת צירים נתונות הנקודות $A(−3, 0)$, $B(3, 0)$, $C(0, 5)$.\nא. הראו ש־$△ABC$ שווה שוקיים.\nב. $M$ היא אמצע $AB$. מצאו את שיעורי $M$ והראו ש־$CM ⊥ AB$.\nג. חשבו את שטח המשולש.", + "figure": "grid; A=-3,0@sw; B=3,0@se; C=0,5@ne; poly A B C", + "skills": [ + "i_axes" + ] + } + ] + } + }, + { + "id": "q", + "subject": "מתמטיקה", + "name": "פונקציות ריבועיות ופתרון משוואות ריבועיות 1", + "source": "פריסת ט׳ תשפ״ז", + "when": "נובמבר" + }, + { + "id": "q2", + "subject": "מתמטיקה", + "name": "פונקציות ריבועיות ופתרון משוואות ריבועיות 2", + "source": "פריסת ט׳ תשפ״ז", + "when": "נובמבר", + "from": [ + "q" + ] + }, + { + "id": "a", + "subject": "מתמטיקה", + "name": "יחסי צלעות וזוויות", + "source": "פריסת ט׳ תשפ״ז", + "when": "נובמבר" + }, + { + "id": "l", + "subject": "מתמטיקה", + "name": "משולש ישר זווית 30°, 60°, 90°", + "source": "פריסת ט׳ תשפ״ז", + "when": "נובמבר", + "from": [ + "a" + ] + }, + { + "id": "z", + "subject": "מתמטיקה", + "name": "ישרים מקבילים וטרפז 1", + "source": "פריסת ט׳ תשפ״ז", + "when": "נובמבר" + }, + { + "id": "z2", + "subject": "מתמטיקה", + "name": "ישרים מקבילים וטרפז 2", + "source": "פריסת ט׳ תשפ״ז", + "when": "נובמבר–דצמבר", + "from": [ + "z" + ] + }, + { + "id": "e", + "subject": "מתמטיקה", + "name": "המשך פתרון משוואות ריבועיות ויישומים", + "source": "פריסת ט׳ תשפ״ז", + "when": "דצמבר" + }, + { + "id": "v", + "subject": "מתמטיקה", + "name": "אי־שוויונות ריבועיים", + "source": "פריסת ט׳ תשפ״ז", + "when": "דצמבר", + "from": [ + "e" + ] + }, + { + "id": "g", + "subject": "מתמטיקה", + "name": "מקבילית", + "source": "פריסת ט׳ תשפ״ז", + "when": "דצמבר–ינואר", + "from": [ + "z" + ] + }, + { + "id": "r", + "subject": "מתמטיקה", + "name": "משוואות רציונליות", + "source": "פריסת ט׳ תשפ״ז", + "when": "ינואר" + }, + { + "id": "m", + "subject": "מתמטיקה", + "name": "מלבן", + "source": "פריסת ט׳ תשפ״ז", + "when": "ינואר–פברואר" + }, + { + "id": "h", + "subject": "מתמטיקה", + "name": "הסתברות", + "source": "פריסת ט׳ תשפ״ז", + "when": "ינואר–פברואר" + }, + { + "id": "s", + "subject": "מתמטיקה", + "name": "מערכת משוואות ממעלה שנייה", + "source": "פריסת ט׳ תשפ״ז", + "when": "פברואר" + }, + { + "id": "n", + "subject": "מתמטיקה", + "name": "תכונות של פונקציה", + "source": "פריסת ט׳ תשפ״ז", + "when": "מרץ" + }, + { + "id": "b", + "subject": "מתמטיקה", + "name": "מעוין", + "source": "פריסת ט׳ תשפ״ז", + "when": "מרץ", + "from": [ + "m" + ] + }, + { + "id": "c", + "subject": "מתמטיקה", + "name": "ריבוע", + "source": "פריסת ט׳ תשפ״ז", + "when": "מרץ–אפריל", + "from": [ + "m" + ] + }, + { + "id": "o", + "subject": "מתמטיקה", + "name": "משולש ישר זווית: התיכון ליתר", + "source": "פריסת ט׳ תשפ״ז", + "when": "אפריל", + "from": [ + "a" + ] + }, + { + "id": "p", + "subject": "מתמטיקה", + "name": "חוקי חזקות", + "source": "פריסת ט׳ תשפ״ז", + "when": "מאי" + }, + { + "id": "w", + "subject": "מתמטיקה", + "name": "שאלות מילוליות", + "source": "פריסת ט׳ תשפ״ז", + "when": "מאי" + }, + { + "id": "d", + "subject": "מתמטיקה", + "name": "דמיון משולשים", + "source": "פריסת ט׳ תשפ״ז", + "when": "מאי" + } + ], + "skills": [ + { + "id": "t_ext", + "unit": "t", + "name": "חוק הפילוג המורחב", + "short": "פילוג מורחב", + "prereqs": [], + "description": "כל איבר בסוגריים הראשונים כופל כל איבר בסוגריים השניים.", + "month": "ספטמבר", + "questions": [ + { + "question": "$(x + 3)(x − 5) = ?$", + "choices": [ + { + "text": "$x² − 2x − 15$", + "correct": true + }, + { + "text": "$x² − 15$", + "mistake": "ext_partial" + }, + { + "text": "$x² + 2x − 15$", + "mistake": "sign_mid" + }, + { + "text": "$x² − 2x + 15$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x + 4)(x + 2) = ?$", + "choices": [ + { + "text": "$x² + 6x + 8$", + "correct": true + }, + { + "text": "$x² + 8$", + "mistake": "ext_partial" + }, + { + "text": "$x² + 6x + 6$", + "mistake": "const_added" + }, + { + "text": "$x² + 8x + 6$", + "mistake": "const_added" + } + ] + }, + { + "question": "$(2x + 1)(x − 3) = ?$", + "choices": [ + { + "text": "$2x² − 5x − 3$", + "correct": true + }, + { + "text": "$2x² − 3$", + "mistake": "ext_partial" + }, + { + "text": "$2x² + 5x − 3$", + "mistake": "sign_mid" + }, + { + "text": "$2x² − 5x + 3$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x − 7)(x − 2) = ?$", + "choices": [ + { + "text": "$x² − 9x + 14$", + "correct": true + }, + { + "text": "$x² + 14$", + "mistake": "ext_partial" + }, + { + "text": "$x² − 9x − 14$", + "mistake": "neg_times_neg" + }, + { + "text": "$x² + 9x + 14$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "$(3x − 2)(2x + 5) = ?$", + "choices": [ + { + "text": "$6x² + 11x − 10$", + "correct": true + }, + { + "text": "$6x² − 10$", + "mistake": "ext_partial" + }, + { + "text": "$6x² − 11x − 10$", + "mistake": "sign_mid" + }, + { + "text": "$6x² + 11x + 10$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(a + b)(c + d) = ?$", + "choices": [ + { + "text": "$ac + ad + bc + bd$", + "correct": true + }, + { + "text": "$ac + bd$", + "mistake": "ext_partial" + }, + { + "text": "$ab + cd$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "$(2a − b)(a + 3b) = ?$", + "choices": [ + { + "text": "$2a² + 5ab − 3b²$", + "correct": true + }, + { + "text": "$2a² − 3b²$", + "mistake": "ext_partial" + }, + { + "text": "$2a² + 7ab − 3b²$", + "mistake": "sign_mid" + }, + { + "text": "$2a² + 5ab + 3b²$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(5 − x)(x + 2) = ?$", + "choices": [ + { + "text": "$−x² + 3x + 10$", + "correct": true + }, + { + "text": "$10 − x²$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 3x + 10$", + "mistake": "sign_mid" + }, + { + "text": "$x² + 3x + 10$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(4x + 3)(x − 1) = ?$", + "choices": [ + { + "text": "$4x² − x − 3$", + "correct": true + }, + { + "text": "$4x² − 3$", + "mistake": "ext_partial" + }, + { + "text": "$4x² + x − 3$", + "mistake": "sign_mid" + }, + { + "text": "$4x² − x + 3$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x + 5)(2x − 1) = ?$", + "choices": [ + { + "text": "$2x² + 9x − 5$", + "correct": true + }, + { + "text": "$2x² − 5$", + "mistake": "ext_partial" + }, + { + "text": "$2x² + 11x − 5$", + "mistake": "sign_mid" + }, + { + "text": "$2x² + 9x + 5$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x − 2)(x + 8) = ?$", + "choices": [ + { + "text": "$x² + 6x − 16$", + "correct": true + }, + { + "text": "$x² − 16$", + "mistake": "ext_partial" + }, + { + "text": "$x² − 6x − 16$", + "mistake": "sign_mid" + }, + { + "text": "$x² + 6x + 16$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(3x + 1)(2x − 3) = ?$", + "choices": [ + { + "text": "$6x² − 7x − 3$", + "correct": true + }, + { + "text": "$6x² − 3$", + "mistake": "ext_partial" + }, + { + "text": "$6x² + 7x − 3$", + "mistake": "sign_mid" + }, + { + "text": "$6x² − 7x + 3$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(3a + 2b)(a + 2b) = ?$", + "choices": [ + { + "text": "$3a² + 8ab + 4b²$", + "correct": true + }, + { + "text": "$3a² + 4b²$", + "mistake": "ext_partial" + }, + { + "text": "$3a² − 8ab + 4b²$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "$(x + 5)(3x − 5) = ?$", + "choices": [ + { + "text": "$3x² + 10x − 25$", + "correct": true + }, + { + "text": "$3x² − 25$", + "mistake": "ext_partial" + }, + { + "text": "$3x² − 10x − 25$", + "mistake": "sign_mid" + }, + { + "text": "$3x² + 10x + 25$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(3a + 2b)(2a − 3b) = ?$", + "choices": [ + { + "text": "$6a² − 5ab − 6b²$", + "correct": true + }, + { + "text": "$6a² − 6b²$", + "mistake": "ext_partial" + }, + { + "text": "$6a² + 5ab − 6b²$", + "mistake": "sign_mid" + }, + { + "text": "$6a² − 5ab + 6b²$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(7 − x)(x + 2) = ?$", + "choices": [ + { + "text": "$−x² + 5x + 14$", + "correct": true + }, + { + "text": "$14 − x²$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 5x + 14$", + "mistake": "sign_mid" + }, + { + "text": "$x² + 5x + 14$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x + 3)(x + 9) = ?$", + "choices": [ + { + "text": "$x² + 12x + 27$", + "correct": true + }, + { + "text": "$x² + 27$", + "mistake": "ext_partial" + }, + { + "text": "$x² + 12x + 12$", + "mistake": "const_added" + }, + { + "text": "$x² + 27x + 12$", + "mistake": "const_added" + } + ] + }, + { + "question": "$(x + 4)(x + 7) = ?$", + "choices": [ + { + "text": "$x² + 11x + 28$", + "correct": true + }, + { + "text": "$x² + 28$", + "mistake": "ext_partial" + }, + { + "text": "$x² + 11x + 11$", + "mistake": "const_added" + }, + { + "text": "$x² + 28x + 11$", + "mistake": "const_added" + } + ] + }, + { + "question": "$(9 − x)(x + 3) = ?$", + "choices": [ + { + "text": "$−x² + 6x + 27$", + "correct": true + }, + { + "text": "$27 − x²$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 6x + 27$", + "mistake": "sign_mid" + }, + { + "text": "$x² + 6x + 27$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(2a + 3b)(2a + b) = ?$", + "choices": [ + { + "text": "$4a² + 8ab + 3b²$", + "correct": true + }, + { + "text": "$4a² + 3b²$", + "mistake": "ext_partial" + }, + { + "text": "$4a² − 8ab + 3b²$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "$(2a + b)(a + b) = ?$", + "choices": [ + { + "text": "$2a² + 3ab + b²$", + "correct": true + }, + { + "text": "$2a² + b²$", + "mistake": "ext_partial" + }, + { + "text": "$2a² − 3ab + b²$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "$(x − 8)(2x + 7) = ?$", + "choices": [ + { + "text": "$2x² − 9x − 56$", + "correct": true + }, + { + "text": "$2x² − 56$", + "mistake": "ext_partial" + }, + { + "text": "$2x² + 9x − 56$", + "mistake": "sign_mid" + }, + { + "text": "$2x² − 9x + 56$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(a + 2b)(2a − 2b) = ?$", + "choices": [ + { + "text": "$2a² + 2ab − 4b²$", + "correct": true + }, + { + "text": "$2a² − 4b²$", + "mistake": "ext_partial" + }, + { + "text": "$2a² − 2ab − 4b²$", + "mistake": "sign_mid" + }, + { + "text": "$2a² + 2ab + 4b²$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(2x − 6)(x + 5) = ?$", + "choices": [ + { + "text": "$2x² + 4x − 30$", + "correct": true + }, + { + "text": "$2x² − 30$", + "mistake": "ext_partial" + }, + { + "text": "$2x² − 4x − 30$", + "mistake": "sign_mid" + }, + { + "text": "$2x² + 4x + 30$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(6 − x)(x + 8) = ?$", + "choices": [ + { + "text": "$−x² − 2x + 48$", + "correct": true + }, + { + "text": "$48 − x²$", + "mistake": "ext_partial" + }, + { + "text": "$−x² + 2x + 48$", + "mistake": "sign_mid" + }, + { + "text": "$x² − 2x + 48$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(8 − x)(x + 4) = ?$", + "choices": [ + { + "text": "$−x² + 4x + 32$", + "correct": true + }, + { + "text": "$32 − x²$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 4x + 32$", + "mistake": "sign_mid" + }, + { + "text": "$x² + 4x + 32$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x − 9)(3x − 8) = ?$", + "choices": [ + { + "text": "$3x² − 35x + 72$", + "correct": true + }, + { + "text": "$3x² + 72$", + "mistake": "ext_partial" + }, + { + "text": "$3x² + 35x + 72$", + "mistake": "sign_mid" + }, + { + "text": "$3x² − 35x − 72$", + "mistake": "neg_times_neg" + } + ] + }, + { + "question": "$(2x − 1)(x + 6) = ?$", + "choices": [ + { + "text": "$2x² + 11x − 6$", + "correct": true + }, + { + "text": "$2x² − 6$", + "mistake": "ext_partial" + }, + { + "text": "$2x² − 11x − 6$", + "mistake": "sign_mid" + }, + { + "text": "$2x² + 11x + 6$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(2 − x)(x + 1) = ?$", + "choices": [ + { + "text": "$−x² + x + 2$", + "correct": true + }, + { + "text": "$2 − x²$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − x + 2$", + "mistake": "sign_mid" + }, + { + "text": "$x² + x + 2$", + "mistake": "sign_product" + } + ] + }, + { + "question": "$(x + 5)(x + 7) = ?$", + "choices": [ + { + "text": "$x² + 12x + 35$", + "correct": true + }, + { + "text": "$x² + 35$", + "mistake": "ext_partial" + }, + { + "text": "$x² + 12x + 12$", + "mistake": "const_added" + }, + { + "text": "$x² + 35x + 12$", + "mistake": "const_added" + } + ] + } + ] + }, + { + "id": "t_simplify", + "unit": "t", + "name": "פישוט ביטויים בעזרת הפילוג המורחב", + "short": "פישוט ביטויים", + "prereqs": [ + "t_ext" + ], + "description": "פותחים סוגריים בפילוג המורחב, שמים לב לסימן שלפני כל מכפלה ומכנסים איברים דומים.", + "month": "ספטמבר", + "questions": [ + { + "question": "פשטו: $(x + 2)(x + 3) − x(x + 4)$", + "choices": [ + { + "text": "$x + 6$", + "correct": true + }, + { + "text": "$9x + 6$", + "mistake": "minus_paren" + }, + { + "text": "$6 − 4x$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $(x − 1)(x + 5) + (x + 2)(x − 3)$", + "choices": [ + { + "text": "$2x² + 3x − 11$", + "correct": true + }, + { + "text": "$2x² − 11$", + "mistake": "ext_partial" + }, + { + "text": "$2x² − 3x − 11$", + "mistake": "sign_mid" + }, + { + "text": "$2x² + 3x + 11$", + "mistake": "sign_product" + } + ] + }, + { + "question": "פשטו: $(2x + 1)(x + 4) − 2x²$", + "choices": [ + { + "text": "$9x + 4$", + "correct": true + }, + { + "text": "$8x + 4$", + "mistake": "ext_partial" + }, + { + "text": "$4$", + "mistake": "ext_partial" + }, + { + "text": "$4x² + 9x + 4$", + "mistake": "minus_paren" + } + ] + }, + { + "question": "פשטו: $(x + 3)(x − 3) − (x − 1)(x + 2)$", + "choices": [ + { + "text": "$−x − 7$", + "correct": true + }, + { + "text": "$x − 11$", + "mistake": "minus_paren" + }, + { + "text": "$−7$", + "mistake": "ext_partial" + }, + { + "text": "$x − 7$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פשטו: $3x(x + 1) − (x + 2)(3x − 1)$", + "choices": [ + { + "text": "$2 − 2x$", + "correct": true + }, + { + "text": "$8x − 2$", + "mistake": "minus_paren" + }, + { + "text": "$3x + 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $(a + 2)(a + 5) − (a + 1)(a + 6)$", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$14a + 16$", + "mistake": "minus_paren" + }, + { + "text": "$0$", + "mistake": "const_added" + } + ] + }, + { + "question": "פשטו: $(2x − 3)(x + 1) − (x + 1)(x − 1)$", + "choices": [ + { + "text": "$x² − x − 2$", + "correct": true + }, + { + "text": "$x² − x − 4$", + "mistake": "minus_paren" + }, + { + "text": "$x² + x − 2$", + "mistake": "sign_mid" + }, + { + "text": "$x² − 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "איזה ביטוי שווה ל־$(x + 4)(x − 1) − x²$?", + "choices": [ + { + "text": "$3x − 4$", + "correct": true + }, + { + "text": "$−4$", + "mistake": "ext_partial" + }, + { + "text": "$−3x − 4$", + "mistake": "sign_mid" + }, + { + "text": "$3x + 4$", + "mistake": "sign_product" + } + ] + }, + { + "question": "פשטו: $5 − (x + 1)(x − 2)$", + "choices": [ + { + "text": "$−x² + x + 7$", + "correct": true + }, + { + "text": "$−x² − x + 3$", + "mistake": "minus_paren" + }, + { + "text": "$7 − x²$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $2(x + 3)(x − 1)$", + "choices": [ + { + "text": "$2x² + 4x − 6$", + "correct": true + }, + { + "text": "$4x² + 8x − 12$", + "mistake": "double_both" + }, + { + "text": "$2x² + 4x − 3$", + "mistake": "partial_dist" + }, + { + "text": "$2x² − 6$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $(x + 7)(x − 5) + (x − 1)(x + 6)$", + "choices": [ + { + "text": "$2x² + 7x − 41$", + "correct": true + }, + { + "text": "$2x² − 41$", + "mistake": "ext_partial" + }, + { + "text": "$2x² − 7x − 41$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פשטו: $4(x + 7)(x − 2)$", + "choices": [ + { + "text": "$4x² + 20x − 56$", + "correct": true + }, + { + "text": "$4x² − 56$", + "mistake": "ext_partial" + }, + { + "text": "$4x² + 20x − 14$", + "mistake": "partial_dist" + }, + { + "text": "$16x² + 80x − 224$", + "mistake": "double_both" + } + ] + }, + { + "question": "פשטו: $(x + 2)(x + 1) − x(x + 7)$", + "choices": [ + { + "text": "$−4x + 2$", + "correct": true + }, + { + "text": "$10x + 2$", + "mistake": "minus_paren" + }, + { + "text": "$4x + 2$", + "mistake": "sign_mid" + }, + { + "text": "$−7x + 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $(x − 7)(x + 5) − x(x + 1)$", + "choices": [ + { + "text": "$−3x − 35$", + "correct": true + }, + { + "text": "$−x − 35$", + "mistake": "ext_partial" + }, + { + "text": "$3x − 35$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פשטו: $(x + 3)(x + 2) − x(x + 2)$", + "choices": [ + { + "text": "$3x + 6$", + "correct": true + }, + { + "text": "$−3x + 6$", + "mistake": "sign_mid" + }, + { + "text": "$−2x + 6$", + "mistake": "ext_partial" + }, + { + "text": "$7x + 6$", + "mistake": "minus_paren" + } + ] + }, + { + "question": "פשטו: $(x − 5)(x + 2) − (x + 7)(x + 4)$", + "choices": [ + { + "text": "$−14x − 38$", + "correct": true + }, + { + "text": "$−38$", + "mistake": "ext_partial" + }, + { + "text": "$8x + 18$", + "mistake": "minus_paren" + }, + { + "text": "$14x − 38$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "איזה ביטוי שווה ל־$(x − 5)(x + 7) − (x − 5)(x + 5)$?", + "choices": [ + { + "text": "$2x − 10$", + "correct": true + }, + { + "text": "$−10$", + "mistake": "ext_partial" + }, + { + "text": "$2x − 60$", + "mistake": "minus_paren" + }, + { + "text": "$−2x − 10$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פשטו: $(x − 5)(x + 1) − (x + 5)(x − 4)$", + "choices": [ + { + "text": "$−5x + 15$", + "correct": true + }, + { + "text": "$5x + 15$", + "mistake": "sign_mid" + }, + { + "text": "$15$", + "mistake": "ext_partial" + }, + { + "text": "$−3x − 25$", + "mistake": "minus_paren" + } + ] + }, + { + "question": "פשטו: $(x − 6)(x − 7) − (x + 6)(x − 2)$", + "choices": [ + { + "text": "$−17x + 54$", + "correct": true + }, + { + "text": "$54$", + "mistake": "ext_partial" + }, + { + "text": "$−9x + 30$", + "mistake": "minus_paren" + }, + { + "text": "$17x + 54$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "איזה ביטוי שווה ל־$(x − 2)(x + 3) − x(x − 3)$?", + "choices": [ + { + "text": "$4x − 6$", + "correct": true + }, + { + "text": "$−4x − 6$", + "mistake": "sign_mid" + }, + { + "text": "$−2x − 6$", + "mistake": "minus_paren" + }, + { + "text": "$3x − 6$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $3 − (x + 2)(x − 4)$", + "choices": [ + { + "text": "$−x² + 2x + 11$", + "correct": true + }, + { + "text": "$−x² + 11$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 2x − 5$", + "mistake": "minus_paren" + }, + { + "text": "$−x² − 2x + 11$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "איזה ביטוי שווה ל־$(x + 7)(x − 5) + (x − 7)(x + 3)$?", + "choices": [ + { + "text": "$2x² − 2x − 56$", + "correct": true + }, + { + "text": "$2x² + 2x − 56$", + "mistake": "sign_mid" + }, + { + "text": "$2x² − 56$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $(x + 3)(x − 4) − x²$", + "choices": [ + { + "text": "$−x − 12$", + "correct": true + }, + { + "text": "$x − 12$", + "mistake": "sign_mid" + }, + { + "text": "$−12$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "איזה ביטוי שווה ל־$10 − (x − 5)(x − 1)$?", + "choices": [ + { + "text": "$−x² + 6x + 5$", + "correct": true + }, + { + "text": "$−x² − 6x + 5$", + "mistake": "sign_mid" + }, + { + "text": "$−x² + 5$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 6x + 15$", + "mistake": "minus_paren" + } + ] + }, + { + "question": "פשטו: $3(x − 2)(x − 5)$", + "choices": [ + { + "text": "$3x² − 21x + 30$", + "correct": true + }, + { + "text": "$3x² + 21x + 30$", + "mistake": "sign_mid" + }, + { + "text": "$9x² − 63x + 90$", + "mistake": "double_both" + }, + { + "text": "$3x² − 21x + 10$", + "mistake": "partial_dist" + } + ] + }, + { + "question": "פשטו: $6 − (x − 6)(x + 1)$", + "choices": [ + { + "text": "$−x² + 5x + 12$", + "correct": true + }, + { + "text": "$−x² − 5x$", + "mistake": "minus_paren" + }, + { + "text": "$−x² − 5x + 12$", + "mistake": "sign_mid" + }, + { + "text": "$−x² + 12$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $(x − 6)(x + 7) + (x + 3)(x − 2)$", + "choices": [ + { + "text": "$2x² + 2x − 48$", + "correct": true + }, + { + "text": "$2x² − 48$", + "mistake": "ext_partial" + }, + { + "text": "$2x² − 2x − 48$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פשטו: $(3x − 2)(x + 6) − 3x²$", + "choices": [ + { + "text": "$16x − 12$", + "correct": true + }, + { + "text": "$−16x − 12$", + "mistake": "sign_mid" + }, + { + "text": "$−12$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פשטו: $5 − (x − 3)(x + 1)$", + "choices": [ + { + "text": "$−x² + 2x + 8$", + "correct": true + }, + { + "text": "$−x² + 8$", + "mistake": "ext_partial" + }, + { + "text": "$−x² − 2x + 2$", + "mistake": "minus_paren" + }, + { + "text": "$−x² − 2x + 8$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פשטו: $(x − 5)(x − 6) − x²$", + "choices": [ + { + "text": "$−11x + 30$", + "correct": true + }, + { + "text": "$30$", + "mistake": "ext_partial" + }, + { + "text": "$11x + 30$", + "mistake": "sign_mid" + } + ] + } + ] + }, + { + "id": "t_ext_eq", + "unit": "t", + "name": "פתרון משוואות בעזרת הפילוג המורחב", + "short": "משוואה ופילוג", + "prereqs": [ + "t_ext" + ], + "description": "פותחים סוגריים בפילוג המורחב, האיברים עם $x²$ מתבטלים, ופותרים משוואה ממעלה ראשונה.", + "month": "ספטמבר", + "questions": [ + { + "question": "פתרו: $(x + 2)(x + 3) = x² + 16$", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = 4.4$", + "mistake": "move_sign" + }, + { + "text": "$x = 10$", + "mistake": "forgot_divide" + }, + { + "text": "אין פתרון", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x + 4)(x − 1) = x² + 8$", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 4/3$", + "mistake": "move_sign" + }, + { + "text": "$x = 12$", + "mistake": "forgot_divide" + }, + { + "text": "$x = −4$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פתרו: $(2x − 1)(x + 3) = 2x² + 1$", + "choices": [ + { + "text": "$x = 0.8$", + "correct": true + }, + { + "text": "$x = −0.4$", + "mistake": "move_sign" + }, + { + "text": "$x = 4$", + "mistake": "forgot_divide" + }, + { + "text": "אין פתרון", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x − 3)(x − 5) = x² − 1$", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = −2$", + "mistake": "neg_divide" + }, + { + "text": "$x = −1.75$", + "mistake": "move_sign" + }, + { + "text": "$x = −16$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $x(x + 6) = (x + 2)(x + 3)$", + "choices": [ + { + "text": "$x = 6$", + "correct": true + }, + { + "text": "$x = 1$", + "mistake": "ext_partial" + }, + { + "text": "$x = 6/11$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(x + 5)(x − 2) − x² = 11$", + "choices": [ + { + "text": "$x = 7$", + "correct": true + }, + { + "text": "$x = −7$", + "mistake": "sign_mid" + }, + { + "text": "$x = 21$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 1/3$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(3 − x)(x + 4) = 10 − x²$", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = −2$", + "mistake": "neg_divide" + }, + { + "text": "$x = −22$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(2x + 3)(x − 4) = 2(x² − 5)$", + "choices": [ + { + "text": "$x = −0.4$", + "correct": true + }, + { + "text": "$x = −1.4$", + "mistake": "partial_dist" + }, + { + "text": "$x = 0.4$", + "mistake": "neg_divide" + }, + { + "text": "$x = 4.4$", + "mistake": "move_sign" + } + ] + }, + { + "question": "מכפלת $x + 1$ ב־$x + 7$ גדולה ב־$23$ מ־$x²$. מצאו את $x$.", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = −3.75$", + "mistake": "diff_order" + }, + { + "text": "$x = 16$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 3.75$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(x − 6)(x + 1) = x(x − 7) + 4$", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 10$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 10/7$", + "mistake": "ext_partial" + }, + { + "text": "$x = 5/6$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פתרו: $(2x − 6)(x + 1) = 2x² − 2$", + "choices": [ + { + "text": "$x = −1$", + "correct": true + }, + { + "text": "$x = 2$", + "mistake": "move_sign" + }, + { + "text": "$x = 1$", + "mistake": "neg_divide" + }, + { + "text": "$x = 4$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $(x + 5)(x − 8) = x² − 31$", + "choices": [ + { + "text": "$x = −3$", + "correct": true + }, + { + "text": "$x = 9$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 3$", + "mistake": "neg_divide" + }, + { + "text": "$x = 71/3$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(x + 3)(x + 2) = x² − 19$", + "choices": [ + { + "text": "$x = −5$", + "correct": true + }, + { + "text": "$x = −2.6$", + "mistake": "move_sign" + }, + { + "text": "$x = 5$", + "mistake": "sign_mid" + }, + { + "text": "$x = −25$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $(x + 6)(x + 5) = x(x + 8)$", + "choices": [ + { + "text": "$x = −10$", + "correct": true + }, + { + "text": "$x = 10$", + "mistake": "move_sign" + }, + { + "text": "$x = −30$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 3.75$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x + 3)(x − 7) − x² = 3$", + "choices": [ + { + "text": "$x = −6$", + "correct": true + }, + { + "text": "$x = 4.5$", + "mistake": "move_sign" + }, + { + "text": "$x = 6$", + "mistake": "neg_divide" + }, + { + "text": "$x = 24$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $(x + 1)(x + 5) = x² + 2$", + "choices": [ + { + "text": "$x = −0.5$", + "correct": true + }, + { + "text": "$x = 0.5$", + "mistake": "sign_mid" + }, + { + "text": "$x = −3$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 7/6$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(x − 5)(x − 3) = x² + 39$", + "choices": [ + { + "text": "$x = −3$", + "correct": true + }, + { + "text": "$x = 24$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 3$", + "mistake": "neg_divide" + }, + { + "text": "$x = −6.75$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(2x + 7)(x + 5) = 2x² + 1$", + "choices": [ + { + "text": "$x = −2$", + "correct": true + }, + { + "text": "$x = −34$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 36/17$", + "mistake": "move_sign" + }, + { + "text": "$x = 2$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פתרו: $(x − 1)(x + 8) = x(x + 3)$", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = −2$", + "mistake": "sign_mid" + }, + { + "text": "$x = 8$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $(x − 2)(x + 3) = x(x + 6)$", + "choices": [ + { + "text": "$x = −1.2$", + "correct": true + }, + { + "text": "$x = 1.2$", + "mistake": "move_sign" + }, + { + "text": "$x = 6$", + "mistake": "forgot_divide" + }, + { + "text": "$x = −1$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x − 8)(x + 3) − x² = −59$", + "choices": [ + { + "text": "$x = 7$", + "correct": true + }, + { + "text": "$x = −35$", + "mistake": "forgot_divide" + }, + { + "text": "$x = −7$", + "mistake": "neg_divide" + }, + { + "text": "$x = 16.6$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(x + 3)(x − 4) − x² = −6$", + "choices": [ + { + "text": "$x = −6$", + "correct": true + }, + { + "text": "$x = 6$", + "mistake": "neg_divide" + }, + { + "text": "$x = 18$", + "mistake": "move_sign" + }, + { + "text": "אין פתרון", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x + 4)(x + 2) − x² = −22$", + "choices": [ + { + "text": "$x = −5$", + "correct": true + }, + { + "text": "$x = −30$", + "mistake": "forgot_divide" + }, + { + "text": "$x = −7/3$", + "mistake": "move_sign" + }, + { + "text": "$x = 5$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "פתרו: $(x + 4)(x − 2) − x² = −7$", + "choices": [ + { + "text": "$x = 0.5$", + "correct": true + }, + { + "text": "$x = −7.5$", + "mistake": "move_sign" + }, + { + "text": "$x = −0.5$", + "mistake": "sign_mid" + }, + { + "text": "$x = 1$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $(x − 4)(x − 3) = x(x + 8)$", + "choices": [ + { + "text": "$x = 0.8$", + "correct": true + }, + { + "text": "$x = −12$", + "mistake": "forgot_divide" + }, + { + "text": "$x = −0.8$", + "mistake": "move_sign" + }, + { + "text": "$x = 1.5$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x − 1)(x − 4) = x(x + 7) − 5$", + "choices": [ + { + "text": "$x = 0.75$", + "correct": true + }, + { + "text": "$x = −9$", + "mistake": "forgot_divide" + }, + { + "text": "$x = −0.75$", + "mistake": "neg_divide" + }, + { + "text": "$x = 1/12$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $(x + 8)(x − 1) − x² = 48$", + "choices": [ + { + "text": "$x = 8$", + "correct": true + }, + { + "text": "$x = 40/7$", + "mistake": "move_sign" + }, + { + "text": "$x = −8$", + "mistake": "sign_mid" + }, + { + "text": "אין פתרון", + "mistake": "ext_partial" + } + ] + }, + { + "question": "מכפלת $x + 4$ ב־$x − 2$ גדולה ב־$8$ מ־$x²$. מצאו את $x$.", + "choices": [ + { + "text": "$x = 8$", + "correct": true + }, + { + "text": "$x = 16$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 0$", + "mistake": "move_sign" + }, + { + "text": "$x = −8$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "מכפלת $x + 1$ ב־$x + 6$ גדולה ב־$48$ מ־$x²$. מצאו את $x$.", + "choices": [ + { + "text": "$x = 6$", + "correct": true + }, + { + "text": "$x = −6$", + "mistake": "sign_mid" + }, + { + "text": "$x = 54/7$", + "mistake": "move_sign" + }, + { + "text": "אין פתרון", + "mistake": "ext_partial" + } + ] + }, + { + "question": "פתרו: $(x + 5)(x + 3) = x(x + 4) + 2$", + "choices": [ + { + "text": "$x = −3.25$", + "correct": true + }, + { + "text": "$x = −13$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 4.25$", + "mistake": "move_sign" + }, + { + "text": "$x = 3.25$", + "mistake": "sign_mid" + } + ] + } + ] + }, + { + "id": "t_area", + "unit": "t", + "name": "השוואת שטחים בעזרת הפילוג", + "short": "השוואת שטחים", + "prereqs": [ + "t_ext" + ], + "description": "מבטאים שטחים כמכפלות של ביטויים אלגבריים ומשווים ביניהם.", + "month": "ספטמבר", + "questions": [ + { + "question": "אורך מלבן $x + 4$ ורוחבו $x + 1$. צלע ריבוע $x + 2$. בכמה שטח המלבן גדול משטח הריבוע?", + "choices": [ + { + "text": "$x$", + "correct": true + }, + { + "text": "$5x$", + "mistake": "forgot_middle" + }, + { + "text": "$2$", + "mistake": "area_perimeter" + }, + { + "text": "$−x$", + "mistake": "diff_order" + } + ] + }, + { + "question": "אורך מלבן $x + 5$ ורוחבו $x − 2$. מה שטחו?", + "choices": [ + { + "text": "$x² + 3x − 10$", + "correct": true + }, + { + "text": "$x² − 10$", + "mistake": "ext_partial" + }, + { + "text": "$4x + 6$", + "mistake": "area_perimeter" + }, + { + "text": "$x² − 3x − 10$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "צלע ריבוע היא $x$. מגדילים צלע אחת ב־$3$ ומקטינים את הצלע השנייה ב־$3$, ומתקבל מלבן. מה קרה לשטח?", + "choices": [ + { + "text": "השטח קטן ב־$9$", + "correct": true + }, + { + "text": "השטח לא השתנה", + "mistake": "shift_balance" + }, + { + "text": "השטח גדל ב־$9$", + "mistake": "diff_order" + } + ] + }, + { + "question": "מלבן א׳: $x + 6$ על $x$. מלבן ב׳: $x + 2$ על $x + 3$. בכמה שטח מלבן א׳ גדול משטח מלבן ב׳?", + "choices": [ + { + "text": "$x − 6$", + "correct": true + }, + { + "text": "$11x + 6$", + "mistake": "minus_paren" + }, + { + "text": "$6x − 6$", + "mistake": "ext_partial" + }, + { + "text": "$6 − x$", + "mistake": "diff_order" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 4$ מוקפת בשביל ברוחב $1$ מכל צד. מה השטח של הגינה יחד עם השביל?", + "choices": [ + { + "text": "$x² + 8x + 12$", + "correct": true + }, + { + "text": "$x² + 6x + 5$", + "mistake": "frame_one_side" + }, + { + "text": "$x² + 12$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 4$ מוקפת בשביל ברוחב $1$ מכל צד. מה שטח השביל לבדו?", + "choices": [ + { + "text": "$4x + 12$", + "correct": true + }, + { + "text": "$12x + 12$", + "mistake": "minus_paren" + }, + { + "text": "$2x + 5$", + "mistake": "frame_one_side" + } + ] + }, + { + "question": "שטח מלבן שמידותיו $x + 7$ על $x − 1$ שווה לשטח ריבוע שצלעו $x + 2$. מצאו את $x$.", + "choices": [ + { + "text": "$x = 5.5$", + "correct": true + }, + { + "text": "$x = 11/6$", + "mistake": "forgot_middle" + }, + { + "text": "$x = −2.75$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "צלע ריבוע היא $x$. אורך מלבן גדול ב־$5$ מצלע הריבוע, ורוחבו קטן ב־$2$ ממנה. בכמה שטח המלבן גדול משטח הריבוע?", + "choices": [ + { + "text": "$3x − 10$", + "correct": true + }, + { + "text": "$−10$", + "mistake": "ext_partial" + }, + { + "text": "$−3x − 10$", + "mistake": "sign_mid" + }, + { + "text": "$6$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "מלבן שמידותיו $x + 3$ על $x + 5$, וריבוע שצלעו $x + 4$. איזה שטח גדול יותר, ובכמה?", + "choices": [ + { + "text": "שטח הריבוע, ב־$1$", + "correct": true + }, + { + "text": "שטח המלבן, ב־$1$", + "mistake": "diff_order" + }, + { + "text": "השטחים שווים", + "mistake": "shift_balance" + } + ] + }, + { + "question": "ניצבי משולש ישר זווית הם $x + 4$ ו־$x − 2$. מה שטח המשולש?", + "choices": [ + { + "text": "$(x² + 2x − 8) : 2$", + "correct": true + }, + { + "text": "$x² + 2x − 8$", + "mistake": "forgot_half_area" + }, + { + "text": "$(x² − 8) : 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "אורך מלבן $x + 9$ ורוחבו $x + 2$. מה שטחו?", + "choices": [ + { + "text": "$x² + 11x + 18$", + "correct": true + }, + { + "text": "$x² + 18$", + "mistake": "ext_partial" + }, + { + "text": "$4x + 22$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "אורך מלבן $x + 7$ ורוחבו $x + 9$. צלע ריבוע $x + 4$. בכמה שטח המלבן גדול משטח הריבוע?", + "choices": [ + { + "text": "$8x + 47$", + "correct": true + }, + { + "text": "$16x + 47$", + "mistake": "forgot_middle" + }, + { + "text": "$−8x − 47$", + "mistake": "diff_order" + }, + { + "text": "$16$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "אורך מלבן $x + 4$ ורוחבו $x − 6$. מה שטחו?", + "choices": [ + { + "text": "$x² − 2x − 24$", + "correct": true + }, + { + "text": "$x² − 24$", + "mistake": "ext_partial" + }, + { + "text": "$4x − 4$", + "mistake": "area_perimeter" + }, + { + "text": "$x² + 2x − 24$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "מלבן שמידותיו $x + 1$ על $x + 9$, וריבוע שצלעו $x + 5$. איזה שטח גדול יותר, ובכמה?", + "choices": [ + { + "text": "שטח הריבוע, ב־$16$", + "correct": true + }, + { + "text": "שטח המלבן, ב־$16$", + "mistake": "diff_order" + }, + { + "text": "השטחים שווים", + "mistake": "shift_balance" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 9$ מוקפת בשביל ברוחב $1$ מכל צד. מה שטח השביל לבדו?", + "choices": [ + { + "text": "$4x + 22$", + "correct": true + }, + { + "text": "$22x + 22$", + "mistake": "minus_paren" + }, + { + "text": "$2x + 10$", + "mistake": "frame_one_side" + } + ] + }, + { + "question": "אורך מלבן $x + 7$ ורוחבו $x − 5$. מה שטחו?", + "choices": [ + { + "text": "$x² + 2x − 35$", + "correct": true + }, + { + "text": "$x² − 35$", + "mistake": "ext_partial" + }, + { + "text": "$4x + 4$", + "mistake": "area_perimeter" + }, + { + "text": "$x² − 2x − 35$", + "mistake": "sign_mid" + } + ] + }, + { + "question": "צלע ריבוע היא $x$. אורך מלבן גדול ב־$8$ מצלע הריבוע, ורוחבו קטן ב־$6$ ממנה. בכמה שטח המלבן גדול משטח הריבוע?", + "choices": [ + { + "text": "$2x − 48$", + "correct": true + }, + { + "text": "$−48$", + "mistake": "ext_partial" + }, + { + "text": "$−2x − 48$", + "mistake": "sign_mid" + }, + { + "text": "$4$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "מלבן א׳: $x + 6$ על $x + 9$. מלבן ב׳: $x + 5$ על $x + 7$. בכמה שטח מלבן א׳ גדול משטח מלבן ב׳?", + "choices": [ + { + "text": "$3x + 19$", + "correct": true + }, + { + "text": "$27x + 89$", + "mistake": "minus_paren" + }, + { + "text": "$19$", + "mistake": "ext_partial" + }, + { + "text": "$−3x − 19$", + "mistake": "diff_order" + } + ] + }, + { + "question": "מלבן שמידותיו $x + 7$ על $x + 11$, וריבוע שצלעו $x + 9$. איזה שטח גדול יותר, ובכמה?", + "choices": [ + { + "text": "שטח הריבוע, ב־$4$", + "correct": true + }, + { + "text": "שטח המלבן, ב־$4$", + "mistake": "diff_order" + }, + { + "text": "השטחים שווים", + "mistake": "shift_balance" + } + ] + }, + { + "question": "צלע ריבוע היא $x$. אורך מלבן גדול ב־$5$ מצלע הריבוע, ורוחבו קטן ב־$4$ ממנה. בכמה שטח המלבן גדול משטח הריבוע?", + "choices": [ + { + "text": "$x − 20$", + "correct": true + }, + { + "text": "$−20$", + "mistake": "ext_partial" + }, + { + "text": "$−x − 20$", + "mistake": "sign_mid" + }, + { + "text": "$2$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 7$ מוקפת בשביל ברוחב $2$ מכל צד. מה שטח השביל לבדו?", + "choices": [ + { + "text": "$8x + 44$", + "correct": true + }, + { + "text": "$22x + 44$", + "mistake": "minus_paren" + }, + { + "text": "$4x + 18$", + "mistake": "frame_one_side" + } + ] + }, + { + "question": "מלבן שמידותיו $x + 6$ על $x + 12$, וריבוע שצלעו $x + 9$. איזה שטח גדול יותר, ובכמה?", + "choices": [ + { + "text": "שטח הריבוע, ב־$9$", + "correct": true + }, + { + "text": "שטח המלבן, ב־$9$", + "mistake": "diff_order" + }, + { + "text": "השטחים שווים", + "mistake": "shift_balance" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 6$ מוקפת בשביל ברוחב $1$ מכל צד. מה שטח השביל לבדו?", + "choices": [ + { + "text": "$4x + 16$", + "correct": true + }, + { + "text": "$16x + 16$", + "mistake": "minus_paren" + }, + { + "text": "$2x + 7$", + "mistake": "frame_one_side" + } + ] + }, + { + "question": "ניצבי משולש ישר זווית הם $x + 3$ ו־$x + 2$. מה שטח המשולש?", + "choices": [ + { + "text": "$(x² + 5x + 6) : 2$", + "correct": true + }, + { + "text": "$x² + 5x + 6$", + "mistake": "forgot_half_area" + }, + { + "text": "$(x² + 6) : 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "ניצבי משולש ישר זווית הם $x + 9$ ו־$x + 6$. מה שטח המשולש?", + "choices": [ + { + "text": "$(x² + 15x + 54) : 2$", + "correct": true + }, + { + "text": "$x² + 15x + 54$", + "mistake": "forgot_half_area" + }, + { + "text": "$(x² + 54) : 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 4$ מוקפת בשביל ברוחב $3$ מכל צד. מה השטח של הגינה יחד עם השביל?", + "choices": [ + { + "text": "$x² + 16x + 60$", + "correct": true + }, + { + "text": "$x² + 10x + 21$", + "mistake": "frame_one_side" + }, + { + "text": "$x² + 60$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 9$ מוקפת בשביל ברוחב $1$ מכל צד. מה השטח של הגינה יחד עם השביל?", + "choices": [ + { + "text": "$x² + 13x + 22$", + "correct": true + }, + { + "text": "$x² + 11x + 10$", + "mistake": "frame_one_side" + }, + { + "text": "$x² + 22$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "ניצבי משולש ישר זווית הם $x + 6$ ו־$x − 2$. מה שטח המשולש?", + "choices": [ + { + "text": "$(x² + 4x − 12) : 2$", + "correct": true + }, + { + "text": "$x² + 4x − 12$", + "mistake": "forgot_half_area" + }, + { + "text": "$(x² − 12) : 2$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "גינה מלבנית שמידותיה $x$ על $x + 8$ מוקפת בשביל ברוחב $1$ מכל צד. מה השטח של הגינה יחד עם השביל?", + "choices": [ + { + "text": "$x² + 12x + 20$", + "correct": true + }, + { + "text": "$x² + 10x + 9$", + "mistake": "frame_one_side" + }, + { + "text": "$x² + 20$", + "mistake": "ext_partial" + } + ] + }, + { + "question": "מלבן א׳: $x + 5$ על $x + 8$. מלבן ב׳: $x + 8$ על $x + 1$. בכמה שטח מלבן א׳ גדול משטח מלבן ב׳?", + "choices": [ + { + "text": "$4x + 32$", + "correct": true + }, + { + "text": "$22x + 48$", + "mistake": "minus_paren" + }, + { + "text": "$32$", + "mistake": "ext_partial" + }, + { + "text": "$−4x − 32$", + "mistake": "diff_order" + } + ] + } + ] + }, + { + "id": "t_formulas", + "unit": "t", + "name": "נוסחאות הכפל המקוצר", + "short": "כפל מקוצר", + "prereqs": [ + "t_ext" + ], + "description": "$(a ± b)² = a² ± 2ab + b²$ ו־$(a + b)(a − b) = a² − b²$. אפשר לראות אותן גם כשטחים של ריבועים ומלבנים.", + "month": "ספטמבר", + "questions": [ + { + "question": "$(2x − 3)² = ?$", + "choices": [ + { + "text": "$4x² − 12x + 9$", + "correct": true + }, + { + "text": "$4x² + 9$", + "mistake": "forgot_middle" + }, + { + "text": "$4x² − 6x + 9$", + "mistake": "middle_no_2" + }, + { + "text": "$2x² − 12x + 9$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(3x + 5)(3x − 5) = ?$", + "choices": [ + { + "text": "$9x² − 25$", + "correct": true + }, + { + "text": "$9x² + 25$", + "mistake": "diff_sign" + }, + { + "text": "$3x² − 25$", + "mistake": "coef_not_raised" + }, + { + "text": "$9x² − 30x + 25$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "$(x + 6)² = ?$", + "choices": [ + { + "text": "$x² + 12x + 36$", + "correct": true + }, + { + "text": "$x² + 36$", + "mistake": "forgot_middle" + }, + { + "text": "$x² + 6x + 36$", + "mistake": "middle_no_2" + }, + { + "text": "$x² + 12x + 12$", + "mistake": "sq_as_double" + } + ] + }, + { + "question": "$(x − 4)² = ?$", + "choices": [ + { + "text": "$x² − 8x + 16$", + "correct": true + }, + { + "text": "$x² − 16$", + "mistake": "diffsq_as_square" + }, + { + "text": "$x² + 8x + 16$", + "mistake": "sign_mid" + }, + { + "text": "$x² − 8x − 16$", + "mistake": "neg_times_neg" + } + ] + }, + { + "question": "$(a + 2b)² = ?$", + "choices": [ + { + "text": "$a² + 4ab + 4b²$", + "correct": true + }, + { + "text": "$a² + 2ab + 4b²$", + "mistake": "middle_no_2" + }, + { + "text": "$a² + 4ab + 2b²$", + "mistake": "coef_not_raised" + }, + { + "text": "$a² + 4b²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(7 − x)(7 + x) = ?$", + "choices": [ + { + "text": "$49 − x²$", + "correct": true + }, + { + "text": "$x² − 49$", + "mistake": "diffsq_order" + }, + { + "text": "$49 − 14x + x²$", + "mistake": "diffsq_as_square" + }, + { + "text": "$14 − x²$", + "mistake": "sq_as_double" + } + ] + }, + { + "question": "$(5x + 1)² = ?$", + "choices": [ + { + "text": "$25x² + 10x + 1$", + "correct": true + }, + { + "text": "$25x² + 5x + 1$", + "mistake": "middle_no_2" + }, + { + "text": "$5x² + 10x + 1$", + "mistake": "coef_not_raised" + }, + { + "text": "$25x² + 1$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "ריבוע שצלעו $a + b$ מחולק לריבוע שצלעו $a$, לריבוע שצלעו $b$ ולשני מלבנים. מה סכום השטחים של שני המלבנים?", + "choices": [ + { + "text": "$2ab$", + "correct": true + }, + { + "text": "$ab$", + "mistake": "middle_no_2" + }, + { + "text": "$a² + b²$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "חשבו בעזרת נוסחת הכפל המקוצר: $51² = ?$", + "choices": [ + { + "text": "$2601$", + "correct": true + }, + { + "text": "$2501$", + "mistake": "forgot_middle" + }, + { + "text": "$2551$", + "mistake": "middle_no_2" + } + ] + }, + { + "question": "חשבו בעזרת נוסחת הכפל המקוצר: $98 · 102 = ?$", + "choices": [ + { + "text": "$9996$", + "correct": true + }, + { + "text": "$10004$", + "mistake": "diff_sign" + }, + { + "text": "$9604$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "חשבו בעזרת נוסחת הכפל המקוצר: $52² = ?$", + "choices": [ + { + "text": "$2704$", + "correct": true + }, + { + "text": "$2504$", + "mistake": "forgot_middle" + }, + { + "text": "$2604$", + "mistake": "middle_no_2" + } + ] + }, + { + "question": "$(x + 2)² = ?$", + "choices": [ + { + "text": "$x² + 4x + 4$", + "correct": true + }, + { + "text": "$x² + 2x + 4$", + "mistake": "middle_no_2" + }, + { + "text": "$x² + 4$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(x + 4)² = ?$", + "choices": [ + { + "text": "$x² + 8x + 16$", + "correct": true + }, + { + "text": "$x² + 8x + 8$", + "mistake": "sq_as_double" + }, + { + "text": "$x² + 4x + 16$", + "mistake": "middle_no_2" + }, + { + "text": "$x² + 16$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(x − 1)² = ?$", + "choices": [ + { + "text": "$x² − 2x + 1$", + "correct": true + }, + { + "text": "$x² − 1$", + "mistake": "diffsq_as_square" + }, + { + "text": "$x² + 1$", + "mistake": "forgot_middle" + }, + { + "text": "$x² − 2x + 2$", + "mistake": "sq_as_double" + } + ] + }, + { + "question": "$(4x + 9)(4x − 9) = ?$", + "choices": [ + { + "text": "$16x² − 81$", + "correct": true + }, + { + "text": "$16x² + 81$", + "mistake": "diff_sign" + }, + { + "text": "$16x² − 72x + 81$", + "mistake": "diffsq_as_square" + }, + { + "text": "$4x² − 81$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(2x + 6)² = ?$", + "choices": [ + { + "text": "$4x² + 24x + 36$", + "correct": true + }, + { + "text": "$4x² + 12x + 36$", + "mistake": "middle_no_2" + }, + { + "text": "$2x² + 24x + 36$", + "mistake": "coef_not_raised" + }, + { + "text": "$4x² + 36$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(a − 3b)² = ?$", + "choices": [ + { + "text": "$a² − 6ab + 9b²$", + "correct": true + }, + { + "text": "$a² − 3ab + 9b²$", + "mistake": "middle_no_2" + }, + { + "text": "$a² − 6ab + 3b²$", + "mistake": "coef_not_raised" + }, + { + "text": "$a² + 9b²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(5x − 1)(5x + 1) = ?$", + "choices": [ + { + "text": "$25x² − 1$", + "correct": true + }, + { + "text": "$25x² + 1$", + "mistake": "diff_sign" + }, + { + "text": "$25x² − 10x + 1$", + "mistake": "diffsq_as_square" + }, + { + "text": "$5x² − 1$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(a − 4b)² = ?$", + "choices": [ + { + "text": "$a² − 8ab + 16b²$", + "correct": true + }, + { + "text": "$a² − 4ab + 16b²$", + "mistake": "middle_no_2" + }, + { + "text": "$a² − 8ab + 4b²$", + "mistake": "coef_not_raised" + }, + { + "text": "$a² + 16b²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "חשבו בעזרת נוסחת הכפל המקוצר: $26 · 34 = ?$", + "choices": [ + { + "text": "$884$", + "correct": true + }, + { + "text": "$916$", + "mistake": "diff_sign" + }, + { + "text": "$676$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "$(5x − 9)(5x + 9) = ?$", + "choices": [ + { + "text": "$25x² − 81$", + "correct": true + }, + { + "text": "$25x² + 81$", + "mistake": "diff_sign" + }, + { + "text": "$25x² − 90x + 81$", + "mistake": "diffsq_as_square" + }, + { + "text": "$5x² − 81$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "חשבו בעזרת נוסחת הכפל המקוצר: $57 · 63 = ?$", + "choices": [ + { + "text": "$3591$", + "correct": true + }, + { + "text": "$3609$", + "mistake": "diff_sign" + }, + { + "text": "$3249$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "$(4x − 8)² = ?$", + "choices": [ + { + "text": "$16x² − 64x + 64$", + "correct": true + }, + { + "text": "$4x² − 64x + 64$", + "mistake": "coef_not_raised" + }, + { + "text": "$16x² + 64$", + "mistake": "forgot_middle" + }, + { + "text": "$16x² − 32x + 64$", + "mistake": "middle_no_2" + } + ] + }, + { + "question": "$(8 − x)(8 + x) = ?$", + "choices": [ + { + "text": "$64 − x²$", + "correct": true + }, + { + "text": "$x² − 64$", + "mistake": "diffsq_order" + }, + { + "text": "$64 − 16x + x²$", + "mistake": "diffsq_as_square" + }, + { + "text": "$16 − x²$", + "mistake": "sq_as_double" + } + ] + }, + { + "question": "$(a − 5b)² = ?$", + "choices": [ + { + "text": "$a² − 10ab + 25b²$", + "correct": true + }, + { + "text": "$a² − 5ab + 25b²$", + "mistake": "middle_no_2" + }, + { + "text": "$a² − 10ab + 5b²$", + "mistake": "coef_not_raised" + }, + { + "text": "$a² + 25b²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(2x + 6)(2x − 6) = ?$", + "choices": [ + { + "text": "$4x² − 36$", + "correct": true + }, + { + "text": "$4x² + 36$", + "mistake": "diff_sign" + }, + { + "text": "$4x² − 24x + 36$", + "mistake": "diffsq_as_square" + }, + { + "text": "$2x² − 36$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(a + 4b)² = ?$", + "choices": [ + { + "text": "$a² + 8ab + 16b²$", + "correct": true + }, + { + "text": "$a² + 4ab + 16b²$", + "mistake": "middle_no_2" + }, + { + "text": "$a² + 8ab + 4b²$", + "mistake": "coef_not_raised" + }, + { + "text": "$a² + 16b²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(3x − 2)² = ?$", + "choices": [ + { + "text": "$9x² − 12x + 4$", + "correct": true + }, + { + "text": "$9x² − 4$", + "mistake": "diffsq_as_square" + }, + { + "text": "$9x² + 4$", + "mistake": "forgot_middle" + }, + { + "text": "$3x² − 12x + 4$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(a + 5b)² = ?$", + "choices": [ + { + "text": "$a² + 10ab + 25b²$", + "correct": true + }, + { + "text": "$a² + 5ab + 25b²$", + "mistake": "middle_no_2" + }, + { + "text": "$a² + 10ab + 5b²$", + "mistake": "coef_not_raised" + }, + { + "text": "$a² + 25b²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "$(2x + 3)(2x − 3) = ?$", + "choices": [ + { + "text": "$4x² − 9$", + "correct": true + }, + { + "text": "$4x² + 9$", + "mistake": "diff_sign" + }, + { + "text": "$4x² − 12x + 9$", + "mistake": "diffsq_as_square" + }, + { + "text": "$2x² − 9$", + "mistake": "coef_not_raised" + } + ] + } + ] + }, + { + "id": "t_gcf", + "unit": "t2", + "name": "פירוק לגורמים: הוצאת גורם משותף", + "short": "גורם משותף", + "prereqs": [], + "description": "מוציאים את הגורם המשותף הגדול ביותר, כולל משתנים, ובודקים בפתיחת סוגריים.", + "month": "אוקטובר", + "questions": [ + { + "question": "פרקו לגורמים: $6x² − 9x$", + "choices": [ + { + "text": "$3x(2x − 3)$", + "correct": true + }, + { + "text": "$3(2x² − 3x)$", + "mistake": "partial_gcf" + }, + { + "text": "$3x(2x − 9)$", + "mistake": "divide_each" + }, + { + "text": "$3x(2x + 3)$", + "mistake": "sign_of_term" + } + ] + }, + { + "question": "פרקו לגורמים: $4x + 12$", + "choices": [ + { + "text": "$4(x + 3)$", + "correct": true + }, + { + "text": "$4(x + 12)$", + "mistake": "divide_each" + }, + { + "text": "$2(2x + 6)$", + "mistake": "partial_gcf" + } + ] + }, + { + "question": "פרקו לגורמים: $5x² + 15x$", + "choices": [ + { + "text": "$5x(x + 3)$", + "correct": true + }, + { + "text": "$5(x² + 3x)$", + "mistake": "partial_gcf" + }, + { + "text": "$x(5x + 15)$", + "mistake": "partial_gcf" + }, + { + "text": "$5x(x + 15)$", + "mistake": "divide_each" + } + ] + }, + { + "question": "פרקו לגורמים: $8x³ − 4x²$", + "choices": [ + { + "text": "$4x²(2x − 1)$", + "correct": true + }, + { + "text": "$4x² · 2x$", + "mistake": "lost_one" + }, + { + "text": "$4x(2x² − x)$", + "mistake": "partial_gcf" + }, + { + "text": "$4x²(2x + 1)$", + "mistake": "sign_of_term" + } + ] + }, + { + "question": "פרקו לגורמים: $7x − 7$", + "choices": [ + { + "text": "$7(x − 1)$", + "correct": true + }, + { + "text": "$7(x + 1)$", + "mistake": "sign_of_term" + }, + { + "text": "$7(x − 7)$", + "mistake": "divide_each" + } + ] + }, + { + "question": "פרקו לגורמים: $12a²b − 18ab²$", + "choices": [ + { + "text": "$6ab(2a − 3b)$", + "correct": true + }, + { + "text": "$6(2a²b − 3ab²)$", + "mistake": "partial_gcf" + }, + { + "text": "$6ab(2a − 3)$", + "mistake": "divide_each" + }, + { + "text": "$3ab(4a − 6b)$", + "mistake": "partial_gcf" + } + ] + }, + { + "question": "פרקו לגורמים כשהגורם המשותף הוא $−x$: $−x² − 5x$", + "choices": [ + { + "text": "$−x(x + 5)$", + "correct": true + }, + { + "text": "$−x(x − 5)$", + "mistake": "sign_of_term" + }, + { + "text": "$x(x − 5)$", + "mistake": "sign_of_term" + } + ] + }, + { + "question": "פרקו לגורמים: $x(x + 2) + 3(x + 2)$", + "choices": [ + { + "text": "$(x + 2)(x + 3)$", + "correct": true + }, + { + "text": "$3x(x + 2)$", + "mistake": "common_bracket" + }, + { + "text": "$x² + 5x + 6$", + "mistake": "expanded_not_factored" + } + ] + }, + { + "question": "פרקו לגורמים: $10x²y + 5xy$", + "choices": [ + { + "text": "$5xy(2x + 1)$", + "correct": true + }, + { + "text": "$5xy · 2x$", + "mistake": "lost_one" + }, + { + "text": "$5x(2xy + y)$", + "mistake": "partial_gcf" + }, + { + "text": "$5xy(2x + 5)$", + "mistake": "divide_each" + } + ] + }, + { + "question": "פרקו לגורמים: $9x³ + 6x² − 3x$", + "choices": [ + { + "text": "$3x(3x² + 2x − 1)$", + "correct": true + }, + { + "text": "$3x(3x² + 2x)$", + "mistake": "lost_one" + }, + { + "text": "$3(3x³ + 2x² − x)$", + "mistake": "partial_gcf" + }, + { + "text": "$3x(3x² + 2x + 1)$", + "mistake": "sign_of_term" + } + ] + } + ] + }, + { + "id": "t_trinomial", + "unit": "t2", + "name": "פירוק טרינום ריבועי", + "short": "פירוק טרינום", + "prereqs": [ + "t_ext" + ], + "description": "$x² + bx + c = (x + m)(x + n)$ כאשר $m + n = b$ ו־$m · n = c$.", + "month": "אוקטובר", + "questions": [ + { + "question": "פרקו לגורמים: $x² − x − 12$", + "choices": [ + { + "text": "$(x − 4)(x + 3)$", + "correct": true + }, + { + "text": "$(x + 4)(x − 3)$", + "mistake": "signs_swapped" + }, + { + "text": "$(x − 6)(x + 2)$", + "mistake": "product_only" + }, + { + "text": "$(x − 12)(x + 1)$", + "mistake": "product_only" + } + ] + }, + { + "question": "פרקו לגורמים: $x² + 5x + 6$", + "choices": [ + { + "text": "$(x + 2)(x + 3)$", + "correct": true + }, + { + "text": "$(x + 1)(x + 6)$", + "mistake": "product_only" + }, + { + "text": "$(x − 2)(x − 3)$", + "mistake": "signs_swapped" + } + ] + }, + { + "question": "פרקו לגורמים: $x² + 7x + 10$", + "choices": [ + { + "text": "$(x + 2)(x + 5)$", + "correct": true + }, + { + "text": "$(x + 1)(x + 10)$", + "mistake": "product_only" + }, + { + "text": "$(x + 3)(x + 4)$", + "mistake": "sum_only" + }, + { + "text": "$(x − 2)(x − 5)$", + "mistake": "signs_swapped" + } + ] + }, + { + "question": "פרקו לגורמים: $x² − 8x + 15$", + "choices": [ + { + "text": "$(x − 3)(x − 5)$", + "correct": true + }, + { + "text": "$(x + 3)(x + 5)$", + "mistake": "signs_swapped" + }, + { + "text": "$(x − 1)(x − 15)$", + "mistake": "product_only" + }, + { + "text": "$(x − 2)(x − 6)$", + "mistake": "sum_only" + } + ] + }, + { + "question": "פרקו לגורמים: $x² + 2x − 15$", + "choices": [ + { + "text": "$(x + 5)(x − 3)$", + "correct": true + }, + { + "text": "$(x − 5)(x + 3)$", + "mistake": "signs_swapped" + }, + { + "text": "$(x + 15)(x − 1)$", + "mistake": "product_only" + } + ] + }, + { + "question": "פרקו לגורמים: $x² − 10x + 21$", + "choices": [ + { + "text": "$(x − 3)(x − 7)$", + "correct": true + }, + { + "text": "$(x + 3)(x + 7)$", + "mistake": "signs_swapped" + }, + { + "text": "$(x − 1)(x − 21)$", + "mistake": "product_only" + }, + { + "text": "$(x − 4)(x − 6)$", + "mistake": "sum_only" + } + ] + }, + { + "question": "פרקו לגורמים: $x² − 4x − 21$", + "choices": [ + { + "text": "$(x − 7)(x + 3)$", + "correct": true + }, + { + "text": "$(x + 7)(x − 3)$", + "mistake": "signs_swapped" + }, + { + "text": "$(x − 21)(x + 1)$", + "mistake": "product_only" + }, + { + "text": "$(x − 5)(x + 1)$", + "mistake": "sum_only" + } + ] + }, + { + "question": "פרקו לגורמים: $a² + a − 20$", + "choices": [ + { + "text": "$(a + 5)(a − 4)$", + "correct": true + }, + { + "text": "$(a − 5)(a + 4)$", + "mistake": "signs_swapped" + }, + { + "text": "$(a + 10)(a − 2)$", + "mistake": "product_only" + }, + { + "text": "$(a + 3)(a − 2)$", + "mistake": "sum_only" + } + ] + }, + { + "question": "נתון: $x² + bx + 12 = (x + 3)(x + 4)$. מה $b$?", + "choices": [ + { + "text": "$b = 7$", + "correct": true + }, + { + "text": "$b = 12$", + "mistake": "product_only" + }, + { + "text": "$b = 1$", + "mistake": "signs_swapped" + } + ] + }, + { + "question": "פרקו לגורמים: $x² − 2x − 24$", + "choices": [ + { + "text": "$(x − 6)(x + 4)$", + "correct": true + }, + { + "text": "$(x + 6)(x − 4)$", + "mistake": "signs_swapped" + }, + { + "text": "$(x − 8)(x + 3)$", + "mistake": "product_only" + }, + { + "text": "$(x − 12)(x + 2)$", + "mistake": "product_only" + } + ] + } + ] + }, + { + "id": "t_factor_formula", + "unit": "t2", + "name": "פירוק בנוסחאות הכפל המקוצר", + "short": "פירוק בנוסחאות", + "prereqs": [ + "t_formulas", + "t_gcf" + ], + "description": "מוציאים גורם משותף אם יש, ואחר כך מזהים הפרש ריבועים או ריבוע של סכום או הפרש.", + "month": "אוקטובר", + "questions": [ + { + "question": "פרקו לגורמים: $2x² − 18$", + "choices": [ + { + "text": "$2(x − 3)(x + 3)$", + "correct": true + }, + { + "text": "$2(x² − 9)$", + "mistake": "partial_factor" + }, + { + "text": "$(2x − 3)(2x + 3)$", + "mistake": "gcf_first" + }, + { + "text": "$2(x − 3)²$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "פרקו לגורמים: $x² − 49$", + "choices": [ + { + "text": "$(x − 7)(x + 7)$", + "correct": true + }, + { + "text": "$(x − 7)²$", + "mistake": "diffsq_as_square" + }, + { + "text": "לא ניתן לפרק", + "mistake": "diffsq_missed" + } + ] + }, + { + "question": "פרקו לגורמים: $x² + 10x + 25$", + "choices": [ + { + "text": "$(x + 5)²$", + "correct": true + }, + { + "text": "$(x + 5)(x − 5)$", + "mistake": "diffsq_as_square" + }, + { + "text": "$(x + 10)²$", + "mistake": "middle_no_2" + } + ] + }, + { + "question": "פרקו לגורמים: $9x² − 12x + 4$", + "choices": [ + { + "text": "$(3x − 2)²$", + "correct": true + }, + { + "text": "$(3x + 2)²$", + "mistake": "sign_mid" + }, + { + "text": "$(3x − 2)(3x + 2)$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "פרקו לגורמים: $3x² − 12$", + "choices": [ + { + "text": "$3(x − 2)(x + 2)$", + "correct": true + }, + { + "text": "$3(x² − 4)$", + "mistake": "partial_factor" + }, + { + "text": "$3(x − 2)²$", + "mistake": "diffsq_as_square" + }, + { + "text": "$(3x − 2)(3x + 2)$", + "mistake": "gcf_first" + } + ] + }, + { + "question": "פרקו לגורמים: $x² + 16$", + "choices": [ + { + "text": "לא ניתן לפרק", + "correct": true + }, + { + "text": "$(x + 4)(x − 4)$", + "mistake": "diff_sign" + }, + { + "text": "$(x + 4)²$", + "mistake": "forgot_middle" + } + ] + }, + { + "question": "פרקו לגורמים: $5x² + 10x + 5$", + "choices": [ + { + "text": "$5(x + 1)²$", + "correct": true + }, + { + "text": "$5(x² + 2x + 1)$", + "mistake": "partial_factor" + }, + { + "text": "$(5x + 1)²$", + "mistake": "gcf_first" + }, + { + "text": "$5(x + 1)(x − 1)$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "פרקו לגורמים: $4x² − 25$", + "choices": [ + { + "text": "$(2x − 5)(2x + 5)$", + "correct": true + }, + { + "text": "$(4x − 5)(4x + 5)$", + "mistake": "coef_not_raised" + }, + { + "text": "$(2x − 5)²$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "פרקו לגורמים: $x³ − x$", + "choices": [ + { + "text": "$x(x − 1)(x + 1)$", + "correct": true + }, + { + "text": "$x(x² − 1)$", + "mistake": "partial_factor" + }, + { + "text": "$x(x − 1)²$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "פרקו לגורמים: $2x² − 8x + 8$", + "choices": [ + { + "text": "$2(x − 2)²$", + "correct": true + }, + { + "text": "$2(x² − 4x + 4)$", + "mistake": "partial_factor" + }, + { + "text": "$2(x − 2)(x + 2)$", + "mistake": "diffsq_as_square" + }, + { + "text": "$(2x − 2)²$", + "mistake": "gcf_first" + } + ] + } + ] + }, + { + "id": "t_quad_eq", + "unit": "t2", + "name": "משוואות ריבועיות בסיסיות בפירוק לגורמים", + "short": "משוואה בפירוק", + "prereqs": [ + "t_trinomial", + "t_factor_formula" + ], + "description": "מעבירים את כל האיברים לאגף אחד, מפרקים לגורמים, ומשווים כל גורם לאפס.", + "month": "אוקטובר", + "questions": [ + { + "question": "פתרו: $(x − 2)(x + 5) = 0$", + "choices": [ + { + "text": "$x = 2$ או $x = −5$", + "correct": true + }, + { + "text": "$x = −2$ או $x = 5$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = 2$", + "mistake": "t_one_factor" + } + ] + }, + { + "question": "פתרו: $x² − 5x = 0$", + "choices": [ + { + "text": "$x = 0$ או $x = 5$", + "correct": true + }, + { + "text": "$x = 5$", + "mistake": "divide_by_x" + }, + { + "text": "$x = 0$ או $x = −5$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $x² − 9 = 0$", + "choices": [ + { + "text": "$x = 3$ או $x = −3$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 9$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "פתרו: $x² + 7x + 12 = 0$", + "choices": [ + { + "text": "$x = −3$ או $x = −4$", + "correct": true + }, + { + "text": "$x = 3$ או $x = 4$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = −2$ או $x = −6$", + "mistake": "product_only" + } + ] + }, + { + "question": "פתרו: $x² − x − 6 = 0$", + "choices": [ + { + "text": "$x = 3$ או $x = −2$", + "correct": true + }, + { + "text": "$x = −3$ או $x = 2$", + "mistake": "signs_swapped" + }, + { + "text": "$x = 6$ או $x = −1$", + "mistake": "product_only" + } + ] + }, + { + "question": "פתרו: $3x² − 12x = 0$", + "choices": [ + { + "text": "$x = 0$ או $x = 4$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "divide_by_x" + }, + { + "text": "$x = 0$ או $x = 12$", + "mistake": "divide_each" + } + ] + }, + { + "question": "פתרו: $x² − 6x + 9 = 0$", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = −3$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = 3$ או $x = −3$", + "mistake": "diffsq_as_square" + } + ] + }, + { + "question": "פתרו: $x² = 4x$", + "choices": [ + { + "text": "$x = 0$ או $x = 4$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "divide_by_x" + }, + { + "text": "$x = 0$ או $x = −4$", + "mistake": "move_sign" + } + ] + }, + { + "question": "פתרו: $2x² − 50 = 0$", + "choices": [ + { + "text": "$x = 5$ או $x = −5$", + "correct": true + }, + { + "text": "$x = 5$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 25$ או $x = −25$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "פתרו: $x² + 3x = 10$", + "choices": [ + { + "text": "$x = −5$ או $x = 2$", + "correct": true + }, + { + "text": "$x = 10$ או $x = 7$", + "mistake": "factor_nonzero" + }, + { + "text": "$x = 5$ או $x = −2$", + "mistake": "zero_root_sign" + } + ] + } + ] + }, + { + "id": "t_reduce", + "unit": "t2", + "name": "צמצום שברים אלגבריים", + "short": "צמצום שברים", + "prereqs": [ + "t_factor_formula", + "t_trinomial" + ], + "description": "מפרקים את המונה ואת המכנה לגורמים ומצמצמים רק גורמים משותפים.", + "month": "אוקטובר", + "questions": [ + { + "question": "צמצמו (בתחום ההצבה): $(x² − 9) / (x² + 3x)$", + "choices": [ + { + "text": "$(x − 3) / x$", + "correct": true + }, + { + "text": "$−9 / (3x)$", + "mistake": "cancel_terms" + }, + { + "text": "$(x + 3) / x$", + "mistake": "factor_sign" + }, + { + "text": "$x − 3$", + "mistake": "lost_denominator" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(2x + 6) / (x + 3)$", + "choices": [ + { + "text": "$2$", + "correct": true + }, + { + "text": "$2x + 2$", + "mistake": "cancel_terms" + }, + { + "text": "$2x$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(x² − 4) / (x − 2)$", + "choices": [ + { + "text": "$x + 2$", + "correct": true + }, + { + "text": "$x − 2$", + "mistake": "factor_sign" + }, + { + "text": "$x² + 2$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(x² + 5x + 6) / (x + 2)$", + "choices": [ + { + "text": "$x + 3$", + "correct": true + }, + { + "text": "$x² + 5x + 3$", + "mistake": "cancel_terms" + }, + { + "text": "$x + 2$", + "mistake": "factor_sign" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(x − 5) / (5 − x)$", + "choices": [ + { + "text": "$−1$", + "correct": true + }, + { + "text": "$1$", + "mistake": "opposite_factor" + }, + { + "text": "$0$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $3x² / (6x)$", + "choices": [ + { + "text": "$x / 2$", + "correct": true + }, + { + "text": "$2x$", + "mistake": "reduce_flip" + }, + { + "text": "$x² / 2$", + "mistake": "cancel_power" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(x² − 6x + 9) / (x² − 9)$", + "choices": [ + { + "text": "$(x − 3) / (x + 3)$", + "correct": true + }, + { + "text": "$1$", + "mistake": "diffsq_as_square" + }, + { + "text": "$x − 3$", + "mistake": "lost_denominator" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(4x + 8) / (x² − 4)$", + "choices": [ + { + "text": "$4 / (x − 2)$", + "correct": true + }, + { + "text": "$4 / (x + 2)$", + "mistake": "factor_sign" + }, + { + "text": "$4 / x$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(x² − x − 12) / (x² + 3x)$", + "choices": [ + { + "text": "$(x − 4) / x$", + "correct": true + }, + { + "text": "$(−x − 12) / (3x)$", + "mistake": "cancel_terms" + }, + { + "text": "$x − 4$", + "mistake": "lost_denominator" + }, + { + "text": "$(x + 4) / x$", + "mistake": "signs_swapped" + } + ] + }, + { + "question": "צמצמו (בתחום ההצבה): $(x² + 2x) / (x² + 4x + 4)$", + "choices": [ + { + "text": "$x / (x + 2)$", + "correct": true + }, + { + "text": "$2x / (4x + 4)$", + "mistake": "cancel_terms" + }, + { + "text": "$x / (x − 2)$", + "mistake": "factor_sign" + }, + { + "text": "$x$", + "mistake": "lost_denominator" + } + ] + } + ] + }, + { + "id": "t_muldiv", + "unit": "t2", + "name": "כפל וחילוק שברים אלגבריים", + "short": "כפל וחילוק שברים", + "prereqs": [ + "t_reduce" + ], + "description": "כופלים מונה במונה ומכנה במכנה; חילוק בשבר הוא כפל בשבר ההפוך. מפרקים ומצמצמים.", + "month": "אוקטובר", + "questions": [ + { + "question": "$(x² − 4) / x : (x + 2) / x² = ?$", + "choices": [ + { + "text": "$x(x − 2)$", + "correct": true + }, + { + "text": "$(x − 2)(x + 2)² / x³$", + "mistake": "div_not_flipped" + }, + { + "text": "$x − 2$", + "mistake": "cancel_power" + }, + { + "text": "$x(x + 2)$", + "mistake": "factor_sign" + } + ] + }, + { + "question": "$x / 3 · 6 / x² = ?$", + "choices": [ + { + "text": "$2 / x$", + "correct": true + }, + { + "text": "$2x$", + "mistake": "reduce_flip" + }, + { + "text": "$2 / x²$", + "mistake": "cancel_power" + } + ] + }, + { + "question": "$(x + 1) / x · x² / (x + 1) = ?$", + "choices": [ + { + "text": "$x$", + "correct": true + }, + { + "text": "$1$", + "mistake": "cancel_power" + }, + { + "text": "$x²$", + "mistake": "lost_denominator" + } + ] + }, + { + "question": "$(x² − 9) / (2x) · 4 / (x + 3) = ?$", + "choices": [ + { + "text": "$2(x − 3) / x$", + "correct": true + }, + { + "text": "$2(x + 3) / x$", + "mistake": "factor_sign" + }, + { + "text": "$(x − 3) / (2x)$", + "mistake": "reduce_flip" + } + ] + }, + { + "question": "$2x / (x − 1) : 4x / (x² − 1) = ?$", + "choices": [ + { + "text": "$(x + 1) / 2$", + "correct": true + }, + { + "text": "$8x² / ((x − 1)(x² − 1))$", + "mistake": "div_not_flipped" + }, + { + "text": "$2 / (x + 1)$", + "mistake": "reduce_flip" + }, + { + "text": "$(x − 1) / 2$", + "mistake": "factor_sign" + } + ] + }, + { + "question": "$(x² − 1) / (x + 2) · (x + 2) / (x − 1) = ?$", + "choices": [ + { + "text": "$x + 1$", + "correct": true + }, + { + "text": "$x − 1$", + "mistake": "factor_sign" + }, + { + "text": "$x²$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "$5 / x² : 10 / x = ?$", + "choices": [ + { + "text": "$1 / (2x)$", + "correct": true + }, + { + "text": "$50 / x³$", + "mistake": "div_not_flipped" + }, + { + "text": "$2x$", + "mistake": "reduce_flip" + }, + { + "text": "$1 / (2x²)$", + "mistake": "cancel_power" + } + ] + }, + { + "question": "$(x² − 5x) / 3 : (x − 5) / 6 = ?$", + "choices": [ + { + "text": "$2x$", + "correct": true + }, + { + "text": "$x(x − 5)² / 18$", + "mistake": "div_not_flipped" + }, + { + "text": "$x / 2$", + "mistake": "reduce_flip" + } + ] + }, + { + "question": "$(3x + 3) / x · x² / (x² − 1) = ?$", + "choices": [ + { + "text": "$3x / (x − 1)$", + "correct": true + }, + { + "text": "$3x / (x + 1)$", + "mistake": "factor_sign" + }, + { + "text": "$3 / (x − 1)$", + "mistake": "cancel_power" + } + ] + }, + { + "question": "$(x² + 4x + 4) / x : (x + 2) = ?$", + "choices": [ + { + "text": "$(x + 2) / x$", + "correct": true + }, + { + "text": "$(x + 2)³ / x$", + "mistake": "div_not_flipped" + }, + { + "text": "$x / (x + 2)$", + "mistake": "reduce_flip" + }, + { + "text": "$1 / x$", + "mistake": "cancel_power" + } + ] + } + ] + }, + { + "id": "k_def", + "unit": "k", + "name": "הכרת הדלתון", + "short": "הכרת הדלתון", + "prereqs": [], + "description": "דלתון הוא מרובע שיש בו שני זוגות של צלעות סמוכות שוות.", + "month": "ספטמבר", + "questions": [ + { + "question": "איזה מרובע נקרא דלתון?", + "figure": "A=0,2; B=-2.6,0; C=0,-4.99; D=2.6,0; poly A B C D", + "choices": [ + { + "text": "מרובע שיש בו שני זוגות של צלעות סמוכות שוות", + "correct": true + }, + { + "text": "מרובע שכל צלעותיו שוות", + "mistake": "kite_rhombus" + }, + { + "text": "מרובע שבו הצלעות הנגדיות שוות", + "mistake": "kite_parallelogram" + } + ] + }, + { + "question": "בדלתון $ABCD$: $AB = AD = 5$ ס״מ ו־$CB = CD = 8$ ס״מ. מה היקף הדלתון?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; len A B 5; len A D 5; len C B 8; len C D 8", + "choices": [ + { + "text": "$26$ ס״מ", + "correct": true + }, + { + "text": "$13$ ס״מ", + "mistake": "perim_all_sides" + }, + { + "text": "$18$ ס״מ", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "היקף דלתון הוא $30$ ס״מ, ושתי צלעות סמוכות שוות בו באורך $6$ ס״מ כל אחת. מה אורך כל אחת משתי הצלעות האחרות?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; len A B 6; len A D 6; len C B ?; len C D ?", + "choices": [ + { + "text": "$9$ ס״מ", + "correct": true + }, + { + "text": "$18$ ס״מ", + "mistake": "perim_all_sides" + }, + { + "text": "$24$ ס״מ", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "איזו טענה נכונה תמיד?", + "figure": "A=0,2; B=-2.6,0; C=0,-4.99; D=2.6,0; poly A B C D", + "choices": [ + { + "text": "כל מעוין הוא דלתון", + "correct": true + }, + { + "text": "כל דלתון הוא מעוין", + "mistake": "kite_rhombus" + }, + { + "text": "כל מקבילית היא דלתון", + "mistake": "kite_parallelogram" + } + ] + }, + { + "question": "בדלתון $ABCD$ נתון $AB = AD$. אילו צלעות שוות נוספות יש בו?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1", + "choices": [ + { + "text": "$CB = CD$", + "correct": true + }, + { + "text": "$BC = AD$", + "mistake": "kite_parallelogram" + }, + { + "text": "$AC = BD$", + "mistake": "kite_diag_equal" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB = BC = 4$ ו־$CD = DA = 7$. האם הוא דלתון?", + "figure": "B=0,2.18; C=2.6,0; D=0,-4.5; A=-2.6,0; poly A B C D; len A B 4; len B C 4; len C D 7; len D A 7", + "choices": [ + { + "text": "כן, יש בו שני זוגות של צלעות סמוכות שוות", + "correct": true + }, + { + "text": "לא, כי לא כל הצלעות שוות", + "mistake": "kite_rhombus" + }, + { + "text": "לא, כי הצלעות הנגדיות אינן שוות", + "mistake": "kite_parallelogram" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB = CD = 5$ ו־$BC = DA = 9$. האם הוא דלתון?", + "figure": "A=0,0; D=9,0; C=11.35,4.41; B=2.35,4.41; poly A B C D; len A B 5; len C D 5; len B C 9; len D A 9", + "choices": [ + { + "text": "לא, הצלעות השוות נגדיות ולא סמוכות", + "correct": true + }, + { + "text": "כן, יש בו שני זוגות של צלעות שוות", + "mistake": "kite_parallelogram" + } + ] + }, + { + "question": "מה נכון לגבי ריבוע?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; poly A B C D", + "choices": [ + { + "text": "הוא גם דלתון וגם מעוין", + "correct": true + }, + { + "text": "הוא מעוין, אבל לא דלתון", + "mistake": "kite_rhombus" + }, + { + "text": "הוא מלבן, ולכן לא דלתון", + "mistake": "kite_parallelogram" + } + ] + }, + { + "question": "היקף דלתון $40$ ס״מ, ואחת מצלעותיו $12$ ס״מ. מה אורך צלע סמוכה לה שאינה שווה לה?", + "figure": "A=0,4.5; B=-2.6,0; C=0,-1.82; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; len A B 12; len C B ?", + "choices": [ + { + "text": "$8$ ס״מ", + "correct": true + }, + { + "text": "$28$ ס״מ", + "mistake": "perim_all_sides" + }, + { + "text": "$16$ ס״מ", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) נתון $AB = 2x$, $AD = x + 3$. מה $x$?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; len A B 2x; len A D x + 3", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = 1$", + "mistake": "move_sign" + }, + { + "text": "$x = 6$", + "mistake": "other_quantity" + } + ] + } + ] + }, + { + "id": "k_angles", + "unit": "k", + "name": "זוויות בדלתון", + "short": "זוויות בדלתון", + "prereqs": [ + "k_def" + ], + "description": "בדלתון $ABCD$ שבו $AB = AD$ ו־$CB = CD$, הזוויות שבין הצלעות השונות שוות: $∢B = ∢D$.", + "month": "ספטמבר", + "questions": [ + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢A = 80°$, $∢C = 60°$. מה גודל $∢B$?", + "figure": "A=0,3.1; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 80°; ang B C D 60°; ang C B A ?", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$220°$", + "mistake": "forgot_half" + }, + { + "text": "$20°$", + "mistake": "angle_sum_180" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢A = 100°$, $∢C = 50°$. מה גודל $∢B$?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-5.58; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 100°; ang B C D 50°; ang C B A ?", + "choices": [ + { + "text": "$105°$", + "correct": true + }, + { + "text": "$210°$", + "mistake": "forgot_half" + }, + { + "text": "$15°$", + "mistake": "angle_sum_180" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢A = 70°$, $∢C = 40°$. מה גודל $∢B$?", + "figure": "A=0,3.71; B=-2.6,0; C=0,-7.14; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 70°; ang B C D 40°; ang C B A ?", + "choices": [ + { + "text": "$125°$", + "correct": true + }, + { + "text": "$250°$", + "mistake": "forgot_half" + }, + { + "text": "$35°$", + "mistake": "angle_sum_180" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢A = 110°$, $∢C = 90°$. מה גודל $∢B$?", + "figure": "A=0,1.82; B=-2.6,0; C=0,-2.6; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 110°; ang B C D 90°; ang C B A ?", + "choices": [ + { + "text": "$80°$", + "correct": true + }, + { + "text": "$160°$", + "mistake": "forgot_half" + }, + { + "text": "$110°$", + "mistake": "kite_wrong_pair" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢A = 130°$, $∢C = 50°$. מה גודל $∢B$?", + "figure": "A=0,1.21; B=-2.6,0; C=0,-5.58; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 130°; ang B C D 50°; ang C B A ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$180°$", + "mistake": "forgot_half" + }, + { + "text": "$130°$", + "mistake": "kite_wrong_pair" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢B = 115°$, $∢A = 70°$. מה גודל $∢C$?", + "figure": "A=0,3.71; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 70°; ang C B A 115°; ang B C D ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$175°$", + "mistake": "kite_wrong_pair" + }, + { + "text": "$115°$", + "mistake": "kite_wrong_pair" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢B = 95°$, $∢A = 110°$. מה גודל $∢C$?", + "figure": "A=0,1.82; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang D A B 110°; ang C B A 95°; ang B C D ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$155°$", + "mistake": "kite_wrong_pair" + }, + { + "text": "$70°$", + "mistake": "angle_sum_180" + } + ] + }, + { + "question": "בדלתון $ABCD$ שבו $AB = AD$ ו־$CB = CD$, אילו זוויות שוות?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2", + "choices": [ + { + "text": "$∢B = ∢D$", + "correct": true + }, + { + "text": "$∢A = ∢C$", + "mistake": "kite_wrong_pair" + }, + { + "text": "כל ארבע הזוויות", + "mistake": "kite_rhombus" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) האלכסון $AC$ חוצה את $∢A = 80°$. מה גודל $∢BAC$?", + "figure": "A=0,3.1; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; ang D A B 80°", + "choices": [ + { + "text": "$40°$", + "correct": true + }, + { + "text": "$80°$", + "mistake": "bisect_half" + }, + { + "text": "$160°$", + "mistake": "bisect_half" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢A = 2 · ∢C$ ו־$∢B = 120°$. מה גודל $∢A$?", + "figure": "A=0,3.1; B=-2.6,0; C=0,-7.14; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; ang C B A 120°; ang D A B ?", + "choices": [ + { + "text": "$80°$", + "correct": true + }, + { + "text": "$40°$", + "mistake": "other_quantity" + }, + { + "text": "$160°$", + "mistake": "kite_wrong_pair" + } + ] + } + ] + }, + { + "id": "k_diag", + "unit": "k", + "name": "האלכסון הראשי בדלתון", + "short": "האלכסון הראשי", + "prereqs": [ + "k_def" + ], + "description": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) האלכסון הראשי $AC$ מאונך לאלכסון $BD$, חוצה אותו וחוצה את $∢A$ ואת $∢C$.", + "month": "ספטמבר", + "questions": [ + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) האלכסונים נחתכים בנקודה $E$, ו־$BD = 10$. מה $BE$?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; E=0,0@se; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D; dot E; len B E ?; note BD = 10", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "kite_diag_bisect" + }, + { + "text": "אי אפשר לדעת", + "mistake": "kite_diag_bisect" + } + ] + }, + { + "question": "מה הזווית בין האלכסונים של דלתון?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; E=0,0@se; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D; dot E; ang D E A ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "kite_perp" + }, + { + "text": "תלוי בדלתון", + "mistake": "kite_perp" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) האלכסונים נחתכים ב־$E$: $AE = 12$, $BE = 5$. מה $AB$?", + "figure": "A=0,6.24; B=-2.6,0; C=0,-2.6; D=2.6,0; E=0,0@se; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D; dot E; lenx A E 12; lenx B E 5; len A B ?", + "choices": [ + { + "text": "$13$", + "correct": true + }, + { + "text": "$17$", + "mistake": "pyth" + }, + { + "text": "$7$", + "mistake": "pyth" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$), איזו טענה נכונה?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; E=0,0@se; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D; dot E", + "choices": [ + { + "text": "האלכסון $AC$ חוצה את האלכסון $BD$", + "correct": true + }, + { + "text": "האלכסון $BD$ חוצה את האלכסון $AC$", + "mistake": "kite_diag_bisect" + }, + { + "text": "האלכסונים חוצים זה את זה", + "mistake": "kite_parallelogram" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) האלכסונים נחתכים ב־$E$, ו־$∢ABD = 35°$. מה גודל $∢BAC$?", + "figure": "A=0,1.82; B=-2.6,0; C=0,-4.5; D=2.6,0; E=0,0@se; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D; dot E; ang A B D 35°; ang B A C ?", + "choices": [ + { + "text": "$55°$", + "correct": true + }, + { + "text": "$35°$", + "mistake": "kite_perp" + }, + { + "text": "$145°$", + "mistake": "kite_perp" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢BAD = 70°$. מה גודל $∢ABD$?", + "figure": "A=0,3.71; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line B D; ang B A D 70°; ang A B D ?", + "choices": [ + { + "text": "$55°$", + "correct": true + }, + { + "text": "$110°$", + "mistake": "forgot_half" + }, + { + "text": "$35°$", + "mistake": "bisect_half" + } + ] + }, + { + "question": "אורכי האלכסונים של דלתון הם $10$ ס״מ ו־$16$ ס״מ. מה שטחו?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; line A C; line B D; note BD = 10, AC = 16", + "choices": [ + { + "text": "$80$ סמ״ר", + "correct": true + }, + { + "text": "$160$ סמ״ר", + "mistake": "forgot_half_area" + }, + { + "text": "$26$ סמ״ר", + "mistake": "area_add" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $AC = 20$, $AE = 8$, כאשר $E$ נקודת חיתוך האלכסונים. מה $CE$?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-5.58; D=2.6,0; E=0,0@se; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D; dot E; lenx A E 8; lenx E C ?; note AC = 20", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$10$", + "mistake": "kite_diag_bisect" + }, + { + "text": "$8$", + "mistake": "kite_diag_bisect" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$): $∢BCD = 50°$. מה גודל $∢BCA$?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-5.58; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; ang B C D 50°", + "choices": [ + { + "text": "$25°$", + "correct": true + }, + { + "text": "$50°$", + "mistake": "bisect_half" + }, + { + "text": "$100°$", + "mistake": "bisect_half" + } + ] + }, + { + "question": "היכן האלכסון הראשי $AC$ של הדלתון חותך את האלכסון $BD$?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; line A C; line B D", + "choices": [ + { + "text": "באמצע $BD$, בזווית ישרה", + "correct": true + }, + { + "text": "באמצע $BD$, לא בהכרח בזווית ישרה", + "mistake": "kite_perp" + }, + { + "text": "בזווית ישרה, לא בהכרח באמצע $BD$", + "mistake": "kite_diag_bisect" + } + ] + } + ] + }, + { + "id": "k_axes", + "unit": "k", + "name": "דלתון במערכת צירים", + "short": "דלתון בצירים", + "prereqs": [ + "k_diag" + ], + "description": "במערכת צירים מחשבים אורכי צלעות ואלכסונים, מוצאים קודקוד חסר ומחשבים שטח של דלתון.", + "month": "ספטמבר", + "questions": [ + { + "question": "נתונות הנקודות $A(0, 5)$, $B(3, 1)$, $C(0, −1)$. איזו נקודה $D$ משלימה דלתון $ABCD$ שהאלכסון הראשי שלו $AC$?", + "figure": "A=0,5; B=3,1; C=0,-1; grid; line A B; line B C", + "choices": [ + { + "text": "$(−3, 1)$", + "correct": true + }, + { + "text": "$(3, −1)$", + "mistake": "reflect_axis" + }, + { + "text": "$(−3, −1)$", + "mistake": "reflect_axis" + } + ] + }, + { + "question": "בדלתון $A(0, 5)$, $B(3, 1)$, $C(0, −1)$, $D(−3, 1)$, מה אורך האלכסון $BD$?", + "figure": "A=0,5; B=3,1; C=0,-1; D=-3,1; poly A B C D; grid; dash B D", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$3$", + "mistake": "kite_diag_bisect" + }, + { + "text": "$4$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "בדלתון $A(0, 5)$, $B(3, 1)$, $C(0, −1)$, $D(−3, 1)$, מה אורך הצלע $AB$?", + "figure": "A=0,5; B=3,1; C=0,-1; D=-3,1; poly A B C D; grid", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$7$", + "mistake": "dist_add" + }, + { + "text": "$25$", + "mistake": "sqrt_forgot" + } + ] + }, + { + "question": "בדלתון $A(0, 5)$, $B(3, 1)$, $C(0, −1)$, $D(−3, 1)$, היכן נחתכים האלכסונים?", + "figure": "A=0,5; B=3,1; C=0,-1; D=-3,1; poly A B C D; grid; dash A C; dash B D", + "choices": [ + { + "text": "$(0, 1)$", + "correct": true + }, + { + "text": "$(0, 2)$", + "mistake": "kite_diag_bisect" + }, + { + "text": "$(1, 0)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מה שטח הדלתון $A(0, 5)$, $B(3, 1)$, $C(0, −1)$, $D(−3, 1)$?", + "figure": "A=0,5; B=3,1; C=0,-1; D=-3,1; poly A B C D; grid", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$36$", + "mistake": "forgot_half_area" + }, + { + "text": "$12$", + "mistake": "area_add" + } + ] + }, + { + "question": "בדלתון $A(−4, 0)$, $B(0, 2)$, $C(2, 0)$, $D(0, −2)$, איזה אלכסון הוא האלכסון הראשי?", + "figure": "A=-4,0; B=0,2; C=2,0; D=0,-2; poly A B C D; grid; dash A C; dash B D", + "choices": [ + { + "text": "$AC$", + "correct": true + }, + { + "text": "$BD$", + "mistake": "kite_wrong_pair" + } + ] + }, + { + "question": "בדלתון $A(−4, 0)$, $B(0, 2)$, $C(2, 0)$, $D(0, −2)$, היכן נחתכים האלכסונים?", + "figure": "A=-4,0; B=0,2; C=2,0; D=0,-2; poly A B C D; grid; dash A C; dash B D", + "choices": [ + { + "text": "$(0, 0)$", + "correct": true + }, + { + "text": "$(−1, 0)$", + "mistake": "kite_diag_bisect" + }, + { + "text": "$(0, −1)$", + "mistake": "kite_diag_bisect" + } + ] + }, + { + "question": "בדלתון $A(2, 7)$, $B(5, 4)$, $C(2, −2)$, $D(−1, 4)$, מה אורך האלכסון $AC$?", + "figure": "A=2,7; B=5,4; C=2,-2; D=-1,4; poly A B C D; grid; dash A C", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$4.5$", + "mistake": "kite_diag_bisect" + }, + { + "text": "$5$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "בדלתון $A(2, 7)$, $B(5, 4)$, $C(2, −2)$, $D(−1, 4)$, מה אורך האלכסון $BD$?", + "figure": "A=2,7; B=5,4; C=2,-2; D=-1,4; poly A B C D; grid; dash B D", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$3$", + "mistake": "kite_diag_bisect" + }, + { + "text": "$4$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "מה שטח הדלתון $A(2, 7)$, $B(5, 4)$, $C(2, −2)$, $D(−1, 4)$?", + "figure": "A=2,7; B=5,4; C=2,-2; D=-1,4; poly A B C D; grid", + "choices": [ + { + "text": "$27$", + "correct": true + }, + { + "text": "$54$", + "mistake": "forgot_half_area" + }, + { + "text": "$15$", + "mistake": "area_add" + } + ] + } + ] + }, + { + "id": "i_props", + "unit": "i", + "name": "תכונות משולש שווה שוקיים (חזרה)", + "short": "תכונות שווה שוקיים", + "prereqs": [], + "description": "במשולש שווה שוקיים זוויות הבסיס שוות, וחוצה זווית הראש, הגובה לבסיס והתיכון לבסיס מתלכדים.", + "month": "אוקטובר", + "questions": [ + { + "question": "במשולש $ABC$: $AB = AC$ ו־$∢A = 40°$. מה גודל $∢B$?", + "figure": "A=0,7.14; B=-2.6,0; C=2.6,0; poly A B C; tick A B 1; tick A C 1; ang B A C 40°; ang A B C ?", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$140°$", + "mistake": "forgot_half_angle" + }, + { + "text": "$40°$", + "mistake": "iso_wrong_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = AC$ ו־$∢B = 65°$. מה גודל $∢A$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; poly A B C; tick A B 1; tick A C 1; ang C B A 65°; ang B A C ?", + "choices": [ + { + "text": "$50°$", + "correct": true + }, + { + "text": "$115°$", + "mistake": "iso_wrong_angle" + }, + { + "text": "$65°$", + "mistake": "iso_wrong_angle" + } + ] + }, + { + "question": "במשולש $ABC$ ($AB = AC$) $AD$ תיכון לבסיס, ו־$∢BAD = 25°$. מה גודל $∢BAC$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; tick A B 1; tick A C 1; line A D; tick B D 2; tick D C 2; ang B A D 25°", + "choices": [ + { + "text": "$50°$", + "correct": true + }, + { + "text": "$25°$", + "mistake": "iso_median_bisects" + }, + { + "text": "$65°$", + "mistake": "iso_median_height" + } + ] + }, + { + "question": "במשולש $ABC$ ($AB = AC$) $AD$ תיכון לבסיס. מה גודל $∢ADB$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; tick A B 1; tick A C 1; line A D; tick B D 2; tick D C 2; ang A D B ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$45°$", + "mistake": "iso_median_height" + }, + { + "text": "אי אפשר לדעת", + "mistake": "iso_median_height" + } + ] + }, + { + "question": "במשולש $ABC$ ($AB = AC$) $AD$ גובה לבסיס, ו־$BC = 10$. מה $BD$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; tick A B 1; tick A C 1; line A D; right A D C; len B D ?; note BC = 10", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "height_is_median" + }, + { + "text": "אי אפשר לדעת", + "mistake": "height_is_median" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = AC$ ו־$∢A = 100°$. מה גודל $∢C$?", + "figure": "A=0,2.18; B=-2.6,0; C=2.6,0; poly A B C; tick A B 1; tick A C 1; ang B A C 100°; ang A C B ?", + "choices": [ + { + "text": "$40°$", + "correct": true + }, + { + "text": "$80°$", + "mistake": "forgot_half_angle" + }, + { + "text": "$100°$", + "mistake": "iso_wrong_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = AC = 13$, $BC = 10$. מה אורך הגובה לבסיס?", + "figure": "A=0,6.24; B=-2.6,0; C=2.6,0; _D=0,0; poly A B C; dash A _D; right A _D C; len A B 13; len A C 13; len B C 10; lenx A _D ?", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$5$", + "mistake": "iso_half_base" + }, + { + "text": "$8$", + "mistake": "pyth" + } + ] + }, + { + "question": "במשולש שווה שוקיים זווית הראש היא $90°$. מה גודל כל זווית בסיס?", + "figure": "A=0,2.6; B=-2.6,0; C=2.6,0; poly A B C; tick A B 1; tick A C 1; right B A C; ang A B C ?", + "choices": [ + { + "text": "$45°$", + "correct": true + }, + { + "text": "$90°$", + "mistake": "forgot_half_angle" + }, + { + "text": "$60°$", + "mistake": "iso_wrong_angle" + } + ] + }, + { + "question": "במשולש $ABC$ ($AB = AC$) $AD$ חוצה את זווית הראש, ו־$BC = 14$. מה $DC$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; tick A B 1; tick A C 1; line A D; ang B A D; ang D A C; len D C ?; note BC = 14", + "choices": [ + { + "text": "$7$", + "correct": true + }, + { + "text": "$14$", + "mistake": "iso_median_bisects" + }, + { + "text": "אי אפשר לדעת", + "mistake": "iso_median_bisects" + } + ] + }, + { + "question": "במשולש $ABC$ ($AB = AC$): $∢B = 2x$ ו־$∢C = 50°$. מה $x$?", + "figure": "A=0,3.1; B=-2.6,0; C=2.6,0; poly A B C; tick A B 1; tick A C 1; ang C B A 2x; ang A C B 50°", + "choices": [ + { + "text": "$x = 25$", + "correct": true + }, + { + "text": "$x = 50$", + "mistake": "forgot_divide" + }, + { + "text": "$x = 40$", + "mistake": "iso_wrong_angle" + } + ] + } + ] + }, + { + "id": "i_converse_angles", + "unit": "i", + "name": "משפט הפוך: שתי זוויות שוות", + "short": "זוויות שוות", + "prereqs": [ + "i_props" + ], + "description": "אם במשולש שתי זוויות שוות, הצלעות שמולן שוות, והמשולש שווה שוקיים.", + "month": "אוקטובר", + "questions": [ + { + "question": "במשולש $ABC$: $∢B = ∢C = 70°$ ו־$AB = 8$. מה $AC$?", + "figure": "A=0,7.14; B=-2.6,0; C=2.6,0; poly A B C; ang C B A 70°; ang A C B 70°; len A B 8; len A C ?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "אי אפשר לדעת", + "mistake": "iso_converse" + }, + { + "text": "$4$", + "mistake": "iso_half_base" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 50°$, $∢B = 65°$. אילו צלעות שוות?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; poly A B C; ang B A C 50°; ang C B A 65°", + "choices": [ + { + "text": "$AB = AC$", + "correct": true + }, + { + "text": "$BC = AC$", + "mistake": "iso_wrong_side" + }, + { + "text": "אין צלעות שוות", + "mistake": "iso_converse" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = ∢B = 40°$. אילו צלעות שוות?", + "figure": "C=0,2.18; A=-2.6,0; B=2.6,0; poly C A B; ang B A C 40°; ang C B A 40°", + "choices": [ + { + "text": "$BC = AC$", + "correct": true + }, + { + "text": "$AB = AC$", + "mistake": "iso_wrong_side" + }, + { + "text": "$AB = BC$", + "mistake": "iso_wrong_side" + } + ] + }, + { + "question": "במשולש $ABC$: $∢B = ∢C$, $AB = 5$ ו־$BC = 8$. מה היקף המשולש?", + "figure": "A=0,1.95; B=-2.6,0; C=2.6,0; poly A B C; ang C B A; ang A C B; len A B 5; len B C 8", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$21$", + "mistake": "iso_wrong_side" + }, + { + "text": "$15$", + "mistake": "iso_equilateral" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 80°$, $∢B = 50°$. אילו צלעות שוות?", + "figure": "A=0,3.1; B=-2.6,0; C=2.6,0; poly A B C; ang B A C 80°; ang C B A 50°", + "choices": [ + { + "text": "$AB = AC$", + "correct": true + }, + { + "text": "$BC = AB$", + "mistake": "iso_wrong_side" + }, + { + "text": "$BC = AC$", + "mistake": "iso_wrong_side" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = ∢B = 60°$. איזה משולש זה?", + "figure": "C=0,4.5; A=-2.6,0; B=2.6,0; poly C A B; ang B A C 60°; ang C B A 60°", + "choices": [ + { + "text": "משולש שווה צלעות", + "correct": true + }, + { + "text": "משולש שווה שוקיים שאינו שווה צלעות", + "mistake": "all_60" + }, + { + "text": "אי אפשר לדעת", + "mistake": "iso_converse" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 36°$, $∢B = 72°$, $AC = 9$. מה $AB$?", + "figure": "A=0,8; B=-2.6,0; C=2.6,0; poly A B C; ang B A C 36°; ang C B A 72°; len A C 9; len A B ?", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$4.5$", + "mistake": "iso_half_base" + }, + { + "text": "אי אפשר לדעת", + "mistake": "iso_converse" + } + ] + }, + { + "question": "במשולש $ABC$ הזוויות החיצוניות ליד $B$ וליד $C$ שוות. מה אפשר להסיק?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; _B2=-4.94,0; _C2=4.94,0; poly A B C; line _B2 _C2; ang2 A B _B2; ang2 _C2 C A", + "choices": [ + { + "text": "$AB = AC$", + "correct": true + }, + { + "text": "$BC = AB$", + "mistake": "iso_wrong_side" + }, + { + "text": "המשולש שווה צלעות", + "mistake": "iso_equilateral" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 70°$, $∢B = 40°$. האם המשולש שווה שוקיים?", + "figure": "B=0,7.14; A=-2.6,0; C=2.6,0; poly B A C; ang C A B 70°; ang A B C 40°", + "choices": [ + { + "text": "כן, $AB = BC$", + "correct": true + }, + { + "text": "כן, $AB = AC$", + "mistake": "iso_wrong_side" + }, + { + "text": "לא", + "mistake": "iso_converse" + } + ] + }, + { + "question": "במשולש $ABC$: $∢B = ∢C$, $AB = 2x + 1$ ו־$AC = x + 6$. מה $x$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; poly A B C; ang C B A; ang A C B; len A B 2x + 1; len A C x + 6", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 7$", + "mistake": "move_sign" + }, + { + "text": "$x = 7/3$", + "mistake": "iso_wrong_side" + } + ] + } + ] + }, + { + "id": "i_converse_lines", + "unit": "i", + "name": "משפטים הפוכים: גובה, תיכון וחוצה זווית", + "short": "קטע בשני תפקידים", + "prereqs": [ + "i_props" + ], + "description": "אם במשולש קטע אחד ממלא שני תפקידים (גובה ותיכון, גובה וחוצה זווית, או תיכון וחוצה זווית), המשולש שווה שוקיים.", + "month": "אוקטובר", + "questions": [ + { + "question": "במשולש $ABC$, $AD$ הוא גם תיכון לצלע $BC$ וגם גובה לה. מה אפשר להסיק?", + "figure": "A=0,4.99; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; tick B D 2; tick D C 2", + "choices": [ + { + "text": "$AB = AC$", + "correct": true + }, + { + "text": "$BD = AD$", + "mistake": "iso_half_base" + }, + { + "text": "$∢A = 90°$", + "mistake": "iso_right" + } + ] + }, + { + "question": "במשולש $ABC$, $AD$ חוצה את $∢A$ וגם מאונך ל־$BC$, ו־$AB = 7$. מה $AC$?", + "figure": "A=0,4.99; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; ang B A D; ang D A C; len A B 7; len A C ?", + "choices": [ + { + "text": "$7$", + "correct": true + }, + { + "text": "$3.5$", + "mistake": "iso_half_base" + }, + { + "text": "אי אפשר לדעת", + "mistake": "iso_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $AD$ גובה לצלע $BC$, ו־$BD = DC = 4$, $AB = 6$. מה היקף המשולש?", + "figure": "A=0,2.91; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; len B D 4; len D C 4; len A B 6", + "choices": [ + { + "text": "$20$", + "correct": true + }, + { + "text": "$16$", + "mistake": "iso_half_base" + }, + { + "text": "$14$", + "mistake": "iso_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $AD$ חוצה את $∢A$ והוא גם תיכון לצלע $BC$, ו־$∢B = 55°$. מה גודל $∢C$?", + "figure": "A=0,3.71; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; ang B A D; ang D A C; tick B D 2; tick D C 2; ang C B A 55°; ang A C B ?", + "choices": [ + { + "text": "$55°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "iso_wrong_angle" + }, + { + "text": "$125°$", + "mistake": "iso_wrong_angle" + } + ] + }, + { + "question": "במשולש $ABC$, $AD$ גובה ותיכון לצלע $BC$, ו־$∢BAD = 20°$. מה גודל $∢B$?", + "figure": "A=0,7.14; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; tick B D 2; tick D C 2; ang B A D 20°; ang A B C ?", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$20°$", + "mistake": "iso_median_bisects" + }, + { + "text": "$140°$", + "mistake": "forgot_half_angle" + } + ] + }, + { + "question": "איזה נתון מספיק כדי להוכיח שהמשולש $ABC$ שווה שוקיים?", + "figure": "A=2.2,3.6; B=0,0; C=6.2,0; D=2.79,0@s; poly A B C; line A D", + "choices": [ + { + "text": "$AD$ גם גובה וגם תיכון לצלע $BC$", + "correct": true + }, + { + "text": "$AD$ גובה לצלע $BC$", + "mistake": "one_role" + }, + { + "text": "$AD$ תיכון לצלע $BC$", + "mistake": "one_role" + } + ] + }, + { + "question": "במשולש $ABC$: $AD ⊥ BC$ ו־$AD$ חוצה את $∢A$. נתון $∢B = 3x + 10$, $∢C = 5x − 20$. מה $x$?", + "figure": "A=0,3.71; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; ang B A D; ang D A C; ang C B A 3x + 10; ang A C B 5x − 20", + "choices": [ + { + "text": "$x = 15$", + "correct": true + }, + { + "text": "$x = 5$", + "mistake": "move_sign" + }, + { + "text": "$x = 30$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "במשולש $ABC$, חוצה הזווית $A$ הוא גם גובה. נתון $AB = 3y$ ו־$AC = y + 8$. מה $y$?", + "figure": "A=0,4.99; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; ang B A D; ang D A C; len A B 3y; len A C y + 8", + "choices": [ + { + "text": "$y = 4$", + "correct": true + }, + { + "text": "$y = 8$", + "mistake": "forgot_divide" + }, + { + "text": "$y = 2$", + "mistake": "iso_wrong_side" + } + ] + }, + { + "question": "במשולש $ABC$: $BD = DC$ ו־$AD ⊥ BC$, ו־$∢BAC = 50°$. מה גודל $∢ABC$?", + "figure": "A=0,5.58; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; line A D; right A D C; tick B D 2; tick D C 2; ang B A C 50°; ang A B C ?", + "choices": [ + { + "text": "$65°$", + "correct": true + }, + { + "text": "$50°$", + "mistake": "iso_wrong_angle" + }, + { + "text": "$130°$", + "mistake": "forgot_half_angle" + } + ] + }, + { + "question": "במשולש $ABC$, $AE$ תיכון לצלע $BC$ והוא גם חוצה זווית. נתון $AB = 10$, $BC = 12$. מה $AE$?", + "figure": "A=0,3.47; B=-2.6,0; C=2.6,0; E=0,0@s; poly A B C; line A E; tick B E 2; tick E C 2; ang B A E; ang E A C; len A B 10; lenx A E ?; note BC = 12", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$6$", + "mistake": "iso_half_base" + }, + { + "text": "$4$", + "mistake": "pyth" + } + ] + } + ] + }, + { + "id": "i_axes", + "unit": "i", + "name": "משולש שווה שוקיים במערכת צירים", + "short": "שווה שוקיים בצירים", + "prereqs": [ + "i_converse_lines" + ], + "description": "במערכת צירים מזהים משולש שווה שוקיים, מחשבים את הגובה לבסיס ומשתמשים בכך שהוא גם תיכון.", + "month": "אוקטובר", + "questions": [ + { + "question": "איזה משולש הוא $A(0, 6)$, $B(−4, 0)$, $C(4, 0)$?", + "figure": "A=0,6; B=-4,0; C=4,0; poly A B C; grid", + "choices": [ + { + "text": "שווה שוקיים ($AB = AC$)", + "correct": true + }, + { + "text": "שווה צלעות", + "mistake": "iso_equilateral" + }, + { + "text": "ישר זווית", + "mistake": "iso_right" + } + ] + }, + { + "question": "במשולש $A(0, 6)$, $B(−4, 0)$, $C(4, 0)$, מה אורך הגובה לבסיס $BC$?", + "figure": "A=0,6; B=-4,0; C=4,0; _H=0,0; poly A B C; grid; dash A _H", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$4$", + "mistake": "iso_half_base" + }, + { + "text": "$8$", + "mistake": "iso_half_base" + } + ] + }, + { + "question": "במשולש $A(2, 7)$, $B(−1, 3)$, $C(5, 3)$, מה אורך הגובה לבסיס $BC$?", + "figure": "A=2,7; B=-1,3; C=5,3; _H=2,3; poly A B C; grid; dash A _H", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$7$", + "mistake": "height_from_axis" + }, + { + "text": "$3$", + "mistake": "iso_half_base" + } + ] + }, + { + "question": "מה שטח המשולש $A(2, 7)$, $B(−1, 3)$, $C(5, 3)$?", + "figure": "A=2,7; B=-1,3; C=5,3; poly A B C; grid", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$24$", + "mistake": "forgot_half_area" + }, + { + "text": "$21$", + "mistake": "height_from_axis" + } + ] + }, + { + "question": "המשולש $A(3, 5)$, $B(0, 1)$, $C(x, 1)$ שווה שוקיים שבסיסו $BC$. מה $x$?", + "figure": "A=3,5; B=0,1; grid; line A B; note C(x, 1)", + "choices": [ + { + "text": "$x = 6$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "iso_half_base" + }, + { + "text": "$x = −3$", + "mistake": "reflect_axis" + } + ] + }, + { + "question": "$B(−3, −2)$ ו־$C(5, −2)$ הם קצות הבסיס של משולש שווה שוקיים $ABC$. על איזה ישר נמצא $A$?", + "figure": "B=-3,-2; C=5,-2; grid; line B C", + "choices": [ + { + "text": "$x = 1$", + "correct": true + }, + { + "text": "$y = 1$", + "mistake": "axes_mixed" + }, + { + "text": "$x = 4$", + "mistake": "forgot_half_axis" + } + ] + }, + { + "question": "במשולש $A(1, 4)$, $B(−2, 0)$, $C(4, 0)$, מה $AB$?", + "figure": "A=1,4; B=-2,0; C=4,0; poly A B C; grid", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$7$", + "mistake": "dist_add" + }, + { + "text": "$25$", + "mistake": "sqrt_forgot" + } + ] + }, + { + "question": "במשולש $A(1, 4)$, $B(−2, 0)$, $C(4, 0)$, היכן הגובה מ־$A$ פוגש את $BC$?", + "figure": "A=1,4; B=-2,0; C=4,0; poly A B C; grid", + "choices": [ + { + "text": "$(1, 0)$", + "correct": true + }, + { + "text": "$(3, 0)$", + "mistake": "iso_half_base" + }, + { + "text": "$(0, 1)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מה היקף המשולש $A(0, 8)$, $B(−6, 0)$, $C(6, 0)$?", + "figure": "A=0,8; B=-6,0; C=6,0; poly A B C; grid", + "choices": [ + { + "text": "$32$", + "correct": true + }, + { + "text": "$22$", + "mistake": "perim_all_sides" + }, + { + "text": "$26$", + "mistake": "pyth" + } + ] + }, + { + "question": "מה שטח המשולש $A(4, 1)$, $B(0, 4)$, $C(8, 4)$?", + "figure": "A=4,1; B=0,4; C=8,4; poly A B C; grid", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$24$", + "mistake": "forgot_half_area" + }, + { + "text": "$16$", + "mistake": "height_from_axis" + } + ] + } + ] + }, + { + "id": "q_parabola", + "unit": "q", + "name": "הפרבולה $y = ax²$", + "short": "הפרבולה $ax²$", + "prereqs": [], + "description": "הקודקוד של $ax²$ הוא $(0, 0)$. סימן $a$ קובע אם הוא נקודת מינימום ($a > 0$) או מקסימום ($a < 0$).", + "month": "נובמבר", + "questions": [ + { + "question": "לאיזו מהפונקציות יש נקודת מקסימום?", + "choices": [ + { + "text": "$f(x) = −2x²$", + "correct": true + }, + { + "text": "$f(x) = 2x²$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = 0.5x²$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = x²$", + "mistake": "opening_sign" + } + ] + }, + { + "question": "לאיזו מהפונקציות יש נקודת מינימום?", + "choices": [ + { + "text": "$f(x) = 0.5x²$", + "correct": true + }, + { + "text": "$f(x) = −x²$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = −3x²$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = −0.5x²$", + "mistake": "opening_sign" + } + ] + }, + { + "question": "מה הקודקוד של הפרבולה $f(x) = −4x²$?", + "choices": [ + { + "text": "$(0, 0)$", + "correct": true + }, + { + "text": "$(0, −4)$", + "mistake": "a_as_k" + }, + { + "text": "$(−4, 0)$", + "mistake": "a_as_k" + } + ] + }, + { + "question": "נתונה $f(x) = 3x²$. מה $f(−2)$?", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$−12$", + "mistake": "neg_square" + }, + { + "text": "$36$", + "mistake": "squared_coef" + } + ] + }, + { + "question": "נתונה $f(x) = −x²$. מה $f(3)$?", + "choices": [ + { + "text": "$−9$", + "correct": true + }, + { + "text": "$9$", + "mistake": "minus_outside" + }, + { + "text": "$−6$", + "mistake": "sq_as_double" + } + ] + }, + { + "question": "הנקודה $(2, 8)$ נמצאת על הגרף של $f(x) = ax²$. מה $a$?", + "choices": [ + { + "text": "$a = 2$", + "correct": true + }, + { + "text": "$a = 4$", + "mistake": "a_from_point" + }, + { + "text": "$a = 0.5$", + "mistake": "a_from_point" + } + ] + }, + { + "question": "הגרף של $f(x) = ax²$ עובר בנקודה $(1, −3)$. איזו נקודת קיצון יש לפונקציה?", + "choices": [ + { + "text": "נקודת מקסימום", + "correct": true + }, + { + "text": "נקודת מינימום", + "mistake": "opening_sign" + }, + { + "text": "אין לה נקודת קיצון", + "mistake": "no_extremum_parabola" + } + ] + }, + { + "question": "איזו מהנקודות נמצאת על הגרף של $f(x) = 2x²$?", + "choices": [ + { + "text": "$(−3, 18)$", + "correct": true + }, + { + "text": "$(−3, −18)$", + "mistake": "neg_square" + }, + { + "text": "$(3, 36)$", + "mistake": "squared_coef" + }, + { + "text": "$(18, 3)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "הגרף של $f(x) = −0.5x²$ עובר בנקודה $(4, −8)$. איזו נקודה נוספת על הגרף נמצאת באותו גובה?", + "choices": [ + { + "text": "$(−4, −8)$", + "correct": true + }, + { + "text": "$(4, 8)$", + "mistake": "reflect_axis" + }, + { + "text": "$(−8, 4)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "נתונה $f(x) = ax²$ כאשר $a < 0$. איזו טענה נכונה?", + "choices": [ + { + "text": "ערך המקסימום של הפונקציה הוא $0$", + "correct": true + }, + { + "text": "ערך המינימום של הפונקציה הוא $0$", + "mistake": "opening_sign" + }, + { + "text": "הפונקציה חיובית לכל $x ≠ 0$", + "mistake": "pos_neg_swap" + } + ] + } + ] + }, + { + "id": "q_props", + "unit": "q", + "name": "תכונות הפונקציה הריבועית מגרף", + "short": "תכונות מגרף", + "prereqs": [ + "q_parabola" + ], + "description": "מגרף של פרבולה קוראים נקודת קיצון, תחומי עלייה וירידה, חיתוך עם הצירים ותחומי חיוביות ושליליות.", + "month": "נובמבר", + "questions": [ + { + "question": "לפי הגרף, מהי נקודת הקיצון של הפונקציה, ומה סוגה?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$(1, −4)$, מינימום", + "correct": true + }, + { + "text": "$(1, −4)$, מקסימום", + "mistake": "max_vs_min" + }, + { + "text": "$(−4, 1)$, מינימום", + "mistake": "swapped_pair" + }, + { + "text": "$(−1, 0)$, מינימום", + "mistake": "vertex_as_root" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה עולה?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$x > 1$", + "correct": true + }, + { + "text": "$x < 1$", + "mistake": "dir_confusion" + }, + { + "text": "$y > −4$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה שלילית?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$−1 < x < 3$", + "correct": true + }, + { + "text": "$x < −1$ או $x > 3$", + "mistake": "pos_neg_swap" + }, + { + "text": "$x < 0$", + "mistake": "neg_x" + }, + { + "text": "$−4 < y < 0$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, מהן נקודות החיתוך של הגרף עם ציר $x$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$(−1, 0)$ ו־$(3, 0)$", + "correct": true + }, + { + "text": "$(0, −3)$", + "mistake": "axes_mixed" + }, + { + "text": "$(1, −4)$", + "mistake": "vertex_as_root" + }, + { + "text": "$(0, −1)$ ו־$(0, 3)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "לפי הגרף, מהי נקודת הקיצון של הפונקציה, ומה סוגה?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$(−1, 4)$, מקסימום", + "correct": true + }, + { + "text": "$(−1, 4)$, מינימום", + "mistake": "max_vs_min" + }, + { + "text": "$(4, −1)$, מקסימום", + "mistake": "swapped_pair" + }, + { + "text": "$(0, 3)$, מקסימום", + "mistake": "plug_zero" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה יורדת?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$x > −1$", + "correct": true + }, + { + "text": "$x < −1$", + "mistake": "dir_confusion" + }, + { + "text": "$y < 4$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה חיובית?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$−3 < x < 1$", + "correct": true + }, + { + "text": "$x < −3$ או $x > 1$", + "mistake": "pos_neg_swap" + }, + { + "text": "$x > 0$", + "mistake": "neg_x" + }, + { + "text": "$0 < y < 4$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, מהי נקודת החיתוך של הגרף עם ציר $y$?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$(0, 3)$", + "correct": true + }, + { + "text": "$(3, 0)$", + "mistake": "swapped_pair" + }, + { + "text": "$(−3, 0)$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "לפי הגרף, מה הערך המקסימלי של הפונקציה?", + "graph": { + "points": [ + [ + 0, + -2.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 2 + ], + [ + 4, + 1.5 + ], + [ + 5, + 0 + ], + [ + 6, + -2.5 + ] + ], + "x": [ + -0.5, + 6.5 + ], + "y": [ + -3, + 2.5 + ] + }, + "choices": [ + { + "text": "$2$", + "correct": true + }, + { + "text": "$3$", + "mistake": "x_as_value" + }, + { + "text": "$(3, 2)$", + "mistake": "value_vs_point" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה חיובית?", + "graph": { + "points": [ + [ + -4, + 4 + ], + [ + -3, + 1 + ], + [ + -2, + 0 + ], + [ + -1, + 1 + ], + [ + 0, + 4 + ] + ], + "x": [ + -4.5, + 1.5 + ], + "y": [ + -1, + 4.5 + ] + }, + "choices": [ + { + "text": "לכל $x ≠ −2$", + "correct": true + }, + { + "text": "$x > −2$", + "mistake": "touch_point" + }, + { + "text": "אין תחום שבו הפונקציה חיובית", + "mistake": "pos_neg_swap" + } + ] + } + ] + }, + { + "id": "q_vshift", + "unit": "q", + "name": "הזזה אנכית $ax² + k$", + "short": "הזזה אנכית", + "prereqs": [ + "q_parabola" + ], + "description": "$ax² + k$ היא הפרבולה $ax²$ שהוזזה $k$ יחידות למעלה ($k > 0$) או למטה ($k < 0$). הקודקוד $(0, k)$.", + "month": "נובמבר", + "questions": [ + { + "question": "מה הקודקוד של הפרבולה $f(x) = 2x² − 5$?", + "choices": [ + { + "text": "$(0, −5)$", + "correct": true + }, + { + "text": "$(−5, 0)$", + "mistake": "vshift_as_h" + }, + { + "text": "$(0, 5)$", + "mistake": "k_sign" + }, + { + "text": "$(5, 0)$", + "mistake": "vshift_as_h" + } + ] + }, + { + "question": "איך מתקבל הגרף של $f(x) = x² + 3$ מהגרף של $y = x²$?", + "choices": [ + { + "text": "הזזה של $3$ יחידות למעלה", + "correct": true + }, + { + "text": "הזזה של $3$ יחידות למטה", + "mistake": "k_sign" + }, + { + "text": "הזזה של $3$ יחידות ימינה", + "mistake": "vshift_as_h" + }, + { + "text": "הזזה של $3$ יחידות שמאלה", + "mistake": "vshift_as_h" + } + ] + }, + { + "question": "מהי נקודת הקיצון של $f(x) = −x² + 4$, ומה סוגה?", + "choices": [ + { + "text": "$(0, 4)$, מקסימום", + "correct": true + }, + { + "text": "$(0, 4)$, מינימום", + "mistake": "opening_sign" + }, + { + "text": "$(4, 0)$, מקסימום", + "mistake": "vshift_as_h" + }, + { + "text": "$(0, −4)$, מקסימום", + "mistake": "k_sign" + } + ] + }, + { + "question": "מזיזים את הגרף של $y = 3x²$ שתי יחידות למטה. מהי הפונקציה המתקבלת?", + "choices": [ + { + "text": "$f(x) = 3x² − 2$", + "correct": true + }, + { + "text": "$f(x) = 3x² + 2$", + "mistake": "k_sign" + }, + { + "text": "$f(x) = 3(x − 2)²$", + "mistake": "vshift_as_h" + }, + { + "text": "$f(x) = 3(x + 2)²$", + "mistake": "vshift_as_h" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $f(x) = x² − 9$ עם ציר $x$?", + "choices": [ + { + "text": "$(3, 0)$ ו־$(−3, 0)$", + "correct": true + }, + { + "text": "$(3, 0)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(0, −9)$", + "mistake": "axes_mixed" + }, + { + "text": "$(9, 0)$ ו־$(−9, 0)$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "כמה נקודות חיתוך עם ציר $x$ יש לגרף של $f(x) = 2x² + 1$?", + "choices": [ + { + "text": "אין נקודות חיתוך", + "correct": true + }, + { + "text": "שתי נקודות", + "mistake": "vertex_side" + }, + { + "text": "נקודה אחת", + "mistake": "vertex_side" + } + ] + }, + { + "question": "מהי נקודת החיתוך של $f(x) = −2x² + 8$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, 8)$", + "correct": true + }, + { + "text": "$(8, 0)$", + "mistake": "swapped_pair" + }, + { + "text": "$(2, 0)$", + "mistake": "axes_mixed" + }, + { + "text": "$(0, −2)$", + "mistake": "a_as_k" + } + ] + }, + { + "question": "נתונה $f(x) = −x² + 1$. באיזה תחום הפונקציה חיובית?", + "choices": [ + { + "text": "$−1 < x < 1$", + "correct": true + }, + { + "text": "$x < −1$ או $x > 1$", + "mistake": "pos_neg_swap" + }, + { + "text": "$x > 0$", + "mistake": "neg_x" + }, + { + "text": "$0 < y < 1$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לאיזו מהפונקציות יש ערך מינימום $−6$?", + "choices": [ + { + "text": "$f(x) = 4x² − 6$", + "correct": true + }, + { + "text": "$f(x) = −4x² − 6$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = 4x² + 6$", + "mistake": "k_sign" + }, + { + "text": "$f(x) = 4(x − 6)²$", + "mistake": "vshift_as_h" + } + ] + }, + { + "question": "נתונה $f(x) = 0.5x² − 2$. באיזה תחום הפונקציה יורדת?", + "choices": [ + { + "text": "$x < 0$", + "correct": true + }, + { + "text": "$x > 0$", + "mistake": "dir_confusion" + }, + { + "text": "$x < −2$", + "mistake": "vshift_as_h" + }, + { + "text": "$y < −2$", + "mistake": "x_vs_y_interval" + } + ] + } + ] + }, + { + "id": "q_hshift", + "unit": "q", + "name": "הזזה אופקית $a(x − b)²$", + "short": "הזזה אופקית", + "prereqs": [ + "q_parabola" + ], + "description": "$a(x − b)²$ היא הפרבולה $ax²$ שהוזזה $b$ יחידות ימינה (ואם $b < 0$, שמאלה). הקודקוד $(b, 0)$.", + "month": "נובמבר", + "questions": [ + { + "question": "מה הקודקוד של הפרבולה $f(x) = (x + 3)²$?", + "choices": [ + { + "text": "$(−3, 0)$", + "correct": true + }, + { + "text": "$(3, 0)$", + "mistake": "hshift_sign" + }, + { + "text": "$(0, 3)$", + "mistake": "h_as_v" + }, + { + "text": "$(0, 9)$", + "mistake": "plug_zero" + } + ] + }, + { + "question": "איך מתקבל הגרף של $f(x) = (x − 5)²$ מהגרף של $y = x²$?", + "choices": [ + { + "text": "הזזה של $5$ יחידות ימינה", + "correct": true + }, + { + "text": "הזזה של $5$ יחידות שמאלה", + "mistake": "hshift_sign" + }, + { + "text": "הזזה של $5$ יחידות למעלה", + "mistake": "h_as_v" + }, + { + "text": "הזזה של $5$ יחידות למטה", + "mistake": "h_as_v" + } + ] + }, + { + "question": "מהי נקודת הקיצון של $f(x) = −2(x − 1)²$, ומה סוגה?", + "choices": [ + { + "text": "$(1, 0)$, מקסימום", + "correct": true + }, + { + "text": "$(1, 0)$, מינימום", + "mistake": "opening_sign" + }, + { + "text": "$(−1, 0)$, מקסימום", + "mistake": "hshift_sign" + }, + { + "text": "$(0, −2)$, מקסימום", + "mistake": "plug_zero" + } + ] + }, + { + "question": "מזיזים את הגרף של $y = x²$ ארבע יחידות שמאלה. מהי הפונקציה המתקבלת?", + "choices": [ + { + "text": "$f(x) = (x + 4)²$", + "correct": true + }, + { + "text": "$f(x) = (x − 4)²$", + "mistake": "hshift_sign" + }, + { + "text": "$f(x) = x² + 4$", + "mistake": "h_as_v" + }, + { + "text": "$f(x) = x² − 4$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "מהי נקודת החיתוך של $f(x) = (x − 2)²$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, 4)$", + "correct": true + }, + { + "text": "$(2, 0)$", + "mistake": "axes_mixed" + }, + { + "text": "$(0, −4)$", + "mistake": "neg_square" + } + ] + }, + { + "question": "באיזה תחום הפונקציה $f(x) = (x + 1)²$ עולה?", + "choices": [ + { + "text": "$x > −1$", + "correct": true + }, + { + "text": "$x > 1$", + "mistake": "hshift_sign" + }, + { + "text": "$x < −1$", + "mistake": "dir_confusion" + }, + { + "text": "$x > 0$", + "mistake": "shift_keeps" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $f(x) = 3(x − 4)²$ עם ציר $x$?", + "choices": [ + { + "text": "$(4, 0)$ בלבד", + "correct": true + }, + { + "text": "$(−4, 0)$ בלבד", + "mistake": "hshift_sign" + }, + { + "text": "$(4, 0)$ ו־$(−4, 0)$", + "mistake": "touch_point" + }, + { + "text": "$(0, 48)$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "לאיזו מהפרבולות ציר הסימטריה הוא $x = −6$?", + "choices": [ + { + "text": "$f(x) = (x + 6)²$", + "correct": true + }, + { + "text": "$f(x) = (x − 6)²$", + "mistake": "hshift_sign" + }, + { + "text": "$f(x) = x² − 6$", + "mistake": "h_as_v" + }, + { + "text": "$f(x) = x² + 6$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "נתונה $f(x) = −(x + 2)²$. באיזה תחום הפונקציה שלילית?", + "choices": [ + { + "text": "לכל $x ≠ −2$", + "correct": true + }, + { + "text": "$x > −2$", + "mistake": "touch_point" + }, + { + "text": "לכל $x ≠ 2$", + "mistake": "hshift_sign" + }, + { + "text": "אין תחום שבו הפונקציה שלילית", + "mistake": "pos_neg_swap" + } + ] + }, + { + "question": "מה ערך המינימום של $f(x) = 2(x − 3)²$?", + "choices": [ + { + "text": "$0$", + "correct": true + }, + { + "text": "$3$", + "mistake": "x_as_value" + }, + { + "text": "$18$", + "mistake": "plug_zero" + } + ] + } + ] + }, + { + "id": "q_vertex", + "unit": "q", + "name": "הזזה אופקית ואנכית $a(x − b)² + k$", + "short": "הצגה קודקודית", + "prereqs": [ + "q_vshift", + "q_hshift" + ], + "description": "שילוב הזזה אופקית ואנכית: הקודקוד $(b, k)$, וסימן $a$ קובע את סוג הקיצון.", + "month": "נובמבר", + "questions": [ + { + "question": "מה הקודקוד של $f(x) = −(x − 4)² + 1$, והאם הוא נקודת מינימום או מקסימום?", + "choices": [ + { + "text": "$(4, 1)$, מקסימום", + "correct": true + }, + { + "text": "$(4, 1)$, מינימום", + "mistake": "opening_sign" + }, + { + "text": "$(−4, 1)$, מקסימום", + "mistake": "hshift_sign" + }, + { + "text": "$(1, 4)$, מקסימום", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מה הקודקוד של $f(x) = 2(x + 1)² − 3$?", + "choices": [ + { + "text": "$(−1, −3)$", + "correct": true + }, + { + "text": "$(1, −3)$", + "mistake": "hshift_sign" + }, + { + "text": "$(−1, 3)$", + "mistake": "k_sign" + }, + { + "text": "$(−3, −1)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מזיזים את $y = x²$ שתי יחידות ימינה וחמש יחידות למעלה. מהי הפונקציה המתקבלת?", + "choices": [ + { + "text": "$f(x) = (x − 2)² + 5$", + "correct": true + }, + { + "text": "$f(x) = (x + 2)² + 5$", + "mistake": "hshift_sign" + }, + { + "text": "$f(x) = (x − 5)² + 2$", + "mistake": "h_as_v" + }, + { + "text": "$f(x) = (x − 2)² − 5$", + "mistake": "k_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $f(x) = (x − 2)² − 9$ עם ציר $x$?", + "choices": [ + { + "text": "$(−1, 0)$ ו־$(5, 0)$", + "correct": true + }, + { + "text": "$(5, 0)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(2, −9)$", + "mistake": "vertex_as_root" + }, + { + "text": "$(0, −5)$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "מהי נקודת החיתוך של $f(x) = −(x − 3)² + 4$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, −5)$", + "correct": true + }, + { + "text": "$(0, 13)$", + "mistake": "minus_outside" + }, + { + "text": "$(0, 4)$", + "mistake": "k_as_yint" + } + ] + }, + { + "question": "באיזה תחום הפונקציה $f(x) = −2(x + 3)² + 1$ עולה?", + "choices": [ + { + "text": "$x < −3$", + "correct": true + }, + { + "text": "$x > −3$", + "mistake": "dir_confusion" + }, + { + "text": "$x < 3$", + "mistake": "hshift_sign" + }, + { + "text": "$y < 1$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "כמה נקודות חיתוך עם ציר $x$ יש לגרף של $f(x) = (x − 1)² + 2$?", + "choices": [ + { + "text": "אין נקודות חיתוך", + "correct": true + }, + { + "text": "שתי נקודות", + "mistake": "vertex_side" + }, + { + "text": "נקודה אחת", + "mistake": "vertex_side" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $f(x) = (x + 4)² − 1$ עם ציר $x$?", + "choices": [ + { + "text": "$(−3, 0)$ ו־$(−5, 0)$", + "correct": true + }, + { + "text": "$(3, 0)$ ו־$(5, 0)$", + "mistake": "hshift_sign" + }, + { + "text": "$(−3, 0)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(−4, −1)$", + "mistake": "vertex_as_root" + } + ] + }, + { + "question": "לאיזו מהפרבולות הקודקוד $(−2, 5)$ והיא פתוחה כלפי מטה?", + "choices": [ + { + "text": "$f(x) = −(x + 2)² + 5$", + "correct": true + }, + { + "text": "$f(x) = (x + 2)² + 5$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = −(x − 2)² + 5$", + "mistake": "hshift_sign" + }, + { + "text": "$f(x) = −(x + 5)² − 2$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "נתונה $f(x) = 3(x − 1)² − 12$. באיזה תחום הפונקציה שלילית?", + "choices": [ + { + "text": "$−1 < x < 3$", + "correct": true + }, + { + "text": "$x < −1$ או $x > 3$", + "mistake": "pos_neg_swap" + }, + { + "text": "$1 < x < 3$", + "mistake": "missing_neg_root" + }, + { + "text": "$−12 < y < 0$", + "mistake": "x_vs_y_interval" + } + ] + } + ] + }, + { + "id": "q_fform", + "unit": "q2", + "name": "הצגה כמכפלה $a(x − x₁)(x − x₂)$", + "short": "הצגה כמכפלה", + "prereqs": [ + "q_parabola" + ], + "description": "$a(x − x₁)(x − x₂)$: נקודות החיתוך עם ציר $x$ הן $x₁$ ו־$x₂$, וציר הסימטריה באמצע ביניהן.", + "month": "נובמבר", + "questions": [ + { + "question": "מהן נקודות החיתוך של $f(x) = 2(x − 1)(x + 3)$ עם ציר $x$?", + "choices": [ + { + "text": "$(1, 0)$ ו־$(−3, 0)$", + "correct": true + }, + { + "text": "$(−1, 0)$ ו־$(3, 0)$", + "mistake": "zero_root_sign" + }, + { + "text": "$(2, 0)$, $(1, 0)$ ו־$(−3, 0)$", + "mistake": "a_as_zero" + }, + { + "text": "$(0, −6)$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "מהי נקודת החיתוך של $f(x) = (x − 4)(x + 2)$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, −8)$", + "correct": true + }, + { + "text": "$(0, 8)$", + "mistake": "sign_product" + }, + { + "text": "$(4, 0)$ ו־$(−2, 0)$", + "mistake": "axes_mixed" + }, + { + "text": "$(−8, 0)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מהו ציר הסימטריה של $f(x) = −(x − 1)(x − 5)$?", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = 6$", + "mistake": "forgot_half_axis" + }, + { + "text": "$x = −3$", + "mistake": "axis_sign" + }, + { + "text": "$x = 2$", + "mistake": "axis_diff" + } + ] + }, + { + "question": "מה הקודקוד של הפרבולה $f(x) = (x − 1)(x − 5)$?", + "choices": [ + { + "text": "$(3, −4)$", + "correct": true + }, + { + "text": "$(3, 0)$", + "mistake": "forgot_y" + }, + { + "text": "$(−3, −4)$", + "mistake": "axis_sign" + }, + { + "text": "$(6, 5)$", + "mistake": "forgot_half_axis" + } + ] + }, + { + "question": "מהי נקודת הקיצון של $f(x) = −2(x + 1)(x − 3)$, ומה סוגה?", + "choices": [ + { + "text": "$(1, 8)$, מקסימום", + "correct": true + }, + { + "text": "$(1, 8)$, מינימום", + "mistake": "opening_sign" + }, + { + "text": "$(1, −8)$, מקסימום", + "mistake": "sign_product" + }, + { + "text": "$(1, 0)$, מקסימום", + "mistake": "forgot_y" + } + ] + }, + { + "question": "באיזה תחום הפונקציה $f(x) = (x + 2)(x − 4)$ שלילית?", + "choices": [ + { + "text": "$−2 < x < 4$", + "correct": true + }, + { + "text": "$x < −2$ או $x > 4$", + "mistake": "pos_neg_swap" + }, + { + "text": "$−4 < x < 2$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "איזו פונקציה חותכת את ציר $x$ בנקודות $(2, 0)$ ו־$(−7, 0)$?", + "choices": [ + { + "text": "$f(x) = (x − 2)(x + 7)$", + "correct": true + }, + { + "text": "$f(x) = (x + 2)(x − 7)$", + "mistake": "zero_root_sign" + }, + { + "text": "$f(x) = (x − 2)(x − 7)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $f(x) = 3x(x − 6)$ עם ציר $x$?", + "choices": [ + { + "text": "$(0, 0)$ ו־$(6, 0)$", + "correct": true + }, + { + "text": "$(6, 0)$ בלבד", + "mistake": "divide_by_x" + }, + { + "text": "$(3, 0)$ ו־$(6, 0)$", + "mistake": "a_as_zero" + }, + { + "text": "$(0, 0)$ ו־$(−6, 0)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "נתונה $f(x) = −(x − 2)(x − 8)$. באיזה תחום הפונקציה עולה?", + "choices": [ + { + "text": "$x < 5$", + "correct": true + }, + { + "text": "$x > 5$", + "mistake": "dir_confusion" + }, + { + "text": "$x < 10$", + "mistake": "forgot_half_axis" + }, + { + "text": "$x < −5$", + "mistake": "axis_sign" + } + ] + }, + { + "question": "מה ערך המינימום של $f(x) = 0.5(x + 4)(x − 2)$?", + "choices": [ + { + "text": "$−4.5$", + "correct": true + }, + { + "text": "$−1$", + "mistake": "x_as_value" + }, + { + "text": "$(−1, −4.5)$", + "mistake": "value_vs_point" + } + ] + } + ] + }, + { + "id": "q_sform", + "unit": "q2", + "name": "הצגה סטנדרטית $ax² + bx + c$", + "short": "הצגה סטנדרטית", + "prereqs": [ + "q_props" + ], + "description": "ב־$ax² + bx + c$: $c$ הוא החיתוך עם ציר $y$, ושיעור $x$ של הקודקוד הוא $−b : 2a$.", + "month": "נובמבר", + "questions": [ + { + "question": "מה הקודקוד של הפרבולה $f(x) = x² − 6x + 5$?", + "choices": [ + { + "text": "$(3, −4)$", + "correct": true + }, + { + "text": "$(−3, 32)$", + "mistake": "minus_b" + }, + { + "text": "$(6, 5)$", + "mistake": "forgot_2a_axis" + }, + { + "text": "$(0, 5)$", + "mistake": "c_as_vertex" + } + ] + }, + { + "question": "מהם המקדמים $a$, $b$ ו־$c$ בפונקציה $f(x) = 2x² − 3x + 7$?", + "choices": [ + { + "text": "$a = 2$, $b = −3$, $c = 7$", + "correct": true + }, + { + "text": "$a = 2$, $b = 3$, $c = 7$", + "mistake": "coef_sign" + }, + { + "text": "$a = 7$, $b = −3$, $c = 2$", + "mistake": "abc_order" + } + ] + }, + { + "question": "מהי נקודת החיתוך של $f(x) = −x² + 4x − 1$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, −1)$", + "correct": true + }, + { + "text": "$(−1, 0)$", + "mistake": "swapped_pair" + }, + { + "text": "$(0, 4)$", + "mistake": "abc_order" + } + ] + }, + { + "question": "מהו ציר הסימטריה של $f(x) = 2x² + 8x − 3$?", + "choices": [ + { + "text": "$x = −2$", + "correct": true + }, + { + "text": "$x = 2$", + "mistake": "minus_b" + }, + { + "text": "$x = −8$", + "mistake": "forgot_2a_axis" + }, + { + "text": "$x = −4$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "מה הקודקוד של הפרבולה $f(x) = −x² + 2x + 3$?", + "choices": [ + { + "text": "$(1, 4)$", + "correct": true + }, + { + "text": "$(−1, 0)$", + "mistake": "minus_b" + }, + { + "text": "$(1, 0)$", + "mistake": "forgot_y" + }, + { + "text": "$(0, 3)$", + "mistake": "c_as_vertex" + } + ] + }, + { + "question": "איזו נקודת קיצון יש לפונקציה $f(x) = −3x² + x + 5$?", + "choices": [ + { + "text": "נקודת מקסימום", + "correct": true + }, + { + "text": "נקודת מינימום", + "mistake": "opening_sign" + }, + { + "text": "אין לה נקודת קיצון", + "mistake": "no_extremum_parabola" + } + ] + }, + { + "question": "מה ערך המינימום של $f(x) = x² + 4x + 7$?", + "choices": [ + { + "text": "$3$", + "correct": true + }, + { + "text": "$−2$", + "mistake": "x_as_value" + }, + { + "text": "$7$", + "mistake": "c_as_vertex" + }, + { + "text": "$19$", + "mistake": "minus_b" + } + ] + }, + { + "question": "באיזה תחום הפונקציה $f(x) = x² − 8x + 1$ יורדת?", + "choices": [ + { + "text": "$x < 4$", + "correct": true + }, + { + "text": "$x > 4$", + "mistake": "dir_confusion" + }, + { + "text": "$x < −4$", + "mistake": "minus_b" + }, + { + "text": "$x < 8$", + "mistake": "forgot_2a_axis" + } + ] + }, + { + "question": "איזו מהנקודות נמצאת על הגרף של $f(x) = 3x² − x − 2$?", + "choices": [ + { + "text": "$(1, 0)$", + "correct": true + }, + { + "text": "$(0, 3)$", + "mistake": "abc_order" + }, + { + "text": "$(−1, 0)$", + "mistake": "lost_sign_move" + } + ] + }, + { + "question": "מה הקודקוד של הפרבולה $f(x) = 2x² − 4x + 5$?", + "choices": [ + { + "text": "$(1, 3)$", + "correct": true + }, + { + "text": "$(−1, 11)$", + "mistake": "minus_b" + }, + { + "text": "$(4, 21)$", + "mistake": "forgot_2a_axis" + }, + { + "text": "$(2, 5)$", + "mistake": "forgot_2a" + } + ] + } + ] + }, + { + "id": "q_formula", + "unit": "q2", + "name": "פתרון משוואות ריבועיות בנוסחת השורשים", + "short": "נוסחת השורשים", + "prereqs": [ + "t_quad_eq" + ], + "description": "את $ax² + bx + c = 0$ פותרים בנוסחה $x = (−b ± √(b² − 4ac)) : 2a$. סימן $b² − 4ac$ קובע כמה פתרונות יש.", + "month": "נובמבר", + "questions": [ + { + "question": "פתרו: $2x² − 3x − 2 = 0$", + "choices": [ + { + "text": "$x = 2$ או $x = −0.5$", + "correct": true + }, + { + "text": "$x = −2$ או $x = 0.5$", + "mistake": "minus_b" + }, + { + "text": "$x = 4$ או $x = −1$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "פתרו: $x² + 4x − 5 = 0$", + "choices": [ + { + "text": "$x = 1$ או $x = −5$", + "correct": true + }, + { + "text": "$x = −1$ או $x = 5$", + "mistake": "minus_b" + }, + { + "text": "$x = 2$ או $x = −10$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "פתרו: $3x² − 5x + 2 = 0$", + "choices": [ + { + "text": "$x = 1$ או $x = 2/3$", + "correct": true + }, + { + "text": "$x = −1$ או $x = −2/3$", + "mistake": "minus_b" + }, + { + "text": "$x = 3$ או $x = 2$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "פתרו: $x² − 2x − 1 = 0$", + "choices": [ + { + "text": "$x = 1 + √2$ או $x = 1 − √2$", + "correct": true + }, + { + "text": "$x = −1 + √2$ או $x = −1 − √2$", + "mistake": "minus_b" + }, + { + "text": "$x = 1$", + "mistake": "disc_sign" + } + ] + }, + { + "question": "פתרו: $x² + 6x + 9 = 0$", + "choices": [ + { + "text": "$x = −3$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "minus_b" + }, + { + "text": "אין פתרון", + "mistake": "disc_meaning" + } + ] + }, + { + "question": "פתרו: $x² + x + 1 = 0$", + "choices": [ + { + "text": "אין פתרון", + "correct": true + }, + { + "text": "$x = −1$ או $x = 0$", + "mistake": "disc_sign" + }, + { + "text": "$x = −0.5$", + "mistake": "disc_meaning" + } + ] + }, + { + "question": "פתרו: $2x² + x − 6 = 0$", + "choices": [ + { + "text": "$x = 1.5$ או $x = −2$", + "correct": true + }, + { + "text": "$x = −1.5$ או $x = 2$", + "mistake": "minus_b" + }, + { + "text": "$x = 3$ או $x = −4$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "פתרו: $−x² + 4x + 5 = 0$", + "choices": [ + { + "text": "$x = −1$ או $x = 5$", + "correct": true + }, + { + "text": "$x = 1$ או $x = −5$", + "mistake": "minus_b" + }, + { + "text": "$x = 2$ או $x = −10$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "כמה פתרונות יש למשוואה $x² − 4x + 4 = 0$?", + "choices": [ + { + "text": "פתרון אחד", + "correct": true + }, + { + "text": "שני פתרונות", + "mistake": "disc_meaning" + }, + { + "text": "אין פתרון", + "mistake": "disc_meaning" + } + ] + }, + { + "question": "מה ערך $b² − 4ac$ במשוואה $2x² + 3x − 2 = 0$?", + "choices": [ + { + "text": "$25$", + "correct": true + }, + { + "text": "$−7$", + "mistake": "disc_sign" + }, + { + "text": "$1$", + "mistake": "disc_sign" + } + ] + } + ] + }, + { + "id": "q_sketch", + "unit": "q2", + "name": "סרטוט פרבולה מהצגה סטנדרטית", + "short": "סרטוט פרבולה", + "prereqs": [ + "q_sform" + ], + "description": "כיוון הפתיחה, הקודקוד, החיתוך עם ציר $y$ והחיתוכים עם ציר $x$ מספיקים לסרטוט הגרף.", + "month": "נובמבר", + "questions": [ + { + "question": "איזה תיאור מתאים לגרף של $f(x) = −x² + 2x + 3$?", + "choices": [ + { + "text": "פתוחה כלפי מטה, קודקוד $(1, 4)$, חותכת את ציר $x$ ב־$−1$ וב־$3$", + "correct": true + }, + { + "text": "פתוחה כלפי מעלה, קודקוד $(1, 4)$, חותכת את ציר $x$ ב־$−1$ וב־$3$", + "mistake": "opening_sign" + }, + { + "text": "פתוחה כלפי מטה, קודקוד $(1, 4)$, חותכת את ציר $x$ ב־$1$ וב־$−3$", + "mistake": "zero_root_sign" + }, + { + "text": "פתוחה כלפי מטה, קודקוד $(−1, 0)$, חותכת את ציר $x$ ב־$−1$ וב־$3$", + "mistake": "minus_b" + } + ] + }, + { + "question": "איזו פונקציה מתאימה לגרף?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$f(x) = x² − 2x − 3$", + "correct": true + }, + { + "text": "$f(x) = −x² + 2x + 3$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = x² + 2x − 3$", + "mistake": "minus_b" + }, + { + "text": "$f(x) = x² − 2x + 3$", + "mistake": "c_as_vertex" + } + ] + }, + { + "question": "איזה תיאור מתאים לגרף של $f(x) = x² − 4x + 3$?", + "choices": [ + { + "text": "פתוחה כלפי מעלה, קודקוד $(2, −1)$, חותכת את ציר $x$ ב־$1$ וב־$3$", + "correct": true + }, + { + "text": "פתוחה כלפי מטה, קודקוד $(2, −1)$, חותכת את ציר $x$ ב־$1$ וב־$3$", + "mistake": "opening_sign" + }, + { + "text": "פתוחה כלפי מעלה, קודקוד $(−2, 15)$, חותכת את ציר $x$ ב־$1$ וב־$3$", + "mistake": "minus_b" + }, + { + "text": "פתוחה כלפי מעלה, קודקוד $(2, −1)$, חותכת את ציר $x$ ב־$−1$ וב־$−3$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "באיזה רביע נמצא הקודקוד של $f(x) = x² + 6x + 5$?", + "choices": [ + { + "text": "ברביע השלישי", + "correct": true + }, + { + "text": "ברביע הראשון", + "mistake": "minus_b" + }, + { + "text": "על ציר $y$", + "mistake": "c_as_vertex" + } + ] + }, + { + "question": "איזו פונקציה מתאימה לגרף?", + "graph": { + "points": [ + [ + 0, + -3 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ], + [ + 3, + 0 + ], + [ + 4, + -3 + ] + ], + "x": [ + -0.5, + 4.5 + ], + "y": [ + -3.5, + 1.5 + ] + }, + "choices": [ + { + "text": "$f(x) = −x² + 4x − 3$", + "correct": true + }, + { + "text": "$f(x) = x² − 4x + 3$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = −x² − 4x − 3$", + "mistake": "minus_b" + }, + { + "text": "$f(x) = −x² + 4x + 3$", + "mistake": "c_as_vertex" + } + ] + }, + { + "question": "כמה נקודות חיתוך עם ציר $x$ יש לגרף של $f(x) = x² − 2x + 5$?", + "choices": [ + { + "text": "אין נקודות חיתוך", + "correct": true + }, + { + "text": "שתי נקודות", + "mistake": "vertex_side" + }, + { + "text": "נקודה אחת", + "mistake": "vertex_side" + } + ] + }, + { + "question": "איזה תיאור מתאים לגרף של $f(x) = −2x² + 8x$?", + "choices": [ + { + "text": "פתוחה כלפי מטה, קודקוד $(2, 8)$, חותכת את ציר $x$ ב־$0$ וב־$4$", + "correct": true + }, + { + "text": "פתוחה כלפי מעלה, קודקוד $(2, 8)$, חותכת את ציר $x$ ב־$0$ וב־$4$", + "mistake": "opening_sign" + }, + { + "text": "פתוחה כלפי מטה, קודקוד $(−2, −24)$, חותכת את ציר $x$ ב־$0$ וב־$4$", + "mistake": "minus_b" + }, + { + "text": "פתוחה כלפי מטה, קודקוד $(2, 8)$, חותכת את ציר $x$ ב־$0$ וב־$−4$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "איזו פונקציה מתאימה לגרף?", + "graph": { + "points": [ + [ + -4, + 5 + ], + [ + -3, + 0 + ], + [ + -2, + -3 + ], + [ + -1, + -4 + ], + [ + 0, + -3 + ], + [ + 1, + 0 + ], + [ + 2, + 5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$f(x) = x² + 2x − 3$", + "correct": true + }, + { + "text": "$f(x) = x² − 2x − 3$", + "mistake": "minus_b" + }, + { + "text": "$f(x) = −x² − 2x + 3$", + "mistake": "opening_sign" + }, + { + "text": "$f(x) = x² + 2x + 3$", + "mistake": "c_as_vertex" + } + ] + }, + { + "question": "איזה תיאור מתאים לגרף של $f(x) = x² − 4$?", + "choices": [ + { + "text": "פתוחה כלפי מעלה, קודקוד $(0, −4)$, חותכת את ציר $x$ ב־$−2$ וב־$2$", + "correct": true + }, + { + "text": "פתוחה כלפי מעלה, קודקוד $(0, −4)$, חותכת את ציר $x$ ב־$2$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "פתוחה כלפי מעלה, קודקוד $(4, 0)$, חותכת את ציר $x$ ב־$−2$ וב־$2$", + "mistake": "vshift_as_h" + }, + { + "text": "פתוחה כלפי מטה, קודקוד $(0, −4)$, חותכת את ציר $x$ ב־$−2$ וב־$2$", + "mistake": "opening_sign" + } + ] + }, + { + "question": "באיזה תחום הגרף של $f(x) = −x² − 2x + 8$ נמצא מעל ציר $x$?", + "choices": [ + { + "text": "$−4 < x < 2$", + "correct": true + }, + { + "text": "$x < −4$ או $x > 2$", + "mistake": "pos_neg_swap" + }, + { + "text": "$−2 < x < 4$", + "mistake": "zero_root_sign" + } + ] + } + ] + }, + { + "id": "a_side_angle", + "unit": "a", + "name": "מול הצלע הגדולה הזווית הגדולה", + "short": "צלע ← זווית", + "prereqs": [], + "description": "אם במשולש שתי צלעות שונות, מול הצלע הגדולה מביניהן נמצאת הזווית הגדולה.", + "month": "נובמבר", + "questions": [ + { + "question": "במשולש $ABC$: $AB = 5$, $BC = 7$, $AC = 9$. איזו זווית היא הגדולה ביותר?", + "figure": "A=-0.5,4.97; B=0,0; C=7,0; poly A B C; len B C 7; len A C 9; len A B 5", + "choices": [ + { + "text": "$∢B$", + "correct": true + }, + { + "text": "$∢A$", + "mistake": "opposite_angle" + }, + { + "text": "$∢C$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = 5$, $BC = 7$, $AC = 9$. איזו זווית היא הקטנה ביותר?", + "figure": "A=-0.5,4.97; B=0,0; C=7,0; poly A B C; len B C 7; len A C 9; len A B 5", + "choices": [ + { + "text": "$∢C$", + "correct": true + }, + { + "text": "$∢B$", + "mistake": "reversed_order" + }, + { + "text": "$∢A$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = 8$, $BC = 6$, $AC = 10$. מה סדר הזוויות מהקטנה לגדולה?", + "figure": "A=0,8; B=0,0; C=6,0; poly A B C; len B C 6; len A C 10; len A B 8", + "choices": [ + { + "text": "$∢A < ∢C < ∢B$", + "correct": true + }, + { + "text": "$∢B < ∢C < ∢A$", + "mistake": "reversed_order" + }, + { + "text": "$∢C < ∢A < ∢B$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = AC = 7$, $BC = 10$. איזו זווית היא הגדולה ביותר?", + "figure": "A=5,4.9; B=0,0; C=10,0; poly A B C; len B C 10; len A C 7; len A B 7", + "choices": [ + { + "text": "$∢A$", + "correct": true + }, + { + "text": "$∢B$", + "mistake": "opposite_angle" + }, + { + "text": "כל הזוויות שוות", + "mistake": "side_angle_rule" + } + ] + }, + { + "question": "מהי הצלע הגדולה ביותר במשולש ישר זווית, ולמה?", + "figure": "_A=6,0; _B=0,4.2; _C=0,0; poly _A _B _C; right _A _C _B", + "choices": [ + { + "text": "היתר, כי הוא מול הזווית הישרה", + "correct": true + }, + { + "text": "אחד הניצבים, כי הוא צמוד לזווית הישרה", + "mistake": "side_angle_rule" + }, + { + "text": "אי אפשר לדעת בלי אורכים", + "mistake": "side_angle_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = 4$, $BC = 4$, $AC = 6$. איזו טענה נכונה?", + "figure": "A=-0.5,3.97; B=0,0; C=4,0; poly A B C; len B C 4; len A C 6; len A B 4", + "choices": [ + { + "text": "$∢B$ היא הזווית הגדולה ביותר", + "correct": true + }, + { + "text": "$∢A = ∢B$", + "mistake": "opposite_angle" + }, + { + "text": "$∢C$ היא הזווית הגדולה ביותר", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $PQR$: $PQ = 12$, $QR = 9$, $PR = 15$. מול איזו צלע נמצאת הזווית הקטנה ביותר?", + "figure": "P=0,12; Q=0,0; R=9,0; poly P Q R; len Q R 9; len P R 15; len P Q 12", + "choices": [ + { + "text": "מול $QR$, זו $∢P$", + "correct": true + }, + { + "text": "מול $PR$, זו $∢Q$", + "mistake": "reversed_order" + }, + { + "text": "מול $QR$, זו $∢R$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AC > BC$. מה אפשר להסיק?", + "figure": "A=1.2,5.88; B=0,0; C=5,0; poly A B C; note AC > BC", + "choices": [ + { + "text": "$∢B > ∢A$", + "correct": true + }, + { + "text": "$∢A > ∢B$", + "mistake": "opposite_angle" + }, + { + "text": "$∢C > ∢A$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $KLM$: $KL = 6$, $LM = 11$, $KM = 8$. מה סדר הזוויות מהגדולה לקטנה?", + "figure": "K=4.23,4.26; L=0,0; M=11,0; poly K L M; len L M 11; len K M 8; len K L 6", + "choices": [ + { + "text": "$∢K > ∢L > ∢M$", + "correct": true + }, + { + "text": "$∢M > ∢L > ∢K$", + "mistake": "reversed_order" + }, + { + "text": "$∢L > ∢K > ∢M$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = 5$, $BC = 5$, $AC = 5$. מה נכון?", + "figure": "A=2.5,4.33; B=0,0; C=5,0; poly A B C; len B C 5; len A C 5; len A B 5", + "choices": [ + { + "text": "כל הזוויות שוות", + "correct": true + }, + { + "text": "$∢B$ היא הזווית הגדולה ביותר", + "mistake": "side_angle_rule" + }, + { + "text": "אי אפשר לדעת", + "mistake": "side_angle_rule" + } + ] + } + ] + }, + { + "id": "a_angle_side", + "unit": "a", + "name": "מול הזווית הגדולה הצלע הגדולה", + "short": "זווית ← צלע", + "prereqs": [ + "a_side_angle" + ], + "description": "אם במשולש שתי זוויות שונות, מול הזווית הגדולה מביניהן נמצאת הצלע הגדולה.", + "month": "נובמבר", + "questions": [ + { + "question": "במשולש $ABC$: $∢A = 50°$, $∢B = 60°$, $∢C = 70°$. איזו צלע היא הגדולה ביותר?", + "figure": "A=3.68,6.37; B=0,0; C=6,0; poly A B C; ang B A C 50°; ang C B A 60°; ang A C B 70°", + "choices": [ + { + "text": "$AB$", + "correct": true + }, + { + "text": "$BC$", + "mistake": "opposite_angle" + }, + { + "text": "$AC$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 100°$, $∢B = 30°$. איזו צלע היא הקטנה ביותר?", + "figure": "A=4.04,2.33; B=0,0; C=6,0; poly A B C; ang B A C 100°; ang C B A 30°", + "choices": [ + { + "text": "$AC$", + "correct": true + }, + { + "text": "$BC$", + "mistake": "reversed_order" + }, + { + "text": "$AB$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $∢A = ∢B = 45°$. איזו צלע היא הגדולה ביותר?", + "figure": "A=6,0; B=0,6; C=0,0; poly A B C; right A C B; ang C A B 45°; ang A B C 45°", + "choices": [ + { + "text": "$AB$", + "correct": true + }, + { + "text": "$AC$", + "mistake": "opposite_angle" + }, + { + "text": "כל הצלעות שוות", + "mistake": "side_angle_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 40°$, $∢B = 70°$. איזו צלע היא הקטנה ביותר?", + "figure": "A=3,8.24; B=0,0; C=6,0; poly A B C; ang B A C 40°; ang C B A 70°", + "choices": [ + { + "text": "$BC$", + "correct": true + }, + { + "text": "$AB$", + "mistake": "reversed_order" + }, + { + "text": "$AC$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 80°$, $∢B = 60°$, $∢C = 40°$. מה סדר הצלעות מהגדולה לקטנה?", + "figure": "A=1.96,3.39; B=0,0; C=6,0; poly A B C; ang B A C 80°; ang C B A 60°; ang A C B 40°", + "choices": [ + { + "text": "$BC > AC > AB$", + "correct": true + }, + { + "text": "$AB > AC > BC$", + "mistake": "reversed_order" + }, + { + "text": "$AC > BC > AB$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$, $∢B$ זווית קהה. איזו צלע היא הגדולה ביותר?", + "figure": "B=3.29,1.9; C=0,0; A=6,0; poly B C A; ang C B A; note ∢B > 90°", + "choices": [ + { + "text": "$AC$", + "correct": true + }, + { + "text": "$AB$", + "mistake": "opposite_angle" + }, + { + "text": "אי אפשר לדעת", + "mistake": "side_angle_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 65°$, $∢B = 50°$. האם $BC > AC$?", + "figure": "A=3.86,4.6; B=0,0; C=6,0; poly A B C; ang B A C 65°; ang C B A 50°", + "choices": [ + { + "text": "כן, כי $∢A > ∢B$", + "correct": true + }, + { + "text": "לא, כי $∢A > ∢B$", + "mistake": "reversed_order" + }, + { + "text": "אי אפשר לדעת", + "mistake": "side_angle_rule" + } + ] + }, + { + "question": "במשולש $DEF$: $∢D = 35°$, $∢E = 110°$. איזו צלע היא הגדולה ביותר?", + "figure": "E=3,2.1; D=0,0; F=6,0; poly E D F; ang F D E 35°; ang D E F 110°", + "choices": [ + { + "text": "$DF$", + "correct": true + }, + { + "text": "$EF$", + "mistake": "opposite_angle" + }, + { + "text": "$DE$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 2x$, $∢B = 3x$, $∢C = 4x$. איזו צלע היא הקטנה ביותר?", + "figure": "A=4.6,7.96; B=0,0; C=6,0; poly A B C; ang B A C 2x; ang C B A 3x; ang A C B 4x", + "choices": [ + { + "text": "$BC$", + "correct": true + }, + { + "text": "$AB$", + "mistake": "reversed_order" + }, + { + "text": "$AC$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $ABC$: $∢A = 30°$, $∢B = 75°$. איזו טענה נכונה?", + "figure": "A=3,11.2; B=0,0; C=6,0; poly A B C; ang B A C 30°; ang C B A 75°", + "choices": [ + { + "text": "$AB = AC$", + "correct": true + }, + { + "text": "$AB = BC$", + "mistake": "opposite_angle" + }, + { + "text": "$BC$ היא הצלע הגדולה ביותר", + "mistake": "reversed_order" + } + ] + } + ] + }, + { + "id": "l_30_side", + "unit": "l", + "name": "המשפט: ניצב מול זווית של $30°$", + "short": "ניצב מול $30°$", + "prereqs": [], + "description": "במשולש ישר זווית שאחת מזוויותיו $30°$, הניצב שמול זווית זו שווה למחצית היתר.", + "month": "נובמבר", + "questions": [ + { + "question": "במשולש ישר זווית אחת הזוויות $30°$ והיתר $14$ ס״מ. מה אורך הניצב שמול הזווית של $30°$?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; ang _C _A _B 30°; len _A _B 14; len _B _C ?", + "choices": [ + { + "text": "$7$ ס״מ", + "correct": true + }, + { + "text": "$28$ ס״מ", + "mistake": "half_double" + }, + { + "text": "$14$ ס״מ", + "mistake": "half_double" + } + ] + }, + { + "question": "במשולש ישר זווית אחת הזוויות $30°$ והיתר $9$ ס״מ. מה אורך הניצב שמול הזווית של $30°$?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; ang _C _A _B 30°; len _A _B 9; len _B _C ?", + "choices": [ + { + "text": "$4.5$ ס״מ", + "correct": true + }, + { + "text": "$18$ ס״מ", + "mistake": "half_double" + }, + { + "text": "$3$ ס״מ", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש ישר זווית הניצב שמול זווית של $30°$ הוא $6$ ס״מ. מה אורך היתר?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; ang _C _A _B 30°; len _B _C 6; len _A _B ?", + "choices": [ + { + "text": "$12$ ס״מ", + "correct": true + }, + { + "text": "$3$ ס״מ", + "mistake": "half_double" + }, + { + "text": "$6$ ס״מ", + "mistake": "half_double" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $∢A = 30°$, $AB = 20$. מה $BC$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; ang C A B 30°; len A B 20; len B C ?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$40$", + "mistake": "half_double" + }, + { + "text": "אי אפשר לדעת בלי משפט פיתגורס", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $∢A = 30°$. איזו צלע שווה למחצית $AB$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; ang C A B 30°", + "choices": [ + { + "text": "$BC$", + "correct": true + }, + { + "text": "$AC$", + "mistake": "opposite_angle" + }, + { + "text": "אף צלע", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $∢B = 60°$, $AB = 16$. מה $BC$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; ang A B C 60°; len A B 16; len B C ?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$32$", + "mistake": "half_double" + }, + { + "text": "אי אפשר לדעת", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢B = 90°$, $∢C = 30°$, $AB = 5$. מה $AC$?", + "figure": "C=6,0; A=0,3.46; B=0,0; poly C A B; right C B A; ang B C A 30°; len A B 5; len A C ?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$2.5$", + "mistake": "half_double" + }, + { + "text": "$5$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש ישר זווית אחת הזוויות $60°$ והיתר $22$. מה אורך הניצב הקצר?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; ang _A _B _C 60°; len _A _B 22; len _B _C ?", + "choices": [ + { + "text": "$11$", + "correct": true + }, + { + "text": "$44$", + "mistake": "half_double" + }, + { + "text": "אי אפשר לדעת", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $∢A = 30°$, $BC = x + 2$, $AB = 3x$. מה $x$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; ang C A B 30°; len B C x + 2; len A B 3x", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 1$", + "mistake": "half_double" + }, + { + "text": "$x = 2/7$", + "mistake": "half_double" + } + ] + }, + { + "question": "סולם באורך $6$ מ׳ נשען על קיר ויוצר עם הקרקע זווית של $30°$. לאיזה גובה הוא מגיע?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; ang _C _A _B 30°; len _A _B 6; len _B _C ?", + "choices": [ + { + "text": "$3$ מ׳", + "correct": true + }, + { + "text": "$12$ מ׳", + "mistake": "half_double" + }, + { + "text": "$6$ מ׳", + "mistake": "a30_rule" + } + ] + } + ] + }, + { + "id": "a_30_side", + "unit": "l", + "name": "ניצב מול $30°$: פתרון מנומק בכתב יד", + "short": "פתרון בכתב יד", + "prereqs": [ + "l_30_side" + ], + "description": "במשולש ישר זווית, הניצב שמול זווית של $30°$ שווה למחצית היתר.", + "month": "נובמבר", + "sample": { + "question": "במשולש ישר זווית אחת הזוויות היא $30°$, והיתר באורך $14$ ס״מ. שרטטו את המשולש, חשבו את אורך הניצב שמול הזווית של $30°$ ונמקו על דף.", + "diagram": { + "type": "triangle", + "base": "", + "height": "?", + "side": "14 cm", + "alt": "משולש ישר זווית שהיתר שלו 14 סנטימטרים; הניצב המבוקש מול הזווית של 30 מעלות" + }, + "type": "open-ended", + "version": 1 + }, + "fallback_sample": { + "question": "במשולש ישר זווית אחת הזוויות היא $30°$, והיתר באורך $14$ ס״מ. מה אורך הניצב שמול הזווית של $30°$?", + "choices": [ + { + "text": "$7$ ס״מ", + "correct": true + }, + { + "text": "$28$ ס״מ", + "mistake": "half_double" + }, + { + "text": "אי אפשר לדעת בלי משפט פיתגורס", + "mistake": "a30_rule" + } + ], + "diagram": { + "type": "triangle", + "base": "", + "height": "?", + "side": "14 cm", + "alt": "משולש ישר זווית שהיתר שלו 14 סנטימטרים; הניצב המבוקש מול הזווית של 30 מעלות" + } + } + }, + { + "id": "l_30_converse", + "unit": "l", + "name": "המשפט ההפוך: ניצב שהוא חצי מהיתר", + "short": "משפט הפוך $30°$", + "prereqs": [ + "l_30_side" + ], + "description": "במשולש ישר זווית, אם ניצב שווה למחצית היתר, הזווית שמולו היא $30°$.", + "month": "נובמבר", + "questions": [ + { + "question": "במשולש $ABC$: $∢C = 90°$ ו־$BC = AB : 2$. מה גודל $∢A$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; ang C A B ?; note BC = AB : 2", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "opposite_angle" + }, + { + "text": "$45°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $AB = 12$, $BC = 6$. מה גודל $∢B$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; len A B 12; len B C 6; ang A B C ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$30°$", + "mistake": "opposite_angle" + }, + { + "text": "$90°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש ישר זווית הניצב $5$ והיתר $10$. מה גודל הזווית שמול הניצב הזה?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; len _B _C 5; len _A _B 10; ang _C _A _B ?", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "opposite_angle" + }, + { + "text": "$45°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $DEF$: $∢E = 90°$, $DF = 18$, $EF = 9$. מה גודל $∢F$?", + "figure": "D=6,0; F=0,3.46; E=0,0; poly D F E; right D E F; len D F 18; len F E 9; ang D F E ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$30°$", + "mistake": "opposite_angle" + }, + { + "text": "$45°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש ישר זווית הניצב $7$ והיתר $14$. מה גודלן של שתי הזוויות החדות?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; len _B _C 7; len _A _B 14; ang _C _A _B ?; ang _A _B _C ?", + "choices": [ + { + "text": "$30°$ ו־$60°$", + "correct": true + }, + { + "text": "$45°$ ו־$45°$", + "mistake": "a30_rule" + }, + { + "text": "$30°$ ו־$30°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $AC = 4$, $AB = 8$. מה גודל $∢A$?", + "figure": "A=6,0; B=0,10.39; C=0,0; poly A B C; right A C B; len A C 4; len A B 8; ang C A B ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$30°$", + "mistake": "opposite_angle" + }, + { + "text": "$45°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש ישר זווית היתר $20$ וניצב אחד $10$. האם אחת הזוויות היא $30°$?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; len _B _C 10; len _A _B 20", + "choices": [ + { + "text": "כן, הזווית שמול הניצב $10$", + "correct": true + }, + { + "text": "כן, הזווית שליד הניצב $10$", + "mistake": "opposite_angle" + }, + { + "text": "אי אפשר לדעת", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש ישר זווית היתר $10$ וניצב אחד $6$. האם אחת הזוויות היא $30°$?", + "figure": "_A=6,0; _B=0,4.5; _C=0,0; poly _A _B _C; right _A _C _B; len _B _C 6; len _A _B 10", + "choices": [ + { + "text": "לא, הניצב אינו חצי מהיתר", + "correct": true + }, + { + "text": "כן, הזווית שמול הניצב $6$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "כבל באורך $8$ מ׳ מחובר לראש עמוד שגובהו $4$ מ׳ ולקרקע. מה הזווית בין הכבל לקרקע?", + "figure": "_A=6,0; _B=0,3.46; _C=0,0; poly _A _B _C; right _A _C _B; len _B _C 4; len _A _B 8; ang _C _A _B ?", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "opposite_angle" + }, + { + "text": "$45°$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $∢C = 90°$, $BC = 3$, $AB = 6$. מה גודל $∢B$?", + "figure": "A=6,0; B=0,3.46; C=0,0; poly A B C; right A C B; len B C 3; len A B 6; ang A B C ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$30°$", + "mistake": "opposite_angle" + }, + { + "text": "$90°$", + "mistake": "a30_rule" + } + ] + } + ] + }, + { + "id": "l_equilateral", + "unit": "l", + "name": "משולש שווה צלעות והמשפט", + "short": "שווה צלעות", + "prereqs": [ + "l_30_side" + ], + "description": "גובה במשולש שווה צלעות הוא גם תיכון וחוצה זווית, ויוצר שני משולשים ישרי זווית עם זוויות $30°$, $60°$ ו־$90°$.", + "month": "נובמבר", + "questions": [ + { + "question": "במשולש שווה צלעות $ABC$ הגובה $AD$. מה גודל $∢BAD$?", + "figure": "A=3,5.2; B=0,0; C=6,0; D=3,0@s; poly A B C; tick A B 1; tick B C 1; tick A C 1; line A D; right A D C; ang B A D ?", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "eq_split" + }, + { + "text": "$90°$", + "mistake": "eq_split" + } + ] + }, + { + "question": "צלע משולש שווה צלעות $12$ ס״מ, ו־$AD$ גובה. מה $BD$?", + "figure": "A=3,5.2; B=0,0; C=6,0; D=3,0@s; poly A B C; tick A B 1; tick B C 1; tick A C 1; line A D; right A D C; len A B 12; len B D ?", + "choices": [ + { + "text": "$6$ ס״מ", + "correct": true + }, + { + "text": "$12$ ס״מ", + "mistake": "eq_split" + }, + { + "text": "$24$ ס״מ", + "mistake": "half_double" + } + ] + }, + { + "question": "במשולש שווה צלעות $ABC$ הגובה $AD$. מה הזוויות של המשולש $ABD$?", + "figure": "A=3,5.2; B=0,0; C=6,0; D=3,0@s; poly A B C; tick A B 1; tick B C 1; tick A C 1; line A D; right A D C", + "choices": [ + { + "text": "$30°$, $60°$, $90°$", + "correct": true + }, + { + "text": "$60°$, $60°$, $60°$", + "mistake": "eq_split" + }, + { + "text": "$45°$, $45°$, $90°$", + "mistake": "eq_split" + } + ] + }, + { + "question": "צלע משולש שווה צלעות $2$. מה אורך הגובה?", + "figure": "A=3,5.2; B=0,0; C=6,0; _D=3,0; poly A B C; tick A B 1; tick B C 1; tick A C 1; dash A _D; right A _D C; len A B 2; lenx A _D ?", + "choices": [ + { + "text": "$√3$", + "correct": true + }, + { + "text": "$1$", + "mistake": "iso_half_base" + }, + { + "text": "$√5$", + "mistake": "pyth" + } + ] + }, + { + "question": "גובה במשולש שווה צלעות יוצר משולש ישר זווית $ABD$. אם $BD = 5$, מה אורך צלע המשולש?", + "figure": "A=3,5.2; B=0,0; C=6,0; D=3,0@s; poly A B C; tick A B 1; tick B C 1; tick A C 1; line A D; right A D C; len B D 5; len A B ?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$2.5$", + "mistake": "half_double" + }, + { + "text": "$5$", + "mistake": "eq_split" + } + ] + }, + { + "question": "במשולש שווה צלעות $ABC$, $AD$ חוצה את $∢A$. מה גודל $∢ADB$?", + "figure": "A=3,5.2; B=0,0; C=6,0; D=3,0@s; poly A B C; tick A B 1; tick B C 1; tick A C 1; line A D; ang B A D; ang D A C; ang A D B ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "eq_split" + }, + { + "text": "$30°$", + "mistake": "eq_split" + } + ] + }, + { + "question": "היקף משולש שווה צלעות $36$ ס״מ. מה המרחק מקודקוד $B$ לנקודה שבה הגובה מ־$A$ פוגש את $BC$?", + "figure": "A=3,5.2; B=0,0; C=6,0; _D=3,0; poly A B C; tick A B 1; tick B C 1; tick A C 1; dash A _D; right A _D C; len B _D ?", + "choices": [ + { + "text": "$6$ ס״מ", + "correct": true + }, + { + "text": "$12$ ס״מ", + "mistake": "eq_split" + }, + { + "text": "$18$ ס״מ", + "mistake": "half_double" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = AC$, $∢A = 120°$, $AD$ גובה לבסיס ו־$AB = 10$. מה $AD$?", + "figure": "A=0,1.5; B=-2.6,0; C=2.6,0; D=0,0@s; poly A B C; tick A B 1; tick A C 1; line A D; right A D C; ang B A C; len A B 10; note ∢A = 120°; lenx A D ?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "half_double" + }, + { + "text": "אי אפשר לדעת", + "mistake": "a30_rule" + } + ] + }, + { + "question": "במשולש $ABC$: $AB = AC = 8$ ו־$∢B = 30°$. מה אורך הגובה מ־$A$ לבסיס?", + "figure": "A=0,1.5; B=-2.6,0; C=2.6,0; _D=0,0; poly A B C; tick A B 1; tick A C 1; dash A _D; right A _D C; len A B 8; ang C B A 30°; lenx A _D ?", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$16$", + "mistake": "half_double" + }, + { + "text": "$8$", + "mistake": "a30_rule" + } + ] + }, + { + "question": "צלע משולש שווה צלעות $6$. מה אורך הגובה?", + "figure": "A=3,5.2; B=0,0; C=6,0; _D=3,0; poly A B C; tick A B 1; tick B C 1; tick A C 1; dash A _D; right A _D C; len A B 6; lenx A _D ?", + "choices": [ + { + "text": "$√27$", + "correct": true + }, + { + "text": "$3$", + "mistake": "iso_half_base" + }, + { + "text": "$√45$", + "mistake": "pyth" + } + ] + } + ] + }, + { + "id": "z_parallel", + "unit": "z", + "name": "זוויות בין ישרים מקבילים", + "short": "ישרים מקבילים", + "prereqs": [], + "description": "כשחותך חוצה שני ישרים מקבילים, זוויות מתאימות ומתחלפות שוות, וזוויות חד־צדדיות משלימות ל־$180°$.", + "month": "נובמבר", + "questions": [ + { + "question": "הישרים $a$ ו־$b$ מקבילים, ו־$∢1 = 70°$. מה גודל הזווית המתחלפת ל־$∢1$?", + "figure": "_T=0,2; _S=0.73,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.44,3.22; _D=1.17,-1.22; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 1; note ∢1 = 70°", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$110°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$20°$", + "mistake": "complement90" + } + ] + }, + { + "question": "הישרים $a$ ו־$b$ מקבילים, ו־$∢1 = 125°$. מה גודל הזווית המתאימה ל־$∢1$?", + "figure": "_T=0,2; _S=-1.4,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.75,3.06; _D=-2.15,-1.06; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 1; note ∢1 = 125°", + "choices": [ + { + "text": "$125°$", + "correct": true + }, + { + "text": "$55°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$35°$", + "mistake": "complement90" + } + ] + }, + { + "question": "הישרים $a$ ו־$b$ מקבילים, ו־$∢1 = 65°$. מה גודל הזווית החד־צדדית ל־$∢1$?", + "figure": "_T=0,2; _S=0.93,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.55,3.18; _D=1.48,-1.18; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 1; note ∢1 = 65°", + "choices": [ + { + "text": "$115°$", + "correct": true + }, + { + "text": "$65°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$25°$", + "mistake": "complement90" + } + ] + }, + { + "question": "$a ∥ b$, ושתי זוויות מתאימות הן $3x + 10$ ו־$2x + 40$. מה $x$?", + "figure": "_T=0,2; _S=-0.73,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.44,3.22; _D=-1.17,-1.22; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _aR _T _U 3x + 10; ang _bR _S _T 2x + 40", + "choices": [ + { + "text": "$x = 30$", + "correct": true + }, + { + "text": "$x = 26$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$x = 10$", + "mistake": "move_sign" + } + ] + }, + { + "question": "$a ∥ b$, ושתי זוויות חד־צדדיות הן $2x$ ו־$x + 30$. מה $x$?", + "figure": "_T=0,2; _S=-0.35,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.23,3.28; _D=-0.58,-1.28; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 2x; ang _bR _S _T x + 30", + "choices": [ + { + "text": "$x = 50$", + "correct": true + }, + { + "text": "$x = 30$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$x = 20$", + "mistake": "complement90" + } + ] + }, + { + "question": "$a ∥ b$, ושתי זוויות מתחלפות הן $4x − 20$ ו־$2x + 30$. מה $x$?", + "figure": "_T=0,2; _S=0.35,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.23,3.28; _D=0.58,-1.28; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 4x − 20; ang _T _S _bL 2x + 30", + "choices": [ + { + "text": "$x = 25$", + "correct": true + }, + { + "text": "$x = 5$", + "mistake": "move_sign" + }, + { + "text": "$x = 85/3$", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "$a ∥ b$, ו־$∢1 = 48°$. מה גודל הזווית הצמודה לזווית המתחלפת ל־$∢1$?", + "figure": "_T=0,2; _S=1.8,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.87,2.97; _D=2.67,-0.97; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 1; note ∢1 = 48°", + "choices": [ + { + "text": "$132°$", + "correct": true + }, + { + "text": "$48°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$42°$", + "mistake": "complement90" + } + ] + }, + { + "question": "$a ∥ b$, והחותך מאונך לישר $a$. מה הזווית בין החותך לישר $b$?", + "figure": "_T=0,2; _S=0,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0,3.3; _D=0,-1.3; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; right _aR _T _U; ang _bR _S _T ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "אי אפשר לדעת", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$45°$", + "mistake": "complement90" + } + ] + }, + { + "question": "$a ∥ b$, ושתי זוויות חד־צדדיות $∢1$ ו־$∢2$ מקיימות $∢1 = 2 · ∢2$. מה גודל $∢1$?", + "figure": "_T=0,2; _S=-1.15,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.65,3.13; _D=-1.8,-1.13; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _S _T _aR 1; ang _bR _S _T 2; note ∢1 = 2 · ∢2", + "choices": [ + { + "text": "$120°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "other_quantity" + }, + { + "text": "$90°$", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "$a ∥ b$, ושתי זוויות מתאימות הן $∢1 = 5x$ ו־$∢2 = 3x + 24$. מה גודל $∢1$?", + "figure": "_T=0,2; _S=-1.15,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.65,3.13; _D=-1.8,-1.13; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; par _aL _aR 1; par _bL _bR 1; ang _aR _T _U 1; ang _bR _S _T 2; note ∢1 = 5x, ∢2 = 3x + 24", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$12°$", + "mistake": "other_quantity" + }, + { + "text": "$97.5°$", + "mistake": "alt_vs_cointerior" + } + ] + } + ] + }, + { + "id": "z_converse", + "unit": "z", + "name": "משפטים הפוכים: מתי ישרים מקבילים", + "short": "מתי מקבילים", + "prereqs": [ + "z_parallel" + ], + "description": "אם זוויות מתאימות או מתחלפות שוות, או שזוויות חד־צדדיות משלימות ל־$180°$, הישרים מקבילים.", + "month": "נובמבר", + "questions": [ + { + "question": "חותך חוצה שני ישרים, ושתי זוויות מתחלפות הן $50°$ ו־$50°$. האם הישרים מקבילים?", + "figure": "_T=0,2; _S=1.68,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.84,3; _D=2.51,-1; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _S _T _aR 50°; ang _T _S _bL 50°", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "חותך חוצה שני ישרים, ושתי זוויות חד־צדדיות הן $65°$ ו־$115°$. האם הישרים מקבילים?", + "figure": "_T=0,2; _S=0.93,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.55,3.18; _D=1.48,-1.18; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _S _T _aR 65°; ang _bR _S _T 115°", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא, הזוויות אינן שוות", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "חותך חוצה שני ישרים, ושתי זוויות מתאימות הן $70°$ ו־$75°$. האם הישרים מקבילים?", + "figure": "_T=0,2; _S=-0.73,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.44,3.22; _D=-1.17,-1.22; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _aR _T _U 70°; ang _bR _S _T 75°", + "choices": [ + { + "text": "לא", + "correct": true + }, + { + "text": "כן", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "חותך חוצה שני ישרים, ושתי זוויות חד־צדדיות הן $80°$ ו־$80°$. האם הישרים מקבילים?", + "figure": "_T=0,2; _S=0.35,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.23,3.28; _D=0.58,-1.28; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _S _T _aR 80°; ang _bR _S _T 80°", + "choices": [ + { + "text": "לא, סכומן אינו $180°$", + "correct": true + }, + { + "text": "כן, הן שוות", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "זוויות חד־צדדיות הן $2x + 10$ ו־$x + 20$. עבור איזה $x$ הישרים מקבילים?", + "figure": "_T=0,2; _S=0.73,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.44,3.22; _D=1.17,-1.22; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _S _T _aR 2x + 10; ang _bR _S _T x + 20", + "choices": [ + { + "text": "$x = 50$", + "correct": true + }, + { + "text": "$x = 10$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$x = 30$", + "mistake": "move_sign" + } + ] + }, + { + "question": "זוויות מתחלפות הן $3x$ ו־$x + 40$. עבור איזה $x$ הישרים מקבילים?", + "figure": "_T=0,2; _S=1.15,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.65,3.13; _D=1.8,-1.13; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _S _T _aR 3x; ang _T _S _bL x + 40", + "choices": [ + { + "text": "$x = 20$", + "correct": true + }, + { + "text": "$x = 35$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$x = 10$", + "mistake": "move_sign" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A = 110°$, $∢B = 70°$. אילו צלעות בהכרח מקבילות?", + "figure": "A=0,0; B=5,0; D=-1.16,3.19; C=4.11,2.44; poly A B C D; ang B A D 110°; ang C B A 70°", + "choices": [ + { + "text": "$AD ∥ BC$", + "correct": true + }, + { + "text": "$AB ∥ DC$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "אף זוג", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A = 75°$, $∢D = 105°$. אילו צלעות בהכרח מקבילות?", + "figure": "A=0,0; B=7,0; C=5.27,3; D=0.8,3; poly A B C D; ang B A D 75°; ang A D C 105°", + "choices": [ + { + "text": "$AB ∥ DC$", + "correct": true + }, + { + "text": "$AD ∥ BC$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "אף זוג", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "מה מספיק כדי ששני ישרים שחותך חוצה אותם יהיו מקבילים?", + "figure": "_T=0,2; _S=-1.06,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=0.61,3.15; _D=-1.67,-1.15; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b", + "choices": [ + { + "text": "זוויות מתחלפות שוות", + "correct": true + }, + { + "text": "זוויות מתחלפות משלימות ל־$180°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "זוויות חד־צדדיות שוות", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "חותך חוצה שני ישרים, ושתי זוויות חד־צדדיות הן $42°$ ו־$138°$. האם הישרים מקבילים?", + "figure": "_T=0,2; _S=2.22,0; _aL=-4.2,2; _aR=3.2,2; _bL=-4.2,0; _bR=3.2,0; _U=-0.97,2.87; _D=3.19,-0.87; line _aL _aR; line _bL _bR; line _U _D; text 3.55,2 a; text 3.55,0 b; ang _S _T _aR 42°; ang _bR _S _T 138°", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא, הזוויות אינן שוות", + "mistake": "parallel_converse" + } + ] + } + ] + }, + { + "id": "z_trap_def", + "unit": "z", + "name": "הכרת הטרפז", + "short": "הכרת הטרפז", + "prereqs": [ + "z_parallel" + ], + "description": "טרפז הוא מרובע שיש בו זוג אחד בדיוק של צלעות מקבילות (בסיסים). זוויות שליד אותה שוק משלימות ל־$180°$.", + "month": "נובמבר", + "questions": [ + { + "question": "איזה מרובע נקרא טרפז?", + "figure": "A=0,0; B=7,0; C=4.9,3; D=1.4,3; poly A B C D", + "choices": [ + { + "text": "מרובע שיש בו זוג אחד בדיוק של צלעות מקבילות", + "correct": true + }, + { + "text": "מרובע שיש בו שני זוגות של צלעות מקבילות", + "mistake": "trap_vs_par" + }, + { + "text": "מרובע שבו הצלעות הנגדיות שוות", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$): $∢A = 70°$. מה גודל $∢D$?", + "figure": "A=0,0; B=7,0; C=5.27,3; D=1.09,3; poly A B C D; par A B 1; par D C 1; ang B A D 70°; ang A D C ?", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$20°$", + "mistake": "complement90" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$): $∢B = 125°$. מה גודל $∢C$?", + "figure": "A=0,0; B=7,0; C=9.1,3; D=1.6,3; poly A B C D; par A B 1; par D C 1; ang C B A 125°; ang D C B ?", + "choices": [ + { + "text": "$55°$", + "correct": true + }, + { + "text": "$125°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$35°$", + "mistake": "complement90" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$): $∢A = 3 · ∢D$. מה גודל $∢A$?", + "figure": "A=0,0; B=7,0; C=5.5,2.6; D=-2.6,2.6; poly A B C D; par A B 1; par D C 1; ang B A D ?; ang A D C; note ∢A = 3 · ∢D", + "choices": [ + { + "text": "$135°$", + "correct": true + }, + { + "text": "$45°$", + "mistake": "other_quantity" + }, + { + "text": "$90°$", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$), אילו זוגות של זוויות משלימים ל־$180°$?", + "figure": "A=0,0; B=7,0; C=4.9,3; D=1.4,3; poly A B C D; par A B 1; par D C 1", + "choices": [ + { + "text": "$∢A + ∢D$ ו־$∢B + ∢C$", + "correct": true + }, + { + "text": "$∢A + ∢B$ ו־$∢C + ∢D$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "$∢A + ∢C$ ו־$∢B + ∢D$", + "mistake": "wrong_pair_parallel" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$): $∢A = 80°$, $∢B = 60°$. מה $∢C + ∢D$?", + "figure": "A=0,0; B=7,0; C=5.27,3; D=0.53,3; poly A B C D; par A B 1; par D C 1; ang B A D 80°; ang C B A 60°; ang D C B ?; ang A D C ?", + "choices": [ + { + "text": "$220°$", + "correct": true + }, + { + "text": "$140°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$180°$", + "mistake": "angle_sum_180" + } + ] + }, + { + "question": "האם יש טרפז עם שלוש זוויות ישרות?", + "figure": "A=0,0; B=7,0; C=4.9,3; D=0,3; poly A B C D; par A B 1; par D C 1; right B A D; right A D C", + "choices": [ + { + "text": "לא, אז גם הרביעית ישרה והמרובע מלבן", + "correct": true + }, + { + "text": "כן", + "mistake": "three_right" + } + ] + }, + { + "question": "בטרפז ישר זווית $ABCD$ ($AB ∥ DC$, $∢D = 90°$): $∢B = 115°$. מה גודל $∢C$?", + "figure": "A=0,0; B=5,0; C=6.4,3; D=0,3; poly A B C D; par A B 1; par D C 1; right A D C; ang C B A 115°; ang D C B ?", + "choices": [ + { + "text": "$65°$", + "correct": true + }, + { + "text": "$115°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$90°$", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "מהם הבסיסים של טרפז?", + "figure": "A=0,0; B=7,0; C=4.9,3; D=1.4,3; poly A B C D; par A B 1; par D C 1", + "choices": [ + { + "text": "הצלעות המקבילות", + "correct": true + }, + { + "text": "הצלעות שאינן מקבילות", + "mistake": "trap_vs_par" + }, + { + "text": "האלכסונים", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$): $∢CAB = 30°$. מה גודל $∢ACD$?", + "figure": "A=0,0; B=7,0; C=4.9,3; D=1.4,3; poly A B C D; par A B 1; par D C 1; line A C; ang C A B 30°; ang A C D ?", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$150°$", + "mistake": "alt_vs_cointerior" + }, + { + "text": "$60°$", + "mistake": "complement90" + } + ] + } + ] + }, + { + "id": "z_trap_iso", + "unit": "z", + "name": "טרפז שווה שוקיים", + "short": "טרפז שווה שוקיים", + "prereqs": [ + "z_trap_def" + ], + "description": "בטרפז שווה שוקיים זוויות הבסיס שוות והאלכסונים שווים.", + "month": "נובמבר", + "questions": [ + { + "question": "בטרפז שווה שוקיים $ABCD$ ($AB ∥ DC$, $AD = BC$): $∢A = 70°$. מה גודל $∢B$?", + "figure": "A=0,0; B=7,0; C=5.91,3; D=1.09,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; ang B A D 70°; ang C B A ?", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$110°$", + "mistake": "trap_iso_angles" + } + ] + }, + { + "question": "בטרפז שווה שוקיים $ABCD$ ($AB ∥ DC$, $AD = BC$): $∢A = 70°$. מה גודל $∢C$?", + "figure": "A=0,0; B=7,0; C=5.91,3; D=1.09,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; ang B A D 70°; ang D C B ?", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "trap_iso_angles" + }, + { + "text": "$20°$", + "mistake": "complement90" + } + ] + }, + { + "question": "מה נכון לגבי האלכסונים של טרפז שווה שוקיים?", + "figure": "A=0,0; B=7,0; C=5.6,3; D=1.4,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; line A C; line B D", + "choices": [ + { + "text": "הם שווים", + "correct": true + }, + { + "text": "הם חוצים זה את זה", + "mistake": "trap_iso_diag" + }, + { + "text": "הם מאונכים", + "mistake": "trap_iso_diag" + } + ] + }, + { + "question": "בטרפז שווה שוקיים $ABCD$ האלכסון $AC = 12$. מה $BD$?", + "figure": "A=0,0; B=7,0; C=5.6,3; D=1.4,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; line A C; line B D; note AC = 12", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$6$", + "mistake": "trap_iso_diag" + }, + { + "text": "אי אפשר לדעת", + "mistake": "trap_iso_diag" + } + ] + }, + { + "question": "בסיסי טרפז שווה שוקיים $10$ ו־$4$, והגובה $4$. מה אורך השוק?", + "figure": "_A=0,0; _B=10,0; _C=7,4; _D=3,4; _H=3,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H 4; len _A _B 10; len _D _C 4; len _A _D ?; tick _A _D 1; tick _B _C 1", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$4$", + "mistake": "leg_as_height" + }, + { + "text": "$6$", + "mistake": "pyth" + } + ] + }, + { + "question": "בטרפז שווה שוקיים $ABCD$ ($AB ∥ DC$): $∢D = 2 · ∢A$. מה גודל $∢C$?", + "figure": "A=0,0; B=7,0; C=5.27,3; D=1.73,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; note ∢D = 2 · ∢A; ang D C B ?", + "choices": [ + { + "text": "$120°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "trap_iso_angles" + }, + { + "text": "$90°$", + "mistake": "alt_vs_cointerior" + } + ] + }, + { + "question": "היקף טרפז שווה שוקיים $30$, ובסיסיו $8$ ו־$12$. מה אורך השוק?", + "figure": "_A=0,0; _B=12,0; _C=10,3; _D=2,3; poly _A _B _C _D; len _A _B 12; len _D _C 8; len _A _D ?; len _B _C ?; tick _A _D 1; tick _B _C 1", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "perim_all_sides" + }, + { + "text": "$2.5$", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "בסיסי טרפז שווה שוקיים $14$ ו־$6$, וזווית הבסיס הגדול $60°$. מה אורך השוק?", + "figure": "_A=0,0; _B=14,0; _C=10,6.93; _D=4,6.93; poly _A _B _C _D; len _A _B 14; len _D _C 6; len _A _D ?; ang _B _A _D 60°; tick _A _D 1; tick _B _C 1", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$4$", + "mistake": "other_quantity" + }, + { + "text": "$10$", + "mistake": "leg_as_height" + } + ] + }, + { + "question": "בטרפז שווה שוקיים $ABCD$ ($AB ∥ DC$), מה $∢A + ∢C$?", + "figure": "A=0,0; B=7,0; C=5.6,3; D=1.4,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; ang B A D; ang D C B", + "choices": [ + { + "text": "$180°$", + "correct": true + }, + { + "text": "$360°$", + "mistake": "trap_iso_angles" + }, + { + "text": "תלוי בטרפז", + "mistake": "trap_iso_angles" + } + ] + }, + { + "question": "איזו טענה נכונה בכל טרפז שווה שוקיים?", + "figure": "A=0,0; B=7,0; C=5.6,3; D=1.4,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1", + "choices": [ + { + "text": "זוויות הבסיס שוות והאלכסונים שווים", + "correct": true + }, + { + "text": "האלכסונים חוצים זה את זה", + "mistake": "trap_iso_diag" + }, + { + "text": "השוקיים מקבילות", + "mistake": "trap_vs_par" + } + ] + } + ] + }, + { + "id": "z_trap_proof", + "unit": "z2", + "name": "הוכחה שמרובע הוא טרפז", + "short": "הוכחת טרפז", + "prereqs": [ + "z_converse", + "z_trap_def" + ], + "description": "מוכיחים שזוג צלעות אחד מקביל (בעזרת משפט הפוך לישרים מקבילים) ושהזוג השני אינו מקביל.", + "month": "נובמבר", + "questions": [ + { + "question": "במרובע $ABCD$: $∢A + ∢D = 180°$, אבל $∢A + ∢B ≠ 180°$. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; note ∢A + ∢D = 180°, ∢A + ∢B ≠ 180°", + "choices": [ + { + "text": "טרפז שבו $AB ∥ DC$", + "correct": true + }, + { + "text": "טרפז שבו $AD ∥ BC$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB ∥ DC$, ו־$AD$ אינו מקביל ל־$BC$. מהו המרובע?", + "figure": "A=0,0; B=7,0; C=4.48,3; D=1.09,3; poly A B C D; par A B 1; par D C 1", + "choices": [ + { + "text": "טרפז", + "correct": true + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + }, + { + "text": "אי אפשר לדעת", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB ∥ DC$ ו־$AB = DC$. מהו המרובע?", + "figure": "A=0,0; B=6,0; C=7,3; D=1.6,3; poly A B C D; par A B 1; par D C 1; tick A B 1; tick D C 1", + "choices": [ + { + "text": "מקבילית", + "correct": true + }, + { + "text": "טרפז", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A = 70°$, $∢B = 110°$, $∢C = 80°$. מהו המרובע?", + "figure": "A=0,0; B=5,0; D=1.23,3.38; C=5.82,2.26; poly A B C D; ang B A D 70°; ang C B A 110°; ang D C B 80°", + "choices": [ + { + "text": "טרפז שבו $AD ∥ BC$", + "correct": true + }, + { + "text": "טרפז שבו $AB ∥ DC$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "במשולש $ABC$, $D$ על $AB$ ו־$E$ על $AC$, ו־$∢ADE = ∢ABC$. מהו המרובע $DBCE$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=1.39,2.67@w; E=4.08,2.67@e; poly A B C; line D E; ang A D E; ang A B C", + "choices": [ + { + "text": "טרפז", + "correct": true + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + }, + { + "text": "אי אפשר לדעת", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB ∥ DC$ ו־$AD = BC$. מה אפשר להסיק?", + "figure": "A=0,0; B=7,0; C=5.6,3; D=1.4,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1; note AB ∥ DC, AD = BC", + "choices": [ + { + "text": "המרובע טרפז שווה שוקיים או מקבילית", + "correct": true + }, + { + "text": "המרובע טרפז שווה שוקיים", + "mistake": "trap_vs_par" + }, + { + "text": "המרובע מקבילית", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A = ∢B = 90°$. אילו צלעות מקבילות?", + "figure": "A=0,0; B=5.5,0; C=5.5,2.6; D=0,4; poly A B C D; right B A D; right C B A", + "choices": [ + { + "text": "$AD ∥ BC$", + "correct": true + }, + { + "text": "$AB ∥ DC$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "אף זוג", + "mistake": "parallel_converse" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A = 65°$, $∢D = 115°$, $∢B = 70°$. מהו המרובע?", + "figure": "A=0,0; B=7,0; C=5.91,3; D=1.4,3; poly A B C D; ang B A D 65°; ang A D C 115°; ang C B A 70°", + "choices": [ + { + "text": "טרפז שבו $AB ∥ DC$", + "correct": true + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + }, + { + "text": "טרפז שבו $AD ∥ BC$", + "mistake": "wrong_pair_parallel" + } + ] + }, + { + "question": "בטרפז $ABCD$ ($AB ∥ DC$): $∢D = ∢C$. איזה טרפז זה?", + "figure": "A=0,0; B=7,0; C=5.27,3; D=1.73,3; poly A B C D; par A B 1; par D C 1; ang A D C; ang D C B", + "choices": [ + { + "text": "טרפז שווה שוקיים", + "correct": true + }, + { + "text": "טרפז ישר זווית", + "mistake": "trap_iso_angles" + }, + { + "text": "אי אפשר לדעת", + "mistake": "trap_iso_angles" + } + ] + }, + { + "question": "שני ישרים מאונכים לאותו ישר. מה היחס ביניהם?", + "figure": "_L1=-0.5,0; _L2=6,0; _P=1.5,0; _P2=1.5,3.4; _Q=4,0; _Q2=4,3.4; line _L1 _L2; line _P _P2; line _Q _Q2; right _L2 _P _P2; right _L2 _Q _Q2", + "choices": [ + { + "text": "הם מקבילים", + "correct": true + }, + { + "text": "הם מאונכים זה לזה", + "mistake": "parallel_converse" + }, + { + "text": "הם נחתכים", + "mistake": "parallel_converse" + } + ] + } + ] + }, + { + "id": "z_trap_area", + "unit": "z2", + "name": "שטח והיקף טרפז", + "short": "שטח טרפז", + "prereqs": [ + "z_trap_def" + ], + "description": "שטח טרפז: $(a + b) · h : 2$, כאשר $a$ ו־$b$ הבסיסים ו־$h$ הגובה. היקף: סכום ארבע הצלעות.", + "month": "נובמבר", + "questions": [ + { + "question": "בסיסי טרפז $10$ ו־$6$, וגובהו $4$. מה שטחו?", + "figure": "_A=0,0; _B=10,0; _C=8,4; _D=2,4; _H=2,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H 4; len _A _B 10; len _D _C 6", + "choices": [ + { + "text": "$32$", + "correct": true + }, + { + "text": "$64$", + "mistake": "forgot_half_area" + }, + { + "text": "$120$", + "mistake": "mult_all" + }, + { + "text": "$20$", + "mistake": "trap_one_base" + } + ] + }, + { + "question": "בסיסי טרפז $7$ ו־$5$, וגובהו $6$. מה שטחו?", + "figure": "_A=0,0; _B=7,0; _C=6,3.6; _D=1,3.6; _H=1,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H 6; len _A _B 7; len _D _C 5", + "choices": [ + { + "text": "$36$", + "correct": true + }, + { + "text": "$72$", + "mistake": "forgot_half_area" + }, + { + "text": "$21$", + "mistake": "trap_one_base" + } + ] + }, + { + "question": "שטח טרפז $60$ ובסיסיו $8$ ו־$12$. מה גובהו?", + "figure": "_A=0,0; _B=12,0; _C=10,3; _D=2,3; _H=2,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H ?; len _A _B 12; len _D _C 8; note S = 60", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$3$", + "mistake": "forgot_half_area" + }, + { + "text": "$12$", + "mistake": "trap_one_base" + } + ] + }, + { + "question": "שטח טרפז $45$, גובהו $5$ ואחד הבסיסים $7$. מה הבסיס השני?", + "figure": "_A=0,0; _B=11,0; _C=9,3; _D=2,3; _H=2,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H 5; len _A _B ?; len _D _C 7; note S = 45", + "choices": [ + { + "text": "$11$", + "correct": true + }, + { + "text": "$2$", + "mistake": "forgot_half_area" + }, + { + "text": "$18$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "בסיסי טרפז $9$ ו־$15$, ושוקיו $5$ ו־$5$. מה היקפו?", + "figure": "_A=0,0; _B=15,0; _C=12,4; _D=3,4; poly _A _B _C _D; len _A _B 15; len _D _C 9; len _A _D 5; len _B _C 5", + "choices": [ + { + "text": "$34$", + "correct": true + }, + { + "text": "$29$", + "mistake": "perim_all_sides" + }, + { + "text": "$24$", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "בסיסי טרפז שווה שוקיים $12$ ו־$6$, ושוקו $5$. מה שטחו?", + "figure": "_A=0,0; _B=12,0; _C=9,4; _D=3,4; poly _A _B _C _D; len _A _B 12; len _D _C 6; len _A _D 5; len _B _C 5; tick _A _D 1; tick _B _C 1", + "choices": [ + { + "text": "$36$", + "correct": true + }, + { + "text": "$45$", + "mistake": "leg_as_height" + }, + { + "text": "$72$", + "mistake": "forgot_half_area" + } + ] + }, + { + "question": "בטרפז ישר זווית הבסיסים $10$ ו־$4$, והשוק המאונכת $8$. מה היקפו?", + "figure": "_A=0,0; _B=10,0; _C=4,4.8; _D=0,4.8; poly _A _B _C _D; right _B _A _D; right _A _D _C; len _A _B 10; len _D _C 4; len _A _D 8", + "choices": [ + { + "text": "$32$", + "correct": true + }, + { + "text": "$28$", + "mistake": "pyth" + }, + { + "text": "$30$", + "mistake": "pyth" + } + ] + }, + { + "question": "בסיסי טרפז $x$ ו־$x + 4$, גובהו $6$ ושטחו $42$. מה $x$?", + "figure": "_A=0,0; _B=9,0; _C=7,3.3; _D=2,3.3; _H=2,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H 6; len _A _B x + 4; len _D _C x; note S = 42", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 1.5$", + "mistake": "forgot_half_area" + }, + { + "text": "$x = 7$", + "mistake": "trap_one_base" + } + ] + }, + { + "question": "שטח טרפז $50$ וגובהו $5$. מה סכום הבסיסים?", + "figure": "_A=0,0; _B=11,0; _C=9,3; _D=2,3; _H=2,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H 5; note S = 50", + "choices": [ + { + "text": "$20$", + "correct": true + }, + { + "text": "$10$", + "mistake": "forgot_half_area" + }, + { + "text": "$250$", + "mistake": "mult_all" + } + ] + }, + { + "question": "בסיסי טרפז שווה שוקיים $16$ ו־$10$, ושוקיו $5$. מה גובהו?", + "figure": "_A=0,0; _B=16,0; _C=13,4; _D=3,4; _H=3,0; poly _A _B _C _D; dash _D _H; right _D _H _B; lenx _D _H ?; len _A _B 16; len _D _C 10; len _A _D 5; len _B _C 5", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$5$", + "mistake": "leg_as_height" + }, + { + "text": "$3$", + "mistake": "pyth" + } + ] + } + ] + }, + { + "id": "z_trap_axes", + "unit": "z2", + "name": "טרפז במערכת צירים", + "short": "טרפז בצירים", + "prereqs": [ + "z_trap_area" + ], + "description": "במערכת צירים מזהים בסיסים מקבילים, מחשבים גובה, שטח והיקף של טרפז.", + "month": "דצמבר", + "questions": [ + { + "question": "בטרפז $A(0, 0)$, $B(8, 0)$, $C(6, 4)$, $D(2, 4)$, אילו צלעות מקבילות?", + "figure": "A=0,0; B=8,0; C=6,4; D=2,4; poly A B C D; grid", + "choices": [ + { + "text": "$AB ∥ DC$", + "correct": true + }, + { + "text": "$AD ∥ BC$", + "mistake": "wrong_pair_parallel" + }, + { + "text": "שני הזוגות", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "בטרפז $A(0, 0)$, $B(8, 0)$, $C(6, 4)$, $D(2, 4)$, מה אורכי הבסיסים?", + "figure": "A=0,0; B=8,0; C=6,4; D=2,4; poly A B C D; grid", + "choices": [ + { + "text": "$8$ ו־$4$", + "correct": true + }, + { + "text": "$8$ ו־$6$", + "mistake": "axes_mixed" + }, + { + "text": "$4$ ו־$4$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "בטרפז $A(0, 0)$, $B(8, 0)$, $C(6, 4)$, $D(2, 4)$, מה הגובה?", + "figure": "A=0,0; B=8,0; C=6,4; D=2,4; poly A B C D; grid", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$6$", + "mistake": "axes_mixed" + }, + { + "text": "$√20$", + "mistake": "leg_as_height" + } + ] + }, + { + "question": "מה שטח הטרפז $A(0, 0)$, $B(8, 0)$, $C(6, 4)$, $D(2, 4)$?", + "figure": "A=0,0; B=8,0; C=6,4; D=2,4; poly A B C D; grid", + "choices": [ + { + "text": "$24$", + "correct": true + }, + { + "text": "$48$", + "mistake": "forgot_half_area" + }, + { + "text": "$16$", + "mistake": "trap_one_base" + } + ] + }, + { + "question": "האם הטרפז $A(0, 0)$, $B(8, 0)$, $C(6, 4)$, $D(2, 4)$ שווה שוקיים?", + "figure": "A=0,0; B=8,0; C=6,4; D=2,4; poly A B C D; grid", + "choices": [ + { + "text": "כן, $AD = BC = √20$", + "correct": true + }, + { + "text": "לא", + "mistake": "trap_iso_angles" + } + ] + }, + { + "question": "איזה מרובע הוא $A(−2, 1)$, $B(4, 1)$, $C(4, 5)$, $D(1, 5)$?", + "figure": "A=-2,1; B=4,1; C=4,5; D=1,5; poly A B C D; grid", + "choices": [ + { + "text": "טרפז ישר זווית", + "correct": true + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + }, + { + "text": "טרפז שווה שוקיים", + "mistake": "trap_iso_angles" + } + ] + }, + { + "question": "מה שטח הטרפז $A(−2, 1)$, $B(4, 1)$, $C(4, 5)$, $D(1, 5)$?", + "figure": "A=-2,1; B=4,1; C=4,5; D=1,5; poly A B C D; grid", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$36$", + "mistake": "forgot_half_area" + }, + { + "text": "$12$", + "mistake": "trap_one_base" + } + ] + }, + { + "question": "בטרפז $A(−2, 1)$, $B(4, 1)$, $C(4, 5)$, $D(1, 5)$, מה אורך $AD$?", + "figure": "A=-2,1; B=4,1; C=4,5; D=1,5; poly A B C D; grid", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$7$", + "mistake": "dist_add" + }, + { + "text": "$4$", + "mistake": "leg_as_height" + } + ] + }, + { + "question": "מה היקף הטרפז $A(−2, 1)$, $B(4, 1)$, $C(4, 5)$, $D(1, 5)$?", + "figure": "A=-2,1; B=4,1; C=4,5; D=1,5; poly A B C D; grid", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$20$", + "mistake": "dist_add" + }, + { + "text": "$17$", + "mistake": "leg_as_height" + } + ] + }, + { + "question": "נתונים $A(0, 0)$, $B(6, 0)$, $C(5, 3)$. איזו נקודה $D$ יוצרת טרפז שווה שוקיים $ABCD$ שבו $AB ∥ DC$?", + "figure": "A=0,0; B=6,0; C=5,3; grid; line A B; line B C", + "choices": [ + { + "text": "$(1, 3)$", + "correct": true + }, + { + "text": "$(0, 3)$", + "mistake": "trap_iso_angles" + }, + { + "text": "$(−1, 3)$", + "mistake": "trap_vs_par" + } + ] + } + ] + }, + { + "id": "e_way", + "unit": "e", + "name": "בחירת דרך פתרון יעילה", + "short": "דרך פתרון יעילה", + "prereqs": [ + "q_formula" + ], + "description": "לפי צורת המשוואה בוחרים דרך יעילה: הוצאת שורש, הוצאת גורם משותף, פירוק טרינום או נוסחת השורשים.", + "month": "דצמבר", + "questions": [ + { + "question": "פתרו: $(x − 3)² = 16$", + "choices": [ + { + "text": "$x = 7$ או $x = −1$", + "correct": true + }, + { + "text": "$x = 7$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 4$ או $x = −4$", + "mistake": "lost_shift" + } + ] + }, + { + "question": "פתרו: $x(x + 4) = 0$", + "choices": [ + { + "text": "$x = 0$ או $x = −4$", + "correct": true + }, + { + "text": "$x = 0$ או $x = 4$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = −4$", + "mistake": "divide_by_x" + } + ] + }, + { + "question": "פתרו: $5x² = 45$", + "choices": [ + { + "text": "$x = 3$ או $x = −3$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 9$ או $x = −9$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "פתרו: $(2x − 1)(x + 3) = 0$", + "choices": [ + { + "text": "$x = 0.5$ או $x = −3$", + "correct": true + }, + { + "text": "$x = 1$ או $x = −3$", + "mistake": "divide_wrong" + }, + { + "text": "$x = −0.5$ או $x = 3$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $x² − 7x = 0$", + "choices": [ + { + "text": "$x = 0$ או $x = 7$", + "correct": true + }, + { + "text": "$x = 7$", + "mistake": "divide_by_x" + }, + { + "text": "$x = 0$ או $x = −7$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $2(x + 1)² = 18$", + "choices": [ + { + "text": "$x = 2$ או $x = −4$", + "correct": true + }, + { + "text": "$x = 2$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 8$ או $x = −10$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $x² − 10x + 25 = 0$", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 5$ או $x = −5$", + "mistake": "diffsq_as_square" + }, + { + "text": "$x = −5$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $x² + 2x − 8 = 0$", + "choices": [ + { + "text": "$x = 2$ או $x = −4$", + "correct": true + }, + { + "text": "$x = −2$ או $x = 4$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = 1$ או $x = −8$", + "mistake": "product_only" + } + ] + }, + { + "question": "איזו משוואה הכי נוח לפתור בהוצאת שורש?", + "choices": [ + { + "text": "$(x + 2)² = 25$", + "correct": true + }, + { + "text": "$x² + 4x − 21 = 0$", + "mistake": "way_choice" + }, + { + "text": "$x² − 3x = 0$", + "mistake": "way_choice" + } + ] + }, + { + "question": "מה הדרך היעילה ביותר לפתור את $x² − 6x = 0$?", + "choices": [ + { + "text": "הוצאת גורם משותף", + "correct": true + }, + { + "text": "נוסחת השורשים", + "mistake": "way_choice" + }, + { + "text": "הוצאת שורש", + "mistake": "way_choice" + } + ] + } + ] + }, + { + "id": "e_technique", + "unit": "e", + "name": "משוואות ריבועיות שדורשות טכניקה אלגברית", + "short": "טכניקה ומשוואות", + "prereqs": [ + "q_formula" + ], + "description": "פותחים סוגריים (גם בנוסחאות הכפל המקוצר), מעבירים הכול לאגף אחד ורק אז פותרים.", + "month": "דצמבר", + "questions": [ + { + "question": "פתרו: $(x + 2)² = 4x + 13$", + "choices": [ + { + "text": "$x = 3$ או $x = −3$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 9$ או $x = −9$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "פתרו: $x(x − 3) = 10$", + "choices": [ + { + "text": "$x = 5$ או $x = −2$", + "correct": true + }, + { + "text": "$x = 10$ או $x = 13$", + "mistake": "factor_nonzero" + }, + { + "text": "$x = −5$ או $x = 2$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $(x − 1)(x + 4) = 6$", + "choices": [ + { + "text": "$x = −5$ או $x = 2$", + "correct": true + }, + { + "text": "$x = 7$ או $x = 2$", + "mistake": "factor_nonzero" + }, + { + "text": "$x = 5$ או $x = −2$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $2x² = 3(x + 3)$", + "choices": [ + { + "text": "$x = 3$ או $x = −1.5$", + "correct": true + }, + { + "text": "$x = −3$ או $x = 1.5$", + "mistake": "minus_b" + }, + { + "text": "$x = 6$ או $x = −3$", + "mistake": "forgot_2a" + } + ] + }, + { + "question": "פתרו: $(2x − 1)² = 9$", + "choices": [ + { + "text": "$x = 2$ או $x = −1$", + "correct": true + }, + { + "text": "$x = 2$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 4$ או $x = −2$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "פתרו: $(x + 3)(x − 3) = 8x$", + "choices": [ + { + "text": "$x = 9$ או $x = −1$", + "correct": true + }, + { + "text": "$x = −9$ או $x = 1$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = 3$ או $x = −3$", + "mistake": "factor_nonzero" + } + ] + }, + { + "question": "פתרו: $x² + (x + 1)² = 25$", + "choices": [ + { + "text": "$x = 3$ או $x = −4$", + "correct": true + }, + { + "text": "$x = √12$ או $x = −√12$", + "mistake": "forgot_middle" + }, + { + "text": "$x = −3$ או $x = 4$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $(x + 5)² = 10x + 50$", + "choices": [ + { + "text": "$x = 5$ או $x = −5$", + "correct": true + }, + { + "text": "$x = 5$", + "mistake": "missing_neg_root" + }, + { + "text": "$x = 25$ או $x = −25$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "פתרו: $3(x² − 2) = 7x$", + "choices": [ + { + "text": "$x = 3$ או $x = −2/3$", + "correct": true + }, + { + "text": "$x = 9$ או $x = −2$", + "mistake": "forgot_2a" + }, + { + "text": "$x = −3$ או $x = 2/3$", + "mistake": "minus_b" + } + ] + }, + { + "question": "פתרו: $(x − 2)² + x = 8$", + "choices": [ + { + "text": "$x = 4$ או $x = −1$", + "correct": true + }, + { + "text": "$x = −4$ או $x = 1$", + "mistake": "zero_root_sign" + }, + { + "text": "$x = 2 + √8$ או $x = 2 − √8$", + "mistake": "factor_nonzero" + } + ] + } + ] + }, + { + "id": "e_apply_geo", + "unit": "e", + "name": "יישומים הנדסיים של משוואות ריבועיות", + "short": "יישומים הנדסיים", + "prereqs": [ + "e_technique" + ], + "description": "בונים משוואה מנתוני שטח, היקף או משפט פיתגורס, פותרים, ופוסלים פתרון שאינו יכול להיות אורך.", + "month": "דצמבר", + "questions": [ + { + "question": "אורך מלבן גדול ב־$3$ מרוחבו, ושטחו $40$. מה רוחבו?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$5$ או $−8$", + "mistake": "inadmissible" + }, + { + "text": "$8$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "ניצבי משולש ישר זווית הם $x$ ו־$x + 7$, והיתר $13$. מה $x$?", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 5$ או $x = −12$", + "mistake": "inadmissible" + }, + { + "text": "$x = 12$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "היקף מלבן $26$ ושטחו $40$. מה אורכו (הצלע הארוכה)?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$5$", + "mistake": "other_quantity" + }, + { + "text": "$13$", + "mistake": "half_perimeter" + } + ] + }, + { + "question": "תמונה שמידותיה $20$ על $10$ ממוסגרת במסגרת ברוחב $x$ מכל צד. השטח הכולל $336$. מה $x$?", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "frame_one_side" + }, + { + "text": "$x = 2$ או $x = −17$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "בסיס משולש $x + 2$, הגובה אליו $x$, ושטחו $24$. מה $x$?", + "choices": [ + { + "text": "$x = 6$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "forgot_half_area" + }, + { + "text": "$x = 6$ או $x = −8$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "אורך מלבן כפול מרוחבו, ושטחו $72$. מה רוחבו?", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$36$", + "mistake": "forgot_root" + }, + { + "text": "$6$ או $−6$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "סביב בריכה שמידותיה $8$ על $6$ יש שביל ברוחב $x$. שטח השביל לבדו $72$. מה $x$?", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "frame_one_side" + }, + { + "text": "$x = 2$ או $x = −9$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "אלכסון מלבן $10$, ואורכו גדול ב־$2$ מרוחבו. מה רוחבו?", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$8$", + "mistake": "other_quantity" + }, + { + "text": "$6$ או $−8$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "בסיסי טרפז $x$ ו־$x + 4$, גובהו $x$ ושטחו $48$. מה $x$?", + "choices": [ + { + "text": "$x = 6$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "forgot_half_area" + }, + { + "text": "$x = 6$ או $x = −8$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "חוט באורך $20$ ס״מ חותכים לשני חלקים, ומכל חלק בונים ריבוע. סכום שטחי הריבועים $13$ סמ״ר. מה אורכי החלקים?", + "choices": [ + { + "text": "$8$ ס״מ ו־$12$ ס״מ", + "correct": true + }, + { + "text": "$2$ ס״מ ו־$3$ ס״מ", + "mistake": "other_quantity" + }, + { + "text": "$10$ ס״מ ו־$10$ ס״מ", + "mistake": "half_product" + } + ] + } + ] + }, + { + "id": "e_apply_num", + "unit": "e", + "name": "יישומים מספריים של משוואות ריבועיות", + "short": "יישומים מספריים", + "prereqs": [ + "e_technique" + ], + "description": "מתרגמים את הסיפור למשוואה ריבועית, פותרים, ובודקים את הפתרונות מול תנאי השאלה.", + "month": "דצמבר", + "questions": [ + { + "question": "מכפלת שני מספרים שלמים עוקבים היא $56$. מהם המספרים?", + "choices": [ + { + "text": "$7$ ו־$8$, או $−8$ ו־$−7$", + "correct": true + }, + { + "text": "$28$ ו־$28$", + "mistake": "half_product" + }, + { + "text": "$7$ ו־$8$ בלבד", + "mistake": "both_solutions" + } + ] + }, + { + "question": "סכום מספר וריבועו הוא $30$. מהו המספר?", + "choices": [ + { + "text": "$5$ או $−6$", + "correct": true + }, + { + "text": "$5$ בלבד", + "mistake": "both_solutions" + }, + { + "text": "$15$", + "mistake": "half_product" + } + ] + }, + { + "question": "ריבועו של מספר טבעי גדול ב־$12$ מהמספר. מהו המספר?", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$4$ או $−3$", + "mistake": "inadmissible" + }, + { + "text": "$3$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "סכום שני מספרים $10$ ומכפלתם $21$. מהם המספרים?", + "choices": [ + { + "text": "$3$ ו־$7$", + "correct": true + }, + { + "text": "$5$ ו־$5$", + "mistake": "product_check" + }, + { + "text": "$1$ ו־$21$", + "mistake": "product_check" + } + ] + }, + { + "question": "ההפרש בין שני מספרים טבעיים $3$, ומכפלתם $40$. מהם המספרים?", + "choices": [ + { + "text": "$5$ ו־$8$", + "correct": true + }, + { + "text": "$4$ ו־$10$", + "mistake": "product_check" + }, + { + "text": "$−8$ ו־$−5$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "גובה כדור (במטרים) אחרי $t$ שניות הוא $h = −5t² + 20t$. אחרי כמה שניות יחזור לקרקע?", + "choices": [ + { + "text": "$4$ שניות", + "correct": true + }, + { + "text": "$2$ שניות", + "mistake": "other_quantity" + }, + { + "text": "$20$ שניות", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "גובה כדור (במטרים) אחרי $t$ שניות הוא $h = −5t² + 20t$. מה הגובה המרבי שלו?", + "choices": [ + { + "text": "$20$ מ׳", + "correct": true + }, + { + "text": "$2$ מ׳", + "mistake": "x_as_value" + }, + { + "text": "$40$ מ׳", + "mistake": "minus_outside" + } + ] + }, + { + "question": "כל תלמיד בכיתה שלח הודעה אחת לכל תלמיד אחר, ונשלחו $90$ הודעות. כמה תלמידים בכיתה?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$10$ או $−9$", + "mistake": "inadmissible" + }, + { + "text": "$45$", + "mistake": "half_product" + } + ] + }, + { + "question": "סכום הריבועים של שני מספרים טבעיים עוקבים הוא $41$. מהם המספרים?", + "choices": [ + { + "text": "$4$ ו־$5$", + "correct": true + }, + { + "text": "$−5$ ו־$−4$", + "mistake": "inadmissible" + }, + { + "text": "$20$ ו־$21$", + "mistake": "half_product" + } + ] + }, + { + "question": "מספר אחד גדול פי $3$ מהשני, ומכפלתם $48$. מהם המספרים?", + "choices": [ + { + "text": "$4$ ו־$12$, או $−4$ ו־$−12$", + "correct": true + }, + { + "text": "$4$ ו־$12$ בלבד", + "mistake": "both_solutions" + }, + { + "text": "$16$ ו־$48$", + "mistake": "forgot_root" + } + ] + } + ] + }, + { + "id": "v_graph", + "unit": "v", + "name": "אי־שוויון ריבועי מגרף", + "short": "אי־שוויון מגרף", + "prereqs": [ + "q_props" + ], + "description": "פתרון $f(x) > 0$ הוא תחום ערכי $x$ שבו הגרף מעל ציר $x$; פתרון $f(x) < 0$ הוא היכן שהוא מתחתיו.", + "month": "דצמבר", + "questions": [ + { + "question": "לפי הגרף, מתי $f(x) > 0$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$x < −1$ או $x > 3$", + "correct": true + }, + { + "text": "$−1 < x < 3$", + "mistake": "sign_regions" + }, + { + "text": "$x > 3$", + "mistake": "partial_intervals" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) ≤ 0$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$−1 ≤ x ≤ 3$", + "correct": true + }, + { + "text": "$−1 < x < 3$", + "mistake": "strict_vs_weak" + }, + { + "text": "$x ≤ −1$ או $x ≥ 3$", + "mistake": "sign_regions" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) > 0$?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$−3 < x < 1$", + "correct": true + }, + { + "text": "$x < −3$ או $x > 1$", + "mistake": "sign_regions" + }, + { + "text": "$x < 1$", + "mistake": "partial_intervals" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) ≥ 0$?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$−3 ≤ x ≤ 1$", + "correct": true + }, + { + "text": "$−3 < x < 1$", + "mistake": "strict_vs_weak" + }, + { + "text": "$x ≤ −3$ או $x ≥ 1$", + "mistake": "sign_regions" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) < 0$?", + "graph": { + "points": [ + [ + -4, + -5 + ], + [ + -3, + 0 + ], + [ + -2, + 3 + ], + [ + -1, + 4 + ], + [ + 0, + 3 + ], + [ + 1, + 0 + ], + [ + 2, + -5 + ] + ], + "x": [ + -4.5, + 2.5 + ], + "y": [ + -5.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$x < −3$ או $x > 1$", + "correct": true + }, + { + "text": "$−3 < x < 1$", + "mistake": "sign_regions" + }, + { + "text": "$x > 1$", + "mistake": "partial_intervals" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) > 0$?", + "graph": { + "points": [ + [ + -4, + 4 + ], + [ + -3, + 1 + ], + [ + -2, + 0 + ], + [ + -1, + 1 + ], + [ + 0, + 4 + ] + ], + "x": [ + -4.5, + 1.5 + ], + "y": [ + -1, + 4.5 + ] + }, + "choices": [ + { + "text": "לכל $x ≠ −2$", + "correct": true + }, + { + "text": "$x > −2$", + "mistake": "touch_point" + }, + { + "text": "אין פתרון", + "mistake": "sign_regions" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) < 0$?", + "graph": { + "points": [ + [ + -4, + 4 + ], + [ + -3, + 1 + ], + [ + -2, + 0 + ], + [ + -1, + 1 + ], + [ + 0, + 4 + ] + ], + "x": [ + -4.5, + 1.5 + ], + "y": [ + -1, + 4.5 + ] + }, + "choices": [ + { + "text": "אין פתרון", + "correct": true + }, + { + "text": "$x < −2$", + "mistake": "touch_point" + }, + { + "text": "לכל $x ≠ −2$", + "mistake": "sign_regions" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) ≤ 0$?", + "graph": { + "points": [ + [ + -4, + 4 + ], + [ + -3, + 1 + ], + [ + -2, + 0 + ], + [ + -1, + 1 + ], + [ + 0, + 4 + ] + ], + "x": [ + -4.5, + 1.5 + ], + "y": [ + -1, + 4.5 + ] + }, + "choices": [ + { + "text": "$x = −2$", + "correct": true + }, + { + "text": "אין פתרון", + "mistake": "strict_vs_weak" + }, + { + "text": "$x ≤ −2$", + "mistake": "touch_point" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) > 0$?", + "graph": { + "points": [ + [ + 0, + -3 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ], + [ + 3, + 0 + ], + [ + 4, + -3 + ] + ], + "x": [ + -0.5, + 4.5 + ], + "y": [ + -3.5, + 1.5 + ] + }, + "choices": [ + { + "text": "$1 < x < 3$", + "correct": true + }, + { + "text": "$x < 1$ או $x > 3$", + "mistake": "sign_regions" + }, + { + "text": "$1 ≤ x ≤ 3$", + "mistake": "strict_vs_weak" + } + ] + }, + { + "question": "לפי הגרף, מתי $f(x) ≤ 0$?", + "graph": { + "points": [ + [ + 0, + -3 + ], + [ + 1, + 0 + ], + [ + 2, + 1 + ], + [ + 3, + 0 + ], + [ + 4, + -3 + ] + ], + "x": [ + -0.5, + 4.5 + ], + "y": [ + -3.5, + 1.5 + ] + }, + "choices": [ + { + "text": "$x ≤ 1$ או $x ≥ 3$", + "correct": true + }, + { + "text": "$1 ≤ x ≤ 3$", + "mistake": "sign_regions" + }, + { + "text": "$x < 1$ או $x > 3$", + "mistake": "strict_vs_weak" + } + ] + } + ] + }, + { + "id": "v_solve", + "unit": "v", + "name": "פתרון אי־שוויון ריבועי", + "short": "פתרון אי־שוויון", + "prereqs": [ + "v_graph", + "q_formula" + ], + "description": "מוצאים את השורשים, משרטטים סקיצה לפי סימן $a$, וקוראים ממנה את התחום המבוקש.", + "month": "דצמבר", + "questions": [ + { + "question": "פתרו: $x² − 5x + 6 < 0$", + "choices": [ + { + "text": "$2 < x < 3$", + "correct": true + }, + { + "text": "$x < 2$ או $x > 3$", + "mistake": "sign_regions" + }, + { + "text": "$x < 3$", + "mistake": "partial_intervals" + } + ] + }, + { + "question": "פתרו: $x² − 9 ≥ 0$", + "choices": [ + { + "text": "$x ≤ −3$ או $x ≥ 3$", + "correct": true + }, + { + "text": "$x ≥ 3$", + "mistake": "partial_intervals" + }, + { + "text": "$−3 ≤ x ≤ 3$", + "mistake": "sign_regions" + } + ] + }, + { + "question": "פתרו: $−x² + 4x > 0$", + "choices": [ + { + "text": "$0 < x < 4$", + "correct": true + }, + { + "text": "$x < 0$ או $x > 4$", + "mistake": "sign_regions" + }, + { + "text": "$x > 4$", + "mistake": "partial_intervals" + } + ] + }, + { + "question": "פתרו: $x² + 1 > 0$", + "choices": [ + { + "text": "לכל $x$", + "correct": true + }, + { + "text": "אין פתרון", + "mistake": "vertex_side" + }, + { + "text": "$x > −1$", + "mistake": "partial_intervals" + } + ] + }, + { + "question": "פתרו: $x² < 2x$", + "choices": [ + { + "text": "$0 < x < 2$", + "correct": true + }, + { + "text": "$x < 2$", + "mistake": "divide_by_x" + }, + { + "text": "$x < 0$ או $x > 2$", + "mistake": "sign_regions" + } + ] + }, + { + "question": "פתרו: $(x − 1)(x + 4) ≤ 0$", + "choices": [ + { + "text": "$−4 ≤ x ≤ 1$", + "correct": true + }, + { + "text": "$−4 < x < 1$", + "mistake": "strict_vs_weak" + }, + { + "text": "$−1 ≤ x ≤ 4$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $x² + 2x − 15 > 0$", + "choices": [ + { + "text": "$x < −5$ או $x > 3$", + "correct": true + }, + { + "text": "$−5 < x < 3$", + "mistake": "sign_regions" + }, + { + "text": "$x < −3$ או $x > 5$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $−x² + x + 6 ≥ 0$", + "choices": [ + { + "text": "$−2 ≤ x ≤ 3$", + "correct": true + }, + { + "text": "$x ≤ −2$ או $x ≥ 3$", + "mistake": "sign_regions" + }, + { + "text": "$−2 < x < 3$", + "mistake": "strict_vs_weak" + } + ] + }, + { + "question": "פתרו: $x² ≤ 16$", + "choices": [ + { + "text": "$−4 ≤ x ≤ 4$", + "correct": true + }, + { + "text": "$x ≤ 4$", + "mistake": "partial_intervals" + }, + { + "text": "$x ≤ −4$ או $x ≥ 4$", + "mistake": "sign_regions" + } + ] + }, + { + "question": "פתרו: $2x² − 8 < 0$", + "choices": [ + { + "text": "$−2 < x < 2$", + "correct": true + }, + { + "text": "$x < 2$", + "mistake": "partial_intervals" + }, + { + "text": "$−4 < x < 4$", + "mistake": "forgot_root" + } + ] + } + ] + }, + { + "id": "g_def", + "unit": "g", + "name": "הגדרת המקבילית, צלעות וזוויות", + "short": "הגדרת מקבילית", + "prereqs": [ + "z_parallel" + ], + "description": "מקבילית היא מרובע ששני זוגות הצלעות הנגדיות בו מקבילים. במקבילית צלעות נגדיות שוות, זוויות נגדיות שוות וזוויות סמוכות משלימות ל־$180°$.", + "month": "דצמבר", + "questions": [ + { + "question": "איזה מרובע נקרא מקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D", + "choices": [ + { + "text": "מרובע ששני זוגות הצלעות הנגדיות בו מקבילים", + "correct": true + }, + { + "text": "מרובע שיש בו זוג אחד של צלעות מקבילות", + "mistake": "trap_vs_par" + }, + { + "text": "מרובע שאלכסוניו שווים", + "mistake": "par_not_rect" + } + ] + }, + { + "question": "במקבילית $ABCD$: $∢A = 70°$. מה גודל $∢C$?", + "figure": "A=0,0; B=6,0; C=7.16,3.19; D=1.16,3.19; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; ang B A D 70°; ang D C B ?", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$110°$", + "mistake": "par_opposite" + }, + { + "text": "$20°$", + "mistake": "complement90" + } + ] + }, + { + "question": "במקבילית $ABCD$: $∢A = 70°$. מה גודל $∢B$?", + "figure": "A=0,0; B=6,0; C=7.16,3.19; D=1.16,3.19; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; ang B A D 70°; ang C B A ?", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "par_adjacent" + }, + { + "text": "$20°$", + "mistake": "complement90" + } + ] + }, + { + "question": "במקבילית $ABCD$: $AB = 7$, $BC = 4$. מה היקפה?", + "figure": "A=0,0; B=7,0; C=8.69,3.63; D=1.69,3.63; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; len A B 7; len B C 4", + "choices": [ + { + "text": "$22$", + "correct": true + }, + { + "text": "$11$", + "mistake": "perim_all_sides" + }, + { + "text": "$28$", + "mistake": "par_not_rhombus" + } + ] + }, + { + "question": "במקבילית $ABCD$: $∢A = 2 · ∢B$. מה גודל $∢A$?", + "figure": "A=0,0; B=6,0; C=4.4,2.77; D=-1.6,2.77; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; ang B A D ?; note ∢A = 2 · ∢B", + "choices": [ + { + "text": "$120°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "other_quantity" + }, + { + "text": "$90°$", + "mistake": "par_adjacent" + } + ] + }, + { + "question": "במקבילית $ABCD$: $∢A + ∢C = 140°$. מה גודל $∢B$?", + "figure": "A=0,0; B=6,0; C=7.16,3.19; D=1.16,3.19; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; ang C B A ?; note ∢A + ∢C = 140°", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$40°$", + "mistake": "par_adjacent" + }, + { + "text": "$70°$", + "mistake": "par_opposite" + } + ] + }, + { + "question": "במקבילית $ABCD$: $AB = 3x − 1$, $DC = x + 7$. מה $x$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; len A B 3x − 1; len D C x + 7", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "move_sign" + }, + { + "text": "$x = 1.5$", + "mistake": "par_opposite" + } + ] + }, + { + "question": "היקף מקבילית $40$, ו־$AB = 12$. מה $BC$?", + "figure": "A=0,0; B=6,0; C=7.69,3.63; D=1.69,3.63; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; len A B 12; len B C ?; note P = 40", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$28$", + "mistake": "perim_all_sides" + }, + { + "text": "$16$", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "במקבילית $ABCD$: $∢A = 5x + 10$, $∢C = 3x + 40$. מה גודל $∢A$?", + "figure": "A=0,0; B=6,0; C=6.3,3.39; D=0.3,3.39; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; ang B A D 5x + 10; ang D C B 3x + 40", + "choices": [ + { + "text": "$85°$", + "correct": true + }, + { + "text": "$15°$", + "mistake": "other_quantity" + }, + { + "text": "$91.25°$", + "mistake": "par_adjacent" + } + ] + }, + { + "question": "איזו טענה נכונה בכל מקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2", + "choices": [ + { + "text": "הצלעות הנגדיות שוות", + "correct": true + }, + { + "text": "כל הצלעות שוות", + "mistake": "par_not_rhombus" + }, + { + "text": "האלכסונים שווים", + "mistake": "par_not_rect" + } + ] + } + ] + }, + { + "id": "g_diag", + "unit": "g", + "name": "אלכסוני המקבילית", + "short": "אלכסוני מקבילית", + "prereqs": [ + "g_def" + ], + "description": "אלכסוני המקבילית חוצים זה את זה.", + "month": "דצמבר", + "questions": [ + { + "question": "במקבילית $ABCD$ האלכסונים נחתכים ב־$O$, ו־$AC = 12$. מה $AO$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; lenx A O ?; note AC = 12", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$12$", + "mistake": "par_diag" + }, + { + "text": "אי אפשר לדעת", + "mistake": "par_diag" + } + ] + }, + { + "question": "במקבילית $ABCD$ האלכסונים נחתכים ב־$O$: $AO = 5$, $BO = 3$. מה $BD$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; lenx A O 5; lenx B O 3", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$10$", + "mistake": "par_diag" + }, + { + "text": "$3$", + "mistake": "par_diag" + } + ] + }, + { + "question": "מה נכון לגבי אלכסוני המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O", + "choices": [ + { + "text": "הם חוצים זה את זה", + "correct": true + }, + { + "text": "הם שווים", + "mistake": "par_not_rect" + }, + { + "text": "הם מאונכים", + "mistake": "par_not_rhombus" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים): $AO = 2x + 1$, $OC = x + 5$. מה $x$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; lenx A O 2x + 1; lenx O C x + 5", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 2$", + "mistake": "par_diag" + }, + { + "text": "$x = 6$", + "mistake": "move_sign" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים): $AC = 3x$, $AO = x + 4$. מה $x$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; lenx A O x + 4; note AC = 3x", + "choices": [ + { + "text": "$x = 8$", + "correct": true + }, + { + "text": "$x = 2$", + "mistake": "par_diag" + }, + { + "text": "$x = 4$", + "mistake": "par_diag" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים): $AO = 4$, $BO = 3$ ו־$∢AOB = 90°$. מה $AB$?", + "figure": "O=0,0@e; A=-4,-0.6; C=4,0.6; B=0.45,-3; D=-0.45,3; poly A B C D; line A C; line B D; dot O; right A O B; lenx A O 4; lenx B O 3; len A B ?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$7$", + "mistake": "pyth" + }, + { + "text": "$√7$", + "mistake": "pyth" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים), לאיזה משולש חופף המשולש $AOB$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O", + "choices": [ + { + "text": "$△COD$", + "correct": true + }, + { + "text": "$△BOC$", + "mistake": "par_diag" + }, + { + "text": "$△AOD$", + "mistake": "par_diag" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים): $AC + BD = 30$, $AO = 6$. מה $BO$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; lenx A O 6; lenx B O ?; note AC + BD = 30", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$18$", + "mistake": "par_diag" + }, + { + "text": "$24$", + "mistake": "par_diag" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים): $AO = 7$, $BD = 10$. מה $AC + BD$?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; lenx A O 7; note BD = 10", + "choices": [ + { + "text": "$24$", + "correct": true + }, + { + "text": "$17$", + "mistake": "par_diag" + }, + { + "text": "$34$", + "mistake": "par_diag" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים) שטח המשולש $AOB$ הוא $5$. מה שטח המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; par A B 1; par D C 1; par A D 2; par B C 2; line A C; line B D; dot O; note S(△AOB) = 5", + "choices": [ + { + "text": "$20$", + "correct": true + }, + { + "text": "$10$", + "mistake": "par_diag" + }, + { + "text": "$15$", + "mistake": "par_diag" + } + ] + } + ] + }, + { + "id": "g_converse", + "unit": "g", + "name": "משפטים הפוכים: מתי מרובע הוא מקבילית", + "short": "הוכחת מקבילית", + "prereqs": [ + "g_diag" + ], + "description": "מרובע הוא מקבילית אם שני זוגות של צלעות נגדיות שווים, אם זוג צלעות נגדיות מקביל ושווה, אם האלכסונים חוצים זה את זה, או אם הזוויות הנגדיות שוות.", + "month": "ינואר", + "questions": [ + { + "question": "במרובע $ABCD$ האלכסונים חוצים זה את זה. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AO = OC, BO = OD", + "choices": [ + { + "text": "מקבילית", + "correct": true + }, + { + "text": "לא בהכרח מקבילית", + "mistake": "par_tests" + }, + { + "text": "מלבן", + "mistake": "par_not_rect" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB ∥ DC$ ו־$AD = BC$. האם הוא בהכרח מקבילית?", + "figure": "A=0,0; B=7,0; C=6.2,3; D=2.2,3; poly A B C D; par A B 1; par D C 1; tick A D 1; tick B C 1", + "choices": [ + { + "text": "לא, ייתכן שהוא טרפז שווה שוקיים", + "correct": true + }, + { + "text": "כן", + "mistake": "par_trap_iso" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB ∥ DC$ ו־$AB = DC$. האם הוא מקבילית?", + "figure": "A=0,0; B=6,0; C=7,3; D=1.6,3; poly A B C D; par A B 1; par D C 1; tick A B 1; tick D C 1", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא בהכרח", + "mistake": "par_tests" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB = DC$ ו־$AD = BC$. האם הוא מקבילית?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; note AB = DC, AD = BC", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא בהכרח", + "mistake": "par_tests" + }, + { + "text": "רק אם יש בו זווית ישרה", + "mistake": "par_not_rect" + } + ] + }, + { + "question": "במרובע $ABCD$ האלכסונים מאונכים זה לזה. האם הוא בהכרח מקבילית?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; right A O B; note AC ⊥ BD", + "choices": [ + { + "text": "לא", + "correct": true + }, + { + "text": "כן", + "mistake": "kite_par" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A = ∢C$ ו־$∢B = ∢D$. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; ang B A D; ang D C B; ang2 C B A; ang2 A D C", + "choices": [ + { + "text": "מקבילית", + "correct": true + }, + { + "text": "דלתון", + "mistake": "kite_parallelogram" + }, + { + "text": "לא בהכרח מקבילית", + "mistake": "par_tests" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB = DC = 6$, $AD = BC = 9$. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; len A B 6; len D C 6; len A D 9; len B C 9", + "choices": [ + { + "text": "מקבילית", + "correct": true + }, + { + "text": "דלתון", + "mistake": "kite_parallelogram" + }, + { + "text": "מלבן", + "mistake": "par_not_rect" + } + ] + }, + { + "question": "במרובע $ABCD$ האלכסונים נחתכים ב־$O$, ו־$AO = OC$, $BO = OD$. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AO = OC, BO = OD", + "choices": [ + { + "text": "מקבילית", + "correct": true + }, + { + "text": "מעוין", + "mistake": "par_not_rhombus" + }, + { + "text": "לא בהכרח מקבילית", + "mistake": "par_tests" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB ∥ DC$, $AB = 5$ ו־$DC = 8$. מהו המרובע?", + "figure": "A=0,0; B=5,0; C=6.5,3; D=-1.5,3; poly A B C D; par A B 1; par D C 1; len A B 5; len D C 8", + "choices": [ + { + "text": "טרפז", + "correct": true + }, + { + "text": "מקבילית", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢A + ∢B = 180°$ ו־$∢A + ∢D = 180°$. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; note ∢A + ∢B = 180°, ∢A + ∢D = 180°", + "choices": [ + { + "text": "מקבילית", + "correct": true + }, + { + "text": "טרפז", + "mistake": "trap_vs_par" + }, + { + "text": "לא בהכרח מקבילית", + "mistake": "par_tests" + } + ] + } + ] + }, + { + "id": "g_axes", + "unit": "g", + "name": "מקבילית במערכת צירים", + "short": "מקבילית בצירים", + "prereqs": [ + "g_converse" + ], + "description": "במערכת צירים מוצאים קודקוד חסר של מקבילית, את מפגש האלכסונים, ואת השטח וההיקף.", + "month": "ינואר", + "questions": [ + { + "question": "האם $A(0, 0)$, $B(5, 0)$, $C(7, 3)$, $D(2, 3)$ היא מקבילית?", + "figure": "A=0,0; B=5,0; C=7,3; D=2,3; poly A B C D; grid", + "choices": [ + { + "text": "כן, $AB$ ו־$DC$ מקבילים ושווים ($5$)", + "correct": true + }, + { + "text": "לא", + "mistake": "par_tests" + } + ] + }, + { + "question": "במקבילית $A(0, 0)$, $B(5, 0)$, $C(7, 3)$, $D(2, 3)$, היכן נחתכים האלכסונים?", + "figure": "A=0,0; B=5,0; C=7,3; D=2,3; poly A B C D; grid; dash A C; dash B D", + "choices": [ + { + "text": "$(3.5, 1.5)$", + "correct": true + }, + { + "text": "$(2.5, 0)$", + "mistake": "par_diag" + }, + { + "text": "$(1.5, 3.5)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מה שטח המקבילית $A(0, 0)$, $B(5, 0)$, $C(7, 3)$, $D(2, 3)$?", + "figure": "A=0,0; B=5,0; C=7,3; D=2,3; poly A B C D; grid", + "choices": [ + { + "text": "$15$", + "correct": true + }, + { + "text": "$7.5$", + "mistake": "par_area" + }, + { + "text": "$21$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "נתונים $A(1, 1)$, $B(4, 2)$, $C(6, 5)$. מה $D$ במקבילית $ABCD$?", + "figure": "A=1,1; B=4,2; C=6,5; grid; line A B; line B C", + "choices": [ + { + "text": "$(3, 4)$", + "correct": true + }, + { + "text": "$(9, 6)$", + "mistake": "vertex_order" + }, + { + "text": "$(−1, −2)$", + "mistake": "vertex_order" + } + ] + }, + { + "question": "במקבילית שבה $A(1, 1)$ ו־$C(6, 5)$ קודקודים נגדיים, היכן נחתכים האלכסונים?", + "figure": "A=1,1; C=6,5; grid; dash A C", + "choices": [ + { + "text": "$(3.5, 3)$", + "correct": true + }, + { + "text": "$(2.5, 2)$", + "mistake": "par_diag" + }, + { + "text": "$(3, 3.5)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "נתונים $A(−2, 1)$, $B(3, 1)$, $C(5, 4)$. מה $D$ במקבילית $ABCD$?", + "figure": "A=-2,1; B=3,1; C=5,4; grid; line A B; line B C", + "choices": [ + { + "text": "$(0, 4)$", + "correct": true + }, + { + "text": "$(10, 4)$", + "mistake": "vertex_order" + }, + { + "text": "$(−4, −2)$", + "mistake": "vertex_order" + } + ] + }, + { + "question": "מה שטח המקבילית $A(−2, 1)$, $B(3, 1)$, $C(5, 4)$, $D(0, 4)$?", + "figure": "A=-2,1; B=3,1; C=5,4; D=0,4; poly A B C D; grid", + "choices": [ + { + "text": "$15$", + "correct": true + }, + { + "text": "$7.5$", + "mistake": "par_area" + }, + { + "text": "$20$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "האם $A(0, 0)$, $B(4, 0)$, $C(5, 2)$, $D(1, 3)$ היא מקבילית?", + "figure": "A=0,0; B=4,0; C=5,2; D=1,3; poly A B C D; grid", + "choices": [ + { + "text": "לא, $DC$ אינו מקביל ל־$AB$", + "correct": true + }, + { + "text": "כן", + "mistake": "par_tests" + } + ] + }, + { + "question": "נתונים $A(0, 0)$, $B(6, 0)$, $D(2, 4)$. מה $C$ במקבילית $ABCD$?", + "figure": "A=0,0; B=6,0; D=2,4; grid; line A B; line A D", + "choices": [ + { + "text": "$(8, 4)$", + "correct": true + }, + { + "text": "$(4, 4)$", + "mistake": "vertex_order" + }, + { + "text": "$(−4, 4)$", + "mistake": "vertex_order" + } + ] + }, + { + "question": "מה היקף המקבילית $A(0, 0)$, $B(6, 0)$, $C(8, 4)$, $D(2, 4)$?", + "figure": "A=0,0; B=6,0; C=8,4; D=2,4; poly A B C D; grid", + "choices": [ + { + "text": "$12 + 2√20$", + "correct": true + }, + { + "text": "$12 + √20$", + "mistake": "perim_all_sides" + }, + { + "text": "$24$", + "mistake": "dist_add" + } + ] + } + ] + }, + { + "id": "r_domain", + "unit": "r", + "name": "תחום הצבה", + "short": "תחום הצבה", + "prereqs": [], + "description": "פוסלים כל ערך של $x$ שמאפס מכנה. המונה אינו מגביל.", + "month": "ינואר", + "questions": [ + { + "question": "מהו תחום ההצבה של $5 / (x − 4)$?", + "choices": [ + { + "text": "$x ≠ 4$", + "correct": true + }, + { + "text": "$x ≠ −4$", + "mistake": "domain_sign" + }, + { + "text": "$x ≠ 0$", + "mistake": "domain_zero" + } + ] + }, + { + "question": "מהו תחום ההצבה של $(x + 2) / (x + 7)$?", + "choices": [ + { + "text": "$x ≠ −7$", + "correct": true + }, + { + "text": "$x ≠ −2$", + "mistake": "numerator_domain" + }, + { + "text": "$x ≠ 7$", + "mistake": "domain_sign" + } + ] + }, + { + "question": "מהו תחום ההצבה של $3 / x + 1 / (x − 2)$?", + "choices": [ + { + "text": "$x ≠ 0$, $x ≠ 2$", + "correct": true + }, + { + "text": "$x ≠ 2$", + "mistake": "domain_all" + }, + { + "text": "$x ≠ 0$, $x ≠ −2$", + "mistake": "domain_sign" + } + ] + }, + { + "question": "מהו תחום ההצבה של $1 / (2x − 6)$?", + "choices": [ + { + "text": "$x ≠ 3$", + "correct": true + }, + { + "text": "$x ≠ 6$", + "mistake": "divide_wrong" + }, + { + "text": "$x ≠ −3$", + "mistake": "domain_sign" + } + ] + }, + { + "question": "מהו תחום ההצבה של $(x − 1) / (5x)$?", + "choices": [ + { + "text": "$x ≠ 0$", + "correct": true + }, + { + "text": "$x ≠ 1$", + "mistake": "numerator_domain" + }, + { + "text": "$x ≠ 5$", + "mistake": "domain_zero" + } + ] + }, + { + "question": "מהו תחום ההצבה של $4 / (x + 1) − 2 / (3 − x)$?", + "choices": [ + { + "text": "$x ≠ −1$, $x ≠ 3$", + "correct": true + }, + { + "text": "$x ≠ 1$, $x ≠ −3$", + "mistake": "domain_sign" + }, + { + "text": "$x ≠ −1$", + "mistake": "domain_all" + } + ] + }, + { + "question": "איזה ערך אסור להציב ב־$7 / (x + 0.5)$?", + "choices": [ + { + "text": "$x = −0.5$", + "correct": true + }, + { + "text": "$x = 0.5$", + "mistake": "domain_sign" + }, + { + "text": "$x = 7$", + "mistake": "numerator_domain" + } + ] + }, + { + "question": "מהו תחום ההצבה של $(x² + 1) / (x − 9)$?", + "choices": [ + { + "text": "$x ≠ 9$", + "correct": true + }, + { + "text": "$x ≠ 9$, $x ≠ ±1$", + "mistake": "numerator_domain" + }, + { + "text": "$x ≠ −9$", + "mistake": "domain_sign" + } + ] + }, + { + "question": "מהו תחום ההצבה של $2 / (4 − x)$?", + "choices": [ + { + "text": "$x ≠ 4$", + "correct": true + }, + { + "text": "$x ≠ −4$", + "mistake": "domain_sign" + }, + { + "text": "$x ≠ 2$", + "mistake": "numerator_domain" + } + ] + }, + { + "question": "מהו תחום ההצבה של $x / (x + 3) + 1 / x$?", + "choices": [ + { + "text": "$x ≠ −3$, $x ≠ 0$", + "correct": true + }, + { + "text": "$x ≠ −3$", + "mistake": "domain_all" + }, + { + "text": "$x ≠ 3$, $x ≠ 0$", + "mistake": "domain_sign" + } + ] + } + ] + }, + { + "id": "r_factor", + "unit": "r", + "name": "תחום הצבה עם פירוק המכנה", + "short": "פירוק המכנה", + "prereqs": [ + "r_domain", + "t_factor_formula" + ], + "description": "מפרקים את המכנה לגורמים ופוסלים כל ערך שמאפס אחד מהם, עוד לפני שמצמצמים.", + "month": "ינואר", + "questions": [ + { + "question": "מהו תחום ההצבה של $1 / (x² − 9)$?", + "choices": [ + { + "text": "$x ≠ 3$, $x ≠ −3$", + "correct": true + }, + { + "text": "$x ≠ 3$", + "mistake": "missing_neg_root" + }, + { + "text": "$x ≠ 9$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "מהו תחום ההצבה של $2 / (x² − 4x)$?", + "choices": [ + { + "text": "$x ≠ 0$, $x ≠ 4$", + "correct": true + }, + { + "text": "$x ≠ 4$", + "mistake": "divide_by_x" + }, + { + "text": "$x ≠ 0$, $x ≠ −4$", + "mistake": "domain_sign" + } + ] + }, + { + "question": "מהו תחום ההצבה של $5 / (x² + 5x + 6)$?", + "choices": [ + { + "text": "$x ≠ −2$, $x ≠ −3$", + "correct": true + }, + { + "text": "$x ≠ 2$, $x ≠ 3$", + "mistake": "domain_sign" + }, + { + "text": "$x ≠ −6$", + "mistake": "domain_all" + } + ] + }, + { + "question": "מהו תחום ההצבה של $1 / (x² + 4)$?", + "choices": [ + { + "text": "כל $x$", + "correct": true + }, + { + "text": "$x ≠ 2$, $x ≠ −2$", + "mistake": "diffsq_missed" + }, + { + "text": "$x ≠ −4$", + "mistake": "domain_sign" + } + ] + }, + { + "question": "מהו תחום ההצבה של $x / (x² − 6x + 9)$?", + "choices": [ + { + "text": "$x ≠ 3$", + "correct": true + }, + { + "text": "$x ≠ 3$, $x ≠ −3$", + "mistake": "diffsq_as_square" + }, + { + "text": "$x ≠ 0$, $x ≠ 3$", + "mistake": "numerator_domain" + } + ] + }, + { + "question": "מהו תחום ההצבה של $(x + 1) / (2x² − 8)$?", + "choices": [ + { + "text": "$x ≠ 2$, $x ≠ −2$", + "correct": true + }, + { + "text": "$x ≠ 2$", + "mistake": "missing_neg_root" + }, + { + "text": "$x ≠ −1$, $x ≠ 2$, $x ≠ −2$", + "mistake": "numerator_domain" + } + ] + }, + { + "question": "מהו תחום ההצבה של $3 / (x² − x − 12)$?", + "choices": [ + { + "text": "$x ≠ 4$, $x ≠ −3$", + "correct": true + }, + { + "text": "$x ≠ −4$, $x ≠ 3$", + "mistake": "zero_root_sign" + }, + { + "text": "$x ≠ 12$", + "mistake": "domain_all" + } + ] + }, + { + "question": "מהו תחום ההצבה של $1 / (x³ − x)$?", + "choices": [ + { + "text": "$x ≠ 0$, $x ≠ 1$, $x ≠ −1$", + "correct": true + }, + { + "text": "$x ≠ 1$, $x ≠ −1$", + "mistake": "divide_by_x" + }, + { + "text": "$x ≠ 0$, $x ≠ 1$", + "mistake": "missing_neg_root" + } + ] + }, + { + "question": "צמצמו את $x / (x² + 2x)$ וכתבו את תחום ההצבה.", + "choices": [ + { + "text": "$1 / (x + 2)$, כאשר $x ≠ 0$, $x ≠ −2$", + "correct": true + }, + { + "text": "$1 / (x + 2)$, כאשר $x ≠ −2$", + "mistake": "domain_before_reduce" + }, + { + "text": "$1 / (2x)$, כאשר $x ≠ 0$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "מהו תחום ההצבה של $4 / (9 − x²)$?", + "choices": [ + { + "text": "$x ≠ 3$, $x ≠ −3$", + "correct": true + }, + { + "text": "$x ≠ 3$", + "mistake": "missing_neg_root" + }, + { + "text": "$x ≠ 9$", + "mistake": "forgot_root" + } + ] + } + ] + }, + { + "id": "r_solve", + "unit": "r", + "name": "פתרון משוואות רציונליות", + "short": "משוואה רציונלית", + "prereqs": [ + "r_domain" + ], + "description": "קובעים תחום הצבה, כופלים את שני האגפים במכנה המשותף, ופותרים את המשוואה שמתקבלת.", + "month": "ינואר", + "questions": [ + { + "question": "פתרו: $12 / x = 3$", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 36$", + "mistake": "mult_instead" + }, + { + "text": "$x = 1/4$", + "mistake": "inverse" + } + ] + }, + { + "question": "פתרו: $6 / (x − 1) = 2$", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 3.5$", + "mistake": "partial_dist" + }, + { + "text": "$x = 2$", + "mistake": "lost_sign_move" + } + ] + }, + { + "question": "פתרו: $1 / x + 1 / (2x) = 3$", + "choices": [ + { + "text": "$x = 0.5$", + "correct": true + }, + { + "text": "$x = 2/9$", + "mistake": "add_denoms" + }, + { + "text": "$x = 2$", + "mistake": "inverse" + } + ] + }, + { + "question": "פתרו: $x + 6 / x = 5$", + "choices": [ + { + "text": "$x = 2$ או $x = 3$", + "correct": true + }, + { + "text": "אין פתרון", + "mistake": "mult_only_one" + }, + { + "text": "$x = −2$ או $x = −3$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $3 / (x + 2) = 1 / (x − 2)$", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = −2$", + "mistake": "lost_sign_move" + }, + { + "text": "$x = 2$", + "mistake": "lost_sign_move" + } + ] + }, + { + "question": "פתרו: $(x + 3) / x = 4$", + "choices": [ + { + "text": "$x = 1$", + "correct": true + }, + { + "text": "$x = −1$", + "mistake": "lost_sign_move" + }, + { + "text": "$x = 3/5$", + "mistake": "mult_only_one" + } + ] + }, + { + "question": "פתרו: $4 / (x − 3) = x$", + "choices": [ + { + "text": "$x = 4$ או $x = −1$", + "correct": true + }, + { + "text": "$x = 4$", + "mistake": "valid_root_dropped" + }, + { + "text": "$x = −4$ או $x = 1$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $x / (x + 1) = 2/3$", + "choices": [ + { + "text": "$x = 2$", + "correct": true + }, + { + "text": "$x = −2$", + "mistake": "lost_sign_move" + }, + { + "text": "$x = 2/3$", + "mistake": "mult_only_one" + } + ] + }, + { + "question": "פתרו: $5 / (2x) = 1 / (x − 3)$", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = −5$", + "mistake": "lost_sign_move" + }, + { + "text": "$x = 3$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $1 / (x − 1) + 1 / (x + 1) = 4/3$", + "choices": [ + { + "text": "$x = 2$ או $x = −0.5$", + "correct": true + }, + { + "text": "$x = 0.75$", + "mistake": "add_denoms" + }, + { + "text": "$x = 2$", + "mistake": "valid_root_dropped" + } + ] + } + ] + }, + { + "id": "r_excluded", + "unit": "r", + "name": "פתרון שאינו בתחום ההצבה", + "short": "פתרון לא קביל", + "prereqs": [ + "r_solve", + "r_factor" + ], + "description": "אחרי הפתרון בודקים כל פתרון מול תחום ההצבה ופוסלים פתרון שמאפס מכנה.", + "month": "ינואר", + "questions": [ + { + "question": "פתרו: $(x² − 4) / (x − 2) = 0$", + "choices": [ + { + "text": "$x = −2$", + "correct": true + }, + { + "text": "$x = 2$ או $x = −2$", + "mistake": "excluded_root" + }, + { + "text": "$x = 2$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $x / (x − 3) = 3 / (x − 3)$", + "choices": [ + { + "text": "אין פתרון", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "excluded_root" + }, + { + "text": "$x = 0$", + "mistake": "numerator_domain" + } + ] + }, + { + "question": "פתרו: $(x² − 1) / (x + 1) = 0$", + "choices": [ + { + "text": "$x = 1$", + "correct": true + }, + { + "text": "$x = 1$ או $x = −1$", + "mistake": "excluded_root" + }, + { + "text": "$x = −1$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $x² / (x − 5) = 25 / (x − 5)$", + "choices": [ + { + "text": "$x = −5$", + "correct": true + }, + { + "text": "$x = 5$ או $x = −5$", + "mistake": "excluded_root" + }, + { + "text": "$x = 5$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $(x² + x) / x = 5$", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 0$ או $x = 4$", + "mistake": "excluded_root" + }, + { + "text": "$x = 5$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "פתרו: $6 / (x² − 9) = 1 / (x − 3)$", + "choices": [ + { + "text": "אין פתרון", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "excluded_root" + }, + { + "text": "$x = −3$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $x² / (x + 3) = 9 / (x + 3)$", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = 3$ או $x = −3$", + "mistake": "excluded_root" + }, + { + "text": "$x = −3$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $(x² − 3x) / (x − 3) = 3$", + "choices": [ + { + "text": "אין פתרון", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "excluded_root" + }, + { + "text": "$x = 0$", + "mistake": "cancel_terms" + } + ] + }, + { + "question": "פתרו: $1 / (x − 1) = (2x − 3) / (x² − 1)$", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = −4$", + "mistake": "lost_sign_move" + }, + { + "text": "$x = 4$ או $x = 1$", + "mistake": "excluded_root" + } + ] + }, + { + "question": "פתרו: $(x² − 2x − 3) / (x − 3) = 0$", + "choices": [ + { + "text": "$x = −1$", + "correct": true + }, + { + "text": "$x = 3$ או $x = −1$", + "mistake": "excluded_root" + }, + { + "text": "$x = −3$ או $x = 1$", + "mistake": "zero_root_sign" + } + ] + } + ] + }, + { + "id": "m_def", + "unit": "m", + "name": "הגדרת המלבן, צלעות וזוויות", + "short": "הגדרת מלבן", + "prereqs": [ + "g_def" + ], + "description": "מלבן הוא מקבילית שיש בה זווית ישרה, ולכן כל זוויותיו ישרות וצלעותיו הנגדיות שוות.", + "month": "ינואר", + "questions": [ + { + "question": "איזה מרובע נקרא מלבן?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D", + "choices": [ + { + "text": "מקבילית שיש בה זווית ישרה", + "correct": true + }, + { + "text": "מרובע שכל צלעותיו שוות", + "mistake": "rect_vs_rhombus" + }, + { + "text": "מרובע שיש בו זווית ישרה אחת", + "mistake": "three_right" + } + ] + }, + { + "question": "היקף מלבן $26$ ואורכו $8$. מה רוחבו?", + "figure": "_A=0,0; _B=6,0; _C=6,3.6; _D=0,3.6; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; len _A _B 8; len _B _C ?; note P = 26", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$18$", + "mistake": "half_perimeter" + }, + { + "text": "$10$", + "mistake": "half_perimeter" + } + ] + }, + { + "question": "במלבן $ABCD$: $AB = 12$, $BC = 5$. מה $AC$?", + "figure": "A=0,0; B=6,0; C=6,2.5; D=0,2.5; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; len A B 12; len B C 5; lenx A C ?", + "choices": [ + { + "text": "$13$", + "correct": true + }, + { + "text": "$17$", + "mistake": "pyth" + }, + { + "text": "$7$", + "mistake": "pyth" + } + ] + }, + { + "question": "שטח מלבן $48$ ואורכו $8$. מה רוחבו?", + "figure": "_A=0,0; _B=6,0; _C=6,3.6; _D=0,3.6; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; len _A _B 8; len _B _C ?; note S = 48", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$16$", + "mistake": "area_perimeter" + }, + { + "text": "$40$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "במקבילית אחת הזוויות ישרה. מה גודל שאר הזוויות?", + "figure": "_A=0,0; _B=6,0; _C=6,3.6; _D=0,3.6; poly _A _B _C _D; right _B _A _D", + "choices": [ + { + "text": "כולן $90°$", + "correct": true + }, + { + "text": "אי אפשר לדעת", + "mistake": "three_right" + }, + { + "text": "שתיים $90°$ ושתיים $45°$", + "mistake": "par_adjacent" + } + ] + }, + { + "question": "אורך מלבן כפול מרוחבו, והיקפו $36$. מה רוחבו?", + "figure": "_A=0,0; _B=6,0; _C=6,3; _D=0,3; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; len _B _C ?; note P = 36", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$12$", + "mistake": "other_quantity" + }, + { + "text": "$9$", + "mistake": "half_perimeter" + } + ] + }, + { + "question": "מלבן שצלעותיו $6$ ו־$8$. מה אורך האלכסון?", + "figure": "_A=0,0; _B=8,0; _C=8,6; _D=0,6; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; line _A _C; len _A _B 8; len _B _C 6; lenx _A _C ?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$14$", + "mistake": "pyth" + }, + { + "text": "$7$", + "mistake": "pyth" + } + ] + }, + { + "question": "אלכסון מלבן $13$, ואחת מצלעותיו $5$. מה הצלע השנייה?", + "figure": "_A=0,0; _B=12,0; _C=12,5; _D=0,5; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; line _A _C; lenx _A _C 13; len _B _C 5; len _A _B ?", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$8$", + "mistake": "pyth" + }, + { + "text": "$√194$", + "mistake": "pyth" + } + ] + }, + { + "question": "במלבן $ABCD$: $AB = x + 2$, $DC = 2x − 3$. מה $x$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D; right B A D; right C B A; right D C B; right A D C; len A B x + 2; len D C 2x − 3", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 1$", + "mistake": "move_sign" + }, + { + "text": "$x = 1/3$", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "שטח מלבן $60$ והיקפו $34$. מה אורכי צלעותיו?", + "figure": "_A=0,0; _B=6,0; _C=6,3.6; _D=0,3.6; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; note S = 60, P = 34", + "choices": [ + { + "text": "$5$ ו־$12$", + "correct": true + }, + { + "text": "$6$ ו־$10$", + "mistake": "product_check" + }, + { + "text": "$4$ ו־$15$", + "mistake": "product_check" + } + ] + } + ] + }, + { + "id": "m_diag", + "unit": "m", + "name": "אלכסוני המלבן", + "short": "אלכסוני מלבן", + "prereqs": [ + "m_def" + ], + "description": "אלכסוני המלבן שווים וחוצים זה את זה, ולכן מפגש האלכסונים נמצא במרחק שווה מארבעת הקודקודים.", + "month": "פברואר", + "questions": [ + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים) $AC = 10$. מה $BO$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; lenx B O ?; note AC = 10", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "whole_diag" + }, + { + "text": "אי אפשר לדעת", + "mistake": "rect_diag_equal" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים) $∢OAB = 30°$. מה גודל $∢OBA$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang O A B 30°; ang A B O ?", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "rect_iso" + }, + { + "text": "$120°$", + "mistake": "rect_iso" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים) $∢AOB = 120°$. מה גודל $∢OAB$?", + "figure": "A=0,0; B=6,0; C=6,3.46; D=0,3.46; O=3,1.73@n; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang A O B 120°; ang O A B ?", + "choices": [ + { + "text": "$30°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "forgot_half_angle" + }, + { + "text": "$120°$", + "mistake": "rect_iso" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים): $AO = 2x + 1$, $BD = 6x − 4$. מה $x$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; lenx A O 2x + 1; note BD = 6x − 4", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = 1.25$", + "mistake": "whole_diag" + }, + { + "text": "$x = 1.5$", + "mistake": "rect_diag_equal" + } + ] + }, + { + "question": "מה נכון לגבי אלכסוני המלבן?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O", + "choices": [ + { + "text": "הם שווים וחוצים זה את זה", + "correct": true + }, + { + "text": "הם מאונכים וחוצים זה את זה", + "mistake": "rect_vs_rhombus" + }, + { + "text": "הם שווים, אבל לא חוצים זה את זה", + "mistake": "rect_diag_equal" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים) $∢ACB = 35°$. מה גודל $∢AOB$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@n; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang A C B 35°; ang A O B ?", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$110°$", + "mistake": "rect_iso" + }, + { + "text": "$35°$", + "mistake": "rect_iso" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים): $AC = 8$ ו־$∢AOB = 60°$. מה $AB$?", + "figure": "A=0,0; B=3,0; C=3,5.2; D=0,5.2; O=1.5,2.6@n; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang A O B 60°; len A B ?; note AC = 8", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$8$", + "mistake": "whole_diag" + }, + { + "text": "אי אפשר לדעת", + "mistake": "rect_iso" + } + ] + }, + { + "question": "במלבן $ABCD$: $AB = 6$, $BC = 8$, ו־$O$ מפגש האלכסונים. מה $AO$?", + "figure": "A=0,0; B=4.5,0; C=4.5,6; D=0,6; O=2.25,3@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; len A B 6; len B C 8; lenx A O ?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "whole_diag" + }, + { + "text": "$7$", + "mistake": "pyth" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים): $AO + BO + CO + DO = 26$. מה $AC$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; note AO + BO + CO + DO = 26", + "choices": [ + { + "text": "$13$", + "correct": true + }, + { + "text": "$26$", + "mistake": "whole_diag" + }, + { + "text": "$6.5$", + "mistake": "whole_diag" + } + ] + }, + { + "question": "במלבן $ABCD$ ($O$ מפגש האלכסונים) $∢BAC = 40°$. מה גודל $∢AOD$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang B A O 40°; ang A O D ?", + "choices": [ + { + "text": "$80°$", + "correct": true + }, + { + "text": "$100°$", + "mistake": "rect_iso" + }, + { + "text": "$40°$", + "mistake": "rect_iso" + } + ] + } + ] + }, + { + "id": "m_converse", + "unit": "m", + "name": "משפטים הפוכים: מתי מרובע הוא מלבן", + "short": "הוכחת מלבן", + "prereqs": [ + "m_diag" + ], + "description": "מקבילית שיש בה זווית ישרה, או שאלכסוניה שווים, היא מלבן. גם מרובע עם שלוש זוויות ישרות הוא מלבן.", + "month": "פברואר", + "questions": [ + { + "question": "מקבילית שאלכסוניה שווים היא:", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AC = BD", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "מעוין", + "mistake": "rect_vs_rhombus" + }, + { + "text": "לא בהכרח מלבן", + "mistake": "rect_diag_equal" + } + ] + }, + { + "question": "מקבילית שיש בה זווית ישרה היא:", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; note ∢A = 90°", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "לא בהכרח מלבן", + "mistake": "three_right" + } + ] + }, + { + "question": "מרובע שיש בו שלוש זוויות ישרות הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; note ∢A = ∢B = ∢C = 90°", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "לא בהכרח מלבן", + "mistake": "three_right" + }, + { + "text": "ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מרובע שאלכסוניו שווים הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AC = BD", + "choices": [ + { + "text": "לא בהכרח מלבן", + "correct": true + }, + { + "text": "מלבן", + "mistake": "par_trap_iso" + } + ] + }, + { + "question": "מרובע שאלכסוניו שווים וחוצים זה את זה הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AC = BD, AO = OC, BO = OD", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "מעוין", + "mistake": "rect_vs_rhombus" + }, + { + "text": "לא בהכרח מלבן", + "mistake": "par_trap_iso" + } + ] + }, + { + "question": "מקבילית שאלכסוניה מאונכים היא:", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AC ⊥ BD", + "choices": [ + { + "text": "מעוין, לא בהכרח מלבן", + "correct": true + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + } + ] + }, + { + "question": "במקבילית $ABCD$: $AC = 2x + 3$, $BD = 4x − 5$, ו־$x = 4$. מה סוג המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AC = 2x + 3, BD = 4x − 5, x = 4", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "מעוין", + "mistake": "rect_vs_rhombus" + }, + { + "text": "אי אפשר לדעת", + "mistake": "rect_diag_equal" + } + ] + }, + { + "question": "במקבילית $ABCD$: $∢A = ∢B$. מה סוג המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; note ∢A = ∢B", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "מעוין", + "mistake": "rect_vs_rhombus" + }, + { + "text": "אי אפשר לדעת", + "mistake": "par_adjacent" + } + ] + }, + { + "question": "במקבילית $ABCD$ ($O$ מפגש האלכסונים) $AO = BO$. מה סוג המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AO = BO", + "choices": [ + { + "text": "מלבן", + "correct": true + }, + { + "text": "מעוין", + "mistake": "rect_vs_rhombus" + }, + { + "text": "אי אפשר לדעת", + "mistake": "rect_diag_equal" + } + ] + }, + { + "question": "במרובע יש זוג צלעות נגדיות מקבילות וזווית ישרה. האם הוא בהכרח מלבן?", + "figure": "_A=0,0; _B=7,0; _C=4,3; _D=0,3; poly _A _B _C _D; par _A _B 1; par _D _C 1; right _B _A _D", + "choices": [ + { + "text": "לא, ייתכן שהוא טרפז ישר זווית", + "correct": true + }, + { + "text": "כן", + "mistake": "trap_vs_par" + } + ] + } + ] + }, + { + "id": "h_basic", + "unit": "h", + "name": "מושגים בסיסיים וחישוב הסתברות", + "short": "מהי הסתברות", + "prereqs": [], + "description": "כשכל התוצאות שוות סיכוי, ההסתברות היא מספר התוצאות הרצויות חלקי מספר כל התוצאות. היא בין $0$ ל־$1$.", + "month": "ינואר", + "questions": [ + { + "question": "מטילים קובייה. מה ההסתברות לקבל $4$?", + "choices": [ + { + "text": "$1/6$", + "correct": true + }, + { + "text": "$4/6$", + "mistake": "prob_as_count" + }, + { + "text": "$1/4$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "מטילים קובייה. מה ההסתברות לקבל מספר זוגי?", + "choices": [ + { + "text": "$1/2$", + "correct": true + }, + { + "text": "$1/6$", + "mistake": "count_one" + }, + { + "text": "$1/3$", + "mistake": "part_vs_whole" + } + ] + }, + { + "question": "בשקית $3$ כדורים אדומים ו־$5$ כחולים. מוציאים כדור. מה ההסתברות שהוא אדום?", + "choices": [ + { + "text": "$3/8$", + "correct": true + }, + { + "text": "$3/5$", + "mistake": "part_vs_whole" + }, + { + "text": "$1/2$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "מטילים מטבע. מה ההסתברות לקבל „עץ“?", + "choices": [ + { + "text": "$1/2$", + "correct": true + }, + { + "text": "$1$", + "mistake": "guess_cases" + }, + { + "text": "$0$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "מטילים קובייה. מה ההסתברות לקבל מספר גדול מ־$4$?", + "choices": [ + { + "text": "$1/3$", + "correct": true + }, + { + "text": "$1/2$", + "mistake": "guess_cases" + }, + { + "text": "$2/4$", + "mistake": "part_vs_whole" + } + ] + }, + { + "question": "בכיתה $12$ בנים ו־$18$ בנות. בוחרים תלמיד באקראי. מה ההסתברות שזו בת?", + "choices": [ + { + "text": "$3/5$", + "correct": true + }, + { + "text": "$2/3$", + "mistake": "part_vs_whole" + }, + { + "text": "$1/2$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "מה ההסתברות של מאורע ודאי?", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$100$", + "mistake": "prob_as_count" + }, + { + "text": "$0$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "איזה מספר אינו יכול להיות הסתברות?", + "choices": [ + { + "text": "$1.2$", + "correct": true + }, + { + "text": "$0$", + "mistake": "prob_as_count" + }, + { + "text": "$0.5$", + "mistake": "prob_as_count" + } + ] + }, + { + "question": "סביבון מחולק ל־$8$ חלקים שווים, ו־$3$ מהם אדומים. מה ההסתברות שייעצר על אדום?", + "choices": [ + { + "text": "$3/8$", + "correct": true + }, + { + "text": "$3/5$", + "mistake": "part_vs_whole" + }, + { + "text": "$1/3$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "בכד $20$ כדורים ממוספרים מ־$1$ עד $20$. מה ההסתברות להוציא מספר שמתחלק ב־$5$?", + "choices": [ + { + "text": "$1/5$", + "correct": true + }, + { + "text": "$1/4$", + "mistake": "guess_cases" + }, + { + "text": "$5/20$", + "mistake": "count_one" + } + ] + } + ] + }, + { + "id": "h_relfreq", + "unit": "h", + "name": "הסתברות ושכיחות יחסית", + "short": "שכיחות יחסית", + "prereqs": [ + "h_complement" + ], + "description": "שכיחות יחסית היא מספר ההופעות חלקי מספר הניסויים. כשמספר הניסויים גדל, היא מתקרבת להסתברות.", + "month": "ינואר", + "questions": [ + { + "question": "הטילו קובייה $60$ פעם וקיבלו $6$ ב־$12$ מהן. מה השכיחות היחסית של $6$?", + "choices": [ + { + "text": "$0.2$", + "correct": true + }, + { + "text": "$1/6$", + "mistake": "relfreq_vs_prob" + }, + { + "text": "$12$", + "mistake": "freq_abs" + } + ] + }, + { + "question": "הטילו מטבע $200$ פעם וקיבלו „עץ“ $92$ פעמים. מה השכיחות היחסית של „עץ“?", + "choices": [ + { + "text": "$0.46$", + "correct": true + }, + { + "text": "$0.5$", + "mistake": "relfreq_vs_prob" + }, + { + "text": "$92$", + "mistake": "freq_abs" + } + ] + }, + { + "question": "מה קורה לשכיחות היחסית כשמספר הניסויים גדל מאוד?", + "choices": [ + { + "text": "היא מתקרבת להסתברות", + "correct": true + }, + { + "text": "היא שווה בדיוק להסתברות", + "mistake": "relfreq_vs_prob" + }, + { + "text": "היא גדלה כל הזמן", + "mistake": "freq_abs" + } + ] + }, + { + "question": "הסתברות שמוצר פגום היא $0.02$. כמה מוצרים פגומים צפויים מתוך $1500$?", + "choices": [ + { + "text": "$30$", + "correct": true + }, + { + "text": "$300$", + "mistake": "decimal_error" + }, + { + "text": "$0.02$", + "mistake": "prob_as_count" + } + ] + }, + { + "question": "השכיחות היחסית של תוצאה ב־$50$ ניסויים היא $0.3$. כמה פעמים היא הופיעה?", + "choices": [ + { + "text": "$15$", + "correct": true + }, + { + "text": "$3$", + "mistake": "decimal_error" + }, + { + "text": "$35$", + "mistake": "complement" + } + ] + }, + { + "question": "ההסתברות לגשם ביום חורף היא $0.4$. בכמה ימים מתוך $30$ צפוי גשם?", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$4$", + "mistake": "decimal_error" + }, + { + "text": "$18$", + "mistake": "complement" + } + ] + }, + { + "question": "איך מחשבים שכיחות יחסית?", + "choices": [ + { + "text": "מספר ההופעות חלקי מספר הניסויים", + "correct": true + }, + { + "text": "מספר הניסויים חלקי מספר ההופעות", + "mistake": "ratio_flipped" + }, + { + "text": "מספר ההופעות בלבד", + "mistake": "freq_abs" + } + ] + }, + { + "question": "מטילים קובייה $600$ פעם. כמה פעמים צפוי לצאת $3$?", + "choices": [ + { + "text": "$100$", + "correct": true + }, + { + "text": "$200$", + "mistake": "decimal_error" + }, + { + "text": "$1/6$", + "mistake": "prob_as_count" + } + ] + }, + { + "question": "שכיחות יחסית של תוצאה היא $0.25$, והיא הופיעה $20$ פעם. כמה ניסויים נערכו?", + "choices": [ + { + "text": "$80$", + "correct": true + }, + { + "text": "$5$", + "mistake": "ratio_flipped" + }, + { + "text": "$20$", + "mistake": "freq_abs" + } + ] + }, + { + "question": "מתוך $40$ זריקות לסל $28$ נכנסו. מה השכיחות היחסית של החטאה?", + "choices": [ + { + "text": "$0.3$", + "correct": true + }, + { + "text": "$0.7$", + "mistake": "complement" + }, + { + "text": "$12$", + "mistake": "freq_abs" + } + ] + } + ] + }, + { + "id": "h_complement", + "unit": "h", + "name": "מאורע משלים", + "short": "מאורע משלים", + "prereqs": [ + "h_basic" + ], + "description": "ההסתברות שמאורע לא יקרה היא $1 − P(A)$.", + "month": "ינואר", + "questions": [ + { + "question": "ההסתברות לגשם מחר $0.35$. מה ההסתברות שלא ירד גשם?", + "choices": [ + { + "text": "$0.65$", + "correct": true + }, + { + "text": "$0.35$", + "mistake": "complement" + }, + { + "text": "$0.75$", + "mistake": "decimal_error" + } + ] + }, + { + "question": "מטילים קובייה. מה ההסתברות לא לקבל $6$?", + "choices": [ + { + "text": "$5/6$", + "correct": true + }, + { + "text": "$1/6$", + "mistake": "complement" + }, + { + "text": "$6/5$", + "mistake": "ratio_flipped" + } + ] + }, + { + "question": "$P(A) = 2/7$. מה ההסתברות של המאורע המשלים?", + "choices": [ + { + "text": "$5/7$", + "correct": true + }, + { + "text": "$2/7$", + "mistake": "complement" + }, + { + "text": "$7/2$", + "mistake": "ratio_flipped" + } + ] + }, + { + "question": "מטילים קובייה. מה ההסתברות לקבל מספר שאינו ראשוני?", + "choices": [ + { + "text": "$1/2$", + "correct": true + }, + { + "text": "$1/3$", + "mistake": "complement" + }, + { + "text": "$2/3$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "בשקית $4$ כדורים אדומים ו־$6$ ירוקים. מה ההסתברות להוציא כדור שאינו אדום?", + "choices": [ + { + "text": "$3/5$", + "correct": true + }, + { + "text": "$2/5$", + "mistake": "complement" + }, + { + "text": "$2/3$", + "mistake": "part_vs_whole" + } + ] + }, + { + "question": "$P(A) = 0.8$. מה ההסתברות של המשלים של $A$?", + "choices": [ + { + "text": "$0.2$", + "correct": true + }, + { + "text": "$0.8$", + "mistake": "complement" + }, + { + "text": "$1.8$", + "mistake": "complement" + } + ] + }, + { + "question": "במשחק ההסתברות להפסיד $0.15$ ולתיקו $0.25$. מה ההסתברות לנצח?", + "choices": [ + { + "text": "$0.6$", + "correct": true + }, + { + "text": "$0.85$", + "mistake": "complement" + }, + { + "text": "$0.4$", + "mistake": "part_vs_whole" + } + ] + }, + { + "question": "מה סכום ההסתברויות של מאורע ושל המשלים שלו?", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$0.5$", + "mistake": "complement" + }, + { + "text": "$0$", + "mistake": "complement" + } + ] + }, + { + "question": "ההסתברות שמאורע לא יקרה גדולה פי $3$ מההסתברות שיקרה. מה ההסתברות שיקרה?", + "choices": [ + { + "text": "$1/4$", + "correct": true + }, + { + "text": "$1/3$", + "mistake": "complement" + }, + { + "text": "$3/4$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "מטילים מטבע פעמיים. מה ההסתברות לקבל „עץ“ לפחות פעם אחת?", + "choices": [ + { + "text": "$3/4$", + "correct": true + }, + { + "text": "$1/2$", + "mistake": "both_vs_atleast" + }, + { + "text": "$1/4$", + "mistake": "complement" + } + ] + } + ] + }, + { + "id": "h_two_stage", + "unit": "h", + "name": "מאורעות דו־שלביים", + "short": "דו־שלביים", + "prereqs": [ + "h_basic" + ], + "description": "בניסוי דו־שלבי כופלים את ההסתברויות לאורך המסלול, ומחברים מסלולים שונים שמובילים לאותו מאורע.", + "month": "פברואר", + "questions": [ + { + "question": "מטילים מטבע פעמיים. מה ההסתברות לקבל „עץ“ בשתי ההטלות?", + "choices": [ + { + "text": "$1/4$", + "correct": true + }, + { + "text": "$1/2$", + "mistake": "one_stage" + }, + { + "text": "$1$", + "mistake": "prob_add" + } + ] + }, + { + "question": "מטילים קובייה ומטבע. מה ההסתברות לקבל $6$ ו„עץ“?", + "choices": [ + { + "text": "$1/12$", + "correct": true + }, + { + "text": "$2/3$", + "mistake": "prob_add" + }, + { + "text": "$1/6$", + "mistake": "one_stage" + } + ] + }, + { + "question": "בשקית $3$ כדורים אדומים ו־$2$ כחולים. מוציאים כדור, מחזירים ומוציאים שוב. מה ההסתברות לשני אדומים?", + "choices": [ + { + "text": "$9/25$", + "correct": true + }, + { + "text": "$3/10$", + "mistake": "with_replace" + }, + { + "text": "$3/5$", + "mistake": "one_stage" + } + ] + }, + { + "question": "בשקית $3$ כדורים אדומים ו־$2$ כחולים. מוציאים שני כדורים בלי החזרה. מה ההסתברות ששניהם אדומים?", + "choices": [ + { + "text": "$3/10$", + "correct": true + }, + { + "text": "$9/25$", + "mistake": "no_replace" + }, + { + "text": "$3/5$", + "mistake": "one_stage" + } + ] + }, + { + "question": "מטילים שתי קוביות. מה ההסתברות שסכומן $7$?", + "choices": [ + { + "text": "$1/6$", + "correct": true + }, + { + "text": "$1/36$", + "mistake": "count_one" + }, + { + "text": "$7/36$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "מטילים שתי קוביות. מה ההסתברות לקבל $6$ בשתיהן?", + "choices": [ + { + "text": "$1/36$", + "correct": true + }, + { + "text": "$1/3$", + "mistake": "prob_add" + }, + { + "text": "$1/6$", + "mistake": "one_stage" + } + ] + }, + { + "question": "מטילים שתי קוביות. מה ההסתברות לקבל $6$ לפחות פעם אחת?", + "choices": [ + { + "text": "$11/36$", + "correct": true + }, + { + "text": "$1/3$", + "mistake": "double_count" + }, + { + "text": "$1/36$", + "mistake": "both_vs_atleast" + } + ] + }, + { + "question": "מטילים מטבע פעמיים. מה ההסתברות לקבל „עץ“ אחד ו„פלי“ אחד (בכל סדר)?", + "choices": [ + { + "text": "$1/2$", + "correct": true + }, + { + "text": "$1/4$", + "mistake": "count_one" + }, + { + "text": "$1/3$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "בשקית $2$ כדורים אדומים ו־$3$ כחולים. מוציאים שניים בלי החזרה. מה ההסתברות לכחול ואחריו אדום?", + "choices": [ + { + "text": "$3/10$", + "correct": true + }, + { + "text": "$6/25$", + "mistake": "no_replace" + }, + { + "text": "$1$", + "mistake": "prob_add" + } + ] + }, + { + "question": "ההסתברות שרמזור ירוק היא $0.4$, ושני רמזורים פועלים בנפרד. מה ההסתברות ששניהם ירוקים?", + "choices": [ + { + "text": "$0.16$", + "correct": true + }, + { + "text": "$0.8$", + "mistake": "prob_add" + }, + { + "text": "$0.4$", + "mistake": "one_stage" + } + ] + } + ] + }, + { + "id": "h_reps", + "unit": "h", + "name": "ייצוגים: טבלה, דיאגרמת עץ ומודל השטח", + "short": "ייצוגי הסתברות", + "prereqs": [ + "h_two_stage" + ], + "description": "טבלה מתאימה לשני שלבים עם תוצאות שוות סיכוי, דיאגרמת עץ להסתברויות שונות בכל שלב, ומודל השטח ליחס בין שטחים.", + "month": "פברואר", + "questions": [ + { + "question": "בטבלת התוצאות של הטלת שתי קוביות, כמה תאים יש?", + "choices": [ + { + "text": "$36$", + "correct": true + }, + { + "text": "$12$", + "mistake": "prob_add" + }, + { + "text": "$6$", + "mistake": "one_stage" + } + ] + }, + { + "question": "בדיאגרמת עץ להטלת מטבע $3$ פעמים, כמה מסלולים יש?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$6$", + "mistake": "prob_add" + }, + { + "text": "$3$", + "mistake": "one_stage" + } + ] + }, + { + "question": "בתוך ריבוע שצלעו $10$ יש ריבוע שצלעו $5$. בוחרים נקודה אקראית בריבוע הגדול. מה ההסתברות שהיא בריבוע הקטן?", + "choices": [ + { + "text": "$1/4$", + "correct": true + }, + { + "text": "$1/2$", + "mistake": "length_vs_area" + }, + { + "text": "$5/10$", + "mistake": "length_vs_area" + } + ] + }, + { + "question": "בדיאגרמת עץ, הענף הראשון במסלול $0.3$ והשני $0.5$. מה ההסתברות של המסלול?", + "choices": [ + { + "text": "$0.15$", + "correct": true + }, + { + "text": "$0.8$", + "mistake": "prob_add" + }, + { + "text": "$0.5$", + "mistake": "one_stage" + } + ] + }, + { + "question": "בטבלת שתי קוביות, בכמה תאים הסכום הוא $8$?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$1$", + "mistake": "count_one" + }, + { + "text": "$8$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "מה סכום ההסתברויות על הענפים שיוצאים מנקודה אחת בעץ?", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "תלוי בעץ", + "mistake": "prob_add" + }, + { + "text": "$0.5$", + "mistake": "guess_cases" + } + ] + }, + { + "question": "בכיתה $12$ בנים ($5$ מהם משחקים כדורגל) ו־$18$ בנות ($3$ מהן משחקות). מה ההסתברות שתלמיד אקראי הוא בן שמשחק כדורגל?", + "choices": [ + { + "text": "$1/6$", + "correct": true + }, + { + "text": "$5/12$", + "mistake": "part_vs_whole" + }, + { + "text": "$4/15$", + "mistake": "read_table" + } + ] + }, + { + "question": "בכיתה $12$ בנים ($5$ מהם משחקים כדורגל) ו־$18$ בנות ($3$ מהן משחקות). מה ההסתברות שתלמיד אקראי משחק כדורגל?", + "choices": [ + { + "text": "$4/15$", + "correct": true + }, + { + "text": "$1/6$", + "mistake": "read_table" + }, + { + "text": "$8/12$", + "mistake": "part_vs_whole" + } + ] + }, + { + "question": "מטרה עגולה ברדיוס $10$, ובמרכזה עיגול ברדיוס $5$. מה ההסתברות שחץ אקראי שפוגע במטרה יפגע בעיגול הפנימי?", + "choices": [ + { + "text": "$1/4$", + "correct": true + }, + { + "text": "$1/2$", + "mistake": "length_vs_area" + }, + { + "text": "$1/5$", + "mistake": "length_vs_area" + } + ] + }, + { + "question": "בשקית $2$ כדורים אדומים וכחול אחד. מוציאים פעמיים עם החזרה. לפי דיאגרמת עץ, מה ההסתברות לאדום ואחריו כחול?", + "choices": [ + { + "text": "$2/9$", + "correct": true + }, + { + "text": "$1$", + "mistake": "prob_add" + }, + { + "text": "$2/3$", + "mistake": "one_stage" + } + ] + } + ] + }, + { + "id": "s_algebra", + "unit": "s", + "name": "פתרון אלגברי בהצבה", + "short": "פתרון בהצבה", + "prereqs": [ + "q_formula" + ], + "description": "מבודדים משתנה ממשוואה אחת, מציבים בשנייה, פותרים את המשוואה הריבועית ומוצאים את המשתנה השני לכל פתרון.", + "month": "פברואר", + "questions": [ + { + "question": "פתרו: $x + y = 5$, $xy = 6$", + "choices": [ + { + "text": "$(2, 3)$ ו־$(3, 2)$", + "correct": true + }, + { + "text": "$(2, 3)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(1, 6)$ ו־$(6, 1)$", + "mistake": "product_check" + } + ] + }, + { + "question": "פתרו: $y = x + 1$, $x² + y = 7$", + "choices": [ + { + "text": "$(2, 3)$ ו־$(−3, −2)$", + "correct": true + }, + { + "text": "$(2, 3)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(−2, −1)$ ו־$(3, 4)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $y = 2x$, $x² + y² = 20$", + "choices": [ + { + "text": "$(2, 4)$ ו־$(−2, −4)$", + "correct": true + }, + { + "text": "$(2, 4)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(2, −4)$ ו־$(−2, 4)$", + "mistake": "y_sign" + } + ] + }, + { + "question": "פתרו: $x − y = 1$, $xy = 12$", + "choices": [ + { + "text": "$(4, 3)$ ו־$(−3, −4)$", + "correct": true + }, + { + "text": "$(4, 3)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(3, 4)$ ו־$(−4, −3)$", + "mistake": "check_both" + } + ] + }, + { + "question": "איזה זוג פותר את המערכת $y = x²$, $y = x + 2$?", + "choices": [ + { + "text": "$(2, 4)$", + "correct": true + }, + { + "text": "$(1, 1)$", + "mistake": "check_both" + }, + { + "text": "$(2, 3)$", + "mistake": "check_both" + } + ] + }, + { + "question": "פתרו: $y = x² − 3$, $y = 2x$", + "choices": [ + { + "text": "$(3, 6)$ ו־$(−1, −2)$", + "correct": true + }, + { + "text": "$(3, 6)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(−3, −6)$ ו־$(1, 2)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $x + y = 7$, $x² + y² = 25$", + "choices": [ + { + "text": "$(3, 4)$ ו־$(4, 3)$", + "correct": true + }, + { + "text": "$(3, 4)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(5, 0)$ ו־$(0, 5)$", + "mistake": "check_both" + } + ] + }, + { + "question": "פתרו: $y = x² + 1$, $y = 2x + 4$", + "choices": [ + { + "text": "$(3, 10)$ ו־$(−1, 2)$", + "correct": true + }, + { + "text": "$(3, 10)$ ו־$(−1, 0)$", + "mistake": "y_sign" + }, + { + "text": "$(−3, 10)$ ו־$(1, 2)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $y = x² − 2$, $y = x$", + "choices": [ + { + "text": "$(2, 2)$ ו־$(−1, −1)$", + "correct": true + }, + { + "text": "$(2, 2)$ ו־$(−1, 1)$", + "mistake": "y_sign" + }, + { + "text": "$(−2, −2)$ ו־$(1, 1)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "פתרו: $y = 4 − x²$, $y = x + 2$", + "choices": [ + { + "text": "$(1, 3)$ ו־$(−2, 0)$", + "correct": true + }, + { + "text": "$(1, 3)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(−1, 1)$ ו־$(2, 4)$", + "mistake": "zero_root_sign" + } + ] + } + ] + }, + { + "id": "s_line_parab", + "unit": "s", + "name": "חיתוך פרבולה וישר", + "short": "פרבולה וישר", + "prereqs": [ + "s_algebra" + ], + "description": "נקודות החיתוך של פרבולה וישר הן פתרונות המערכת. משווים את הביטויים ופותרים משוואה ריבועית.", + "month": "פברואר", + "questions": [ + { + "question": "מהן נקודות החיתוך של $y = x²$ ו־$y = 2x + 3$?", + "choices": [ + { + "text": "$(3, 9)$ ו־$(−1, 1)$", + "correct": true + }, + { + "text": "$(3, 9)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(−3, 9)$ ו־$(1, 1)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² − 4$ ו־$y = 3x$?", + "choices": [ + { + "text": "$(4, 12)$ ו־$(−1, −3)$", + "correct": true + }, + { + "text": "$(4, 12)$ ו־$(−1, 3)$", + "mistake": "y_sign" + }, + { + "text": "$(−4, −12)$ ו־$(1, 3)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "כמה נקודות חיתוך יש ל־$y = x²$ ול־$y = −1$?", + "choices": [ + { + "text": "אף אחת", + "correct": true + }, + { + "text": "שתיים", + "mistake": "vertex_height" + }, + { + "text": "אחת", + "mistake": "vertex_height" + } + ] + }, + { + "question": "כמה נקודות חיתוך יש ל־$y = x² + 2$ ול־$y = 2$?", + "choices": [ + { + "text": "אחת", + "correct": true + }, + { + "text": "שתיים", + "mistake": "vertex_height" + }, + { + "text": "אף אחת", + "mistake": "vertex_height" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = −x² + 5$ ו־$y = 1$?", + "choices": [ + { + "text": "$(2, 1)$ ו־$(−2, 1)$", + "correct": true + }, + { + "text": "$(2, 1)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(1, 2)$ ו־$(1, −2)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² − 2x$ ו־$y = x$?", + "choices": [ + { + "text": "$(0, 0)$ ו־$(3, 3)$", + "correct": true + }, + { + "text": "$(3, 3)$ בלבד", + "mistake": "divide_by_x" + }, + { + "text": "$(0, 0)$ ו־$(−3, −3)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² + x − 2$ ו־$y = x + 2$?", + "choices": [ + { + "text": "$(2, 4)$ ו־$(−2, 0)$", + "correct": true + }, + { + "text": "$(2, 4)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(2, 4)$ ו־$(−2, 4)$", + "mistake": "y_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = 2x²$ ו־$y = 8$?", + "choices": [ + { + "text": "$(2, 8)$ ו־$(−2, 8)$", + "correct": true + }, + { + "text": "$(2, 8)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(4, 8)$ ו־$(−4, 8)$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "עבור איזה $k$ הישר $y = k$ חותך את $y = (x − 1)² + 3$ בנקודה אחת בלבד?", + "choices": [ + { + "text": "$k = 3$", + "correct": true + }, + { + "text": "$k = 1$", + "mistake": "vertex_height" + }, + { + "text": "$k = 0$", + "mistake": "vertex_height" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = −x² + 4x$ ו־$y = x$?", + "choices": [ + { + "text": "$(0, 0)$ ו־$(3, 3)$", + "correct": true + }, + { + "text": "$(3, 3)$ בלבד", + "mistake": "divide_by_x" + }, + { + "text": "$(0, 0)$ ו־$(4, 0)$", + "mistake": "check_both" + } + ] + } + ] + }, + { + "id": "s_two_parab", + "unit": "s", + "name": "חיתוך שתי פרבולות", + "short": "שתי פרבולות", + "prereqs": [ + "s_line_parab" + ], + "description": "משווים את שני הביטויים הריבועיים; לעתים $x²$ מתבטל ומתקבלת משוואה ממעלה ראשונה.", + "month": "פברואר", + "questions": [ + { + "question": "מהן נקודות החיתוך של $y = x²$ ו־$y = −x² + 8$?", + "choices": [ + { + "text": "$(2, 4)$ ו־$(−2, 4)$", + "correct": true + }, + { + "text": "$(2, 4)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(4, 16)$ ו־$(−4, 16)$", + "mistake": "forgot_divide" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² + 2x$ ו־$y = x² + 6$?", + "choices": [ + { + "text": "$(3, 15)$", + "correct": true + }, + { + "text": "$(3, 15)$ ו־$(−3, 3)$", + "mistake": "one_solution" + }, + { + "text": "$(3, 6)$", + "mistake": "y_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = 2x² − 3$ ו־$y = x² + 1$?", + "choices": [ + { + "text": "$(2, 5)$ ו־$(−2, 5)$", + "correct": true + }, + { + "text": "$(2, 5)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(4, 17)$ ו־$(−4, 17)$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² − 4x$ ו־$y = −x² + 4x$?", + "choices": [ + { + "text": "$(0, 0)$ ו־$(4, 0)$", + "correct": true + }, + { + "text": "$(4, 0)$ בלבד", + "mistake": "divide_by_x" + }, + { + "text": "$(0, 0)$ ו־$(−4, 0)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "כמה נקודות חיתוך יש ל־$y = x² + 3$ ול־$y = −x² + 1$?", + "choices": [ + { + "text": "אף אחת", + "correct": true + }, + { + "text": "שתיים", + "mistake": "sys_meaning" + }, + { + "text": "אחת", + "mistake": "sys_meaning" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² − 1$ ו־$y = 3 − x²$?", + "choices": [ + { + "text": "$(√2, 1)$ ו־$(−√2, 1)$", + "correct": true + }, + { + "text": "$(2, 3)$ ו־$(−2, 3)$", + "mistake": "forgot_divide" + }, + { + "text": "$(√2, 1)$ בלבד", + "mistake": "missing_neg_root" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² + x$ ו־$y = 2x² − x$?", + "choices": [ + { + "text": "$(0, 0)$ ו־$(2, 6)$", + "correct": true + }, + { + "text": "$(2, 6)$ בלבד", + "mistake": "divide_by_x" + }, + { + "text": "$(0, 0)$ ו־$(−2, 2)$", + "mistake": "zero_root_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = (x − 1)²$ ו־$y = (x + 1)²$?", + "choices": [ + { + "text": "$(0, 1)$", + "correct": true + }, + { + "text": "$(1, 0)$ ו־$(−1, 0)$", + "mistake": "vertex_as_root" + }, + { + "text": "אין נקודות חיתוך", + "mistake": "sys_meaning" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² − 5$ ו־$y = −2x² + 7$?", + "choices": [ + { + "text": "$(2, −1)$ ו־$(−2, −1)$", + "correct": true + }, + { + "text": "$(2, −1)$ בלבד", + "mistake": "missing_neg_root" + }, + { + "text": "$(2, 1)$ ו־$(−2, 1)$", + "mistake": "y_sign" + } + ] + }, + { + "question": "מהן נקודות החיתוך של $y = x² + 4x + 1$ ו־$y = x² + 2x + 5$?", + "choices": [ + { + "text": "$(2, 13)$", + "correct": true + }, + { + "text": "$(2, 13)$ ו־$(−2, −3)$", + "mistake": "one_solution" + }, + { + "text": "$(−2, −3)$", + "mistake": "lost_sign_move" + } + ] + } + ] + }, + { + "id": "s_meaning", + "unit": "s", + "name": "משמעות גרפית של פתרון מערכת", + "short": "משמעות גרפית", + "prereqs": [ + "s_line_parab" + ], + "description": "כל פתרון של המערכת הוא נקודה משותפת לשני הגרפים; מספר הפתרונות הוא מספר נקודות החיתוך.", + "month": "פברואר", + "questions": [ + { + "question": "לפי הגרף של $f(x) = x² − 2x − 3$, כמה פתרונות יש למערכת $y = f(x)$, $y = −4$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "פתרון אחד", + "correct": true + }, + { + "text": "שני פתרונות", + "mistake": "vertex_height" + }, + { + "text": "אין פתרון", + "mistake": "vertex_height" + } + ] + }, + { + "question": "לפי הגרף של $f(x) = x² − 2x − 3$, כמה פתרונות יש למערכת $y = f(x)$, $y = 0$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "שני פתרונות", + "correct": true + }, + { + "text": "פתרון אחד", + "mistake": "sys_meaning" + }, + { + "text": "אין פתרון", + "mistake": "sys_meaning" + } + ] + }, + { + "question": "לפי הגרף של $f(x) = x² − 2x − 3$, כמה פתרונות יש למערכת $y = f(x)$, $y = −5$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "אין פתרון", + "correct": true + }, + { + "text": "פתרון אחד", + "mistake": "vertex_height" + }, + { + "text": "שני פתרונות", + "mistake": "sys_meaning" + } + ] + }, + { + "question": "לפי הגרף של $f(x) = x² − 2x − 3$, מהם הפתרונות של המערכת $y = f(x)$, $y = −3$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$(0, −3)$ ו־$(2, −3)$", + "correct": true + }, + { + "text": "$(0, −3)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(−3, 0)$ ו־$(−3, 2)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "מה המשמעות הגרפית של פתרון מערכת של פרבולה וישר?", + "choices": [ + { + "text": "נקודה שבה הפרבולה והישר נפגשים", + "correct": true + }, + { + "text": "נקודה שבה הפרבולה חותכת את ציר $x$", + "mistake": "sys_meaning" + }, + { + "text": "הקודקוד של הפרבולה", + "mistake": "sys_meaning" + } + ] + }, + { + "question": "למערכת של פרבולה וישר אין פתרון. מה אפשר לומר על הגרפים?", + "choices": [ + { + "text": "הם לא נפגשים", + "correct": true + }, + { + "text": "הם משיקים", + "mistake": "sys_meaning" + }, + { + "text": "הישר עובר בקודקוד", + "mistake": "vertex_height" + } + ] + }, + { + "question": "כמה פתרונות לכל היותר יכולים להיות למערכת של פרבולה וישר?", + "choices": [ + { + "text": "שניים", + "correct": true + }, + { + "text": "אחד", + "mistake": "sys_meaning" + }, + { + "text": "ארבעה", + "mistake": "sys_meaning" + } + ] + }, + { + "question": "הישר $y = 5$ והפרבולה $y = −x² + 5$. כמה נקודות משותפות להם?", + "choices": [ + { + "text": "אחת", + "correct": true + }, + { + "text": "שתיים", + "mistake": "vertex_height" + }, + { + "text": "אף אחת", + "mistake": "vertex_height" + } + ] + }, + { + "question": "לפי הגרף של $f(x) = x² − 2x − 3$, מה הפתרונות של המערכת $y = f(x)$, $y = 5$?", + "graph": { + "points": [ + [ + -2, + 5 + ], + [ + -1, + 0 + ], + [ + 0, + -3 + ], + [ + 1, + -4 + ], + [ + 2, + -3 + ], + [ + 3, + 0 + ], + [ + 4, + 5 + ] + ], + "x": [ + -2.5, + 4.5 + ], + "y": [ + -4.5, + 5.5 + ] + }, + "choices": [ + { + "text": "$(−2, 5)$ ו־$(4, 5)$", + "correct": true + }, + { + "text": "$(4, 5)$ בלבד", + "mistake": "one_solution" + }, + { + "text": "$(5, −2)$ ו־$(5, 4)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "הפרבולות $y = x²$ ו־$y = x² + 1$. כמה נקודות משותפות להן?", + "choices": [ + { + "text": "אף אחת", + "correct": true + }, + { + "text": "אחת", + "mistake": "sys_meaning" + }, + { + "text": "שתיים", + "mistake": "sys_meaning" + } + ] + } + ] + }, + { + "id": "n_points", + "unit": "n", + "name": "חיתוך עם הצירים, חיוביות ושליליות", + "short": "חיתוך וחיוביות", + "prereqs": [], + "description": "חיתוך עם ציר $x$: נקודות שבהן $y = 0$. חיתוך עם ציר $y$: הנקודה שבה $x = 0$. הפונקציה חיובית היכן שהגרף מעל ציר $x$.", + "month": "מרץ", + "questions": [ + { + "question": "לפי הגרף, מהן נקודות החיתוך עם ציר $x$?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$(−3, 0)$, $(1, 0)$, $(3, 0)$", + "correct": true + }, + { + "text": "$(0, −1.5)$", + "mistake": "axes_mixed" + }, + { + "text": "$(−1, −2)$ ו־$(2, 1.5)$", + "mistake": "vertex_as_root" + } + ] + }, + { + "question": "לפי הגרף, מהי נקודת החיתוך עם ציר $y$?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$(0, −1.5)$", + "correct": true + }, + { + "text": "$(−1.5, 0)$", + "mistake": "swapped_pair" + }, + { + "text": "$(1, 0)$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "לפי הגרף, באילו תחומים הפונקציה חיובית?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$−4 ≤ x < −3$ ו־$1 < x < 3$", + "correct": true + }, + { + "text": "$−3 < x < 1$ ו־$3 < x ≤ 4$", + "mistake": "pos_neg_swap" + }, + { + "text": "$x > 0$", + "mistake": "neg_x" + } + ] + }, + { + "question": "לפי הגרף, באילו תחומים הפונקציה שלילית?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$−3 < x < 1$ ו־$3 < x ≤ 4$", + "correct": true + }, + { + "text": "$−4 ≤ x < −3$ ו־$1 < x < 3$", + "mistake": "pos_neg_swap" + }, + { + "text": "$−2 ≤ y < 0$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, כמה נקודות חיתוך עם ציר $x$ יש לפונקציה?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$3$", + "correct": true + }, + { + "text": "$2$", + "mistake": "count_all" + }, + { + "text": "$1$", + "mistake": "axes_mixed" + } + ] + }, + { + "question": "לפי הגרף, מהי נקודת החיתוך עם ציר $y$?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$(0, 1.5)$", + "correct": true + }, + { + "text": "$(1, 0)$", + "mistake": "axes_mixed" + }, + { + "text": "$(1.5, 0)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "לפי הגרף, באילו תחומים הפונקציה חיובית?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$−2 < x < 1$ ו־$x > 3$", + "correct": true + }, + { + "text": "$x < −2$ ו־$1 < x < 3$", + "mistake": "pos_neg_swap" + }, + { + "text": "$0 < y < 4$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, באילו תחומים הפונקציה שלילית?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$x < −2$ ו־$1 < x < 3$", + "correct": true + }, + { + "text": "$−2 < x < 1$ ו־$x > 3$", + "mistake": "pos_neg_swap" + }, + { + "text": "$x < 0$", + "mistake": "neg_x" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה חיובית?", + "graph": { + "points": [ + [ + -3, + -2 + ], + [ + 0, + 0 + ], + [ + 3, + 2 + ] + ], + "x": [ + -3.5, + 3.5 + ], + "y": [ + -2.5, + 2.5 + ] + }, + "choices": [ + { + "text": "$x > 0$", + "correct": true + }, + { + "text": "$y > 0$", + "mistake": "x_vs_y_interval" + }, + { + "text": "$x < 0$", + "mistake": "pos_neg_swap" + } + ] + }, + { + "question": "לפונקציה נקודת חיתוך עם ציר $x$ ב־$(5, 0)$. מה $f(5)$?", + "choices": [ + { + "text": "$0$", + "correct": true + }, + { + "text": "$5$", + "mistake": "swapped_pair" + }, + { + "text": "אי אפשר לדעת", + "mistake": "axes_mixed" + } + ] + } + ] + }, + { + "id": "n_extremum", + "unit": "n", + "name": "נקודות קיצון, עלייה וירידה", + "short": "קיצון ועלייה", + "prereqs": [ + "n_points" + ], + "description": "נקודת קיצון היא זוג סדור; ערך המקסימום או המינימום הוא שיעור ה־$y$ שלה. בין נקודות הקיצון הפונקציה עולה או יורדת.", + "month": "מרץ", + "questions": [ + { + "question": "לפי הגרף, מהי נקודת המקסימום המקומי?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$(2, 1.5)$", + "correct": true + }, + { + "text": "$(1.5, 2)$", + "mistake": "swapped_pair" + }, + { + "text": "$(−1, −2)$", + "mistake": "max_vs_min" + } + ] + }, + { + "question": "לפי הגרף, מה ערך המינימום המקומי?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$−2$", + "correct": true + }, + { + "text": "$−1$", + "mistake": "x_as_value" + }, + { + "text": "$(−1, −2)$", + "mistake": "value_vs_point" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה עולה?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$−1 < x < 2$", + "correct": true + }, + { + "text": "$−4 < x < −1$ ו־$2 < x < 4$", + "mistake": "dir_confusion" + }, + { + "text": "$−2 < y < 1.5$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, האם $(2, 1.5)$ היא נקודת מקסימום מוחלט?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "לא, הנקודה $(−4, 3)$ גבוהה ממנה", + "correct": true + }, + { + "text": "כן", + "mistake": "local_as_abs" + }, + { + "text": "כן, כי הגרף יורד אחריה", + "mistake": "abs_vs_local" + } + ] + }, + { + "question": "לפי הגרף, מהי נקודת המקסימום המקומי, ומה ערכו?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$(−1, 2)$, הערך $2$", + "correct": true + }, + { + "text": "$(−1, 2)$, הערך $−1$", + "mistake": "x_as_value" + }, + { + "text": "$(2, −2)$, הערך $−2$", + "mistake": "max_vs_min" + } + ] + }, + { + "question": "לפי הגרף, באיזה תחום הפונקציה יורדת?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$−1 < x < 2$", + "correct": true + }, + { + "text": "$x < −1$ ו־$x > 2$", + "mistake": "dir_confusion" + }, + { + "text": "$−2 < y < 2$", + "mistake": "x_vs_y_interval" + } + ] + }, + { + "question": "לפי הגרף, באילו תחומים הפונקציה עולה?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$x < −1$ ו־$x > 2$", + "correct": true + }, + { + "text": "$−1 < x < 2$", + "mistake": "dir_confusion" + }, + { + "text": "$x > 0$", + "mistake": "neg_x" + } + ] + }, + { + "question": "לפי הגרף, אילו נקודות קיצון יש לפונקציה?", + "graph": { + "points": [ + [ + -3, + -2 + ], + [ + 0, + 0 + ], + [ + 3, + 2 + ] + ], + "x": [ + -3.5, + 3.5 + ], + "y": [ + -2.5, + 2.5 + ] + }, + "choices": [ + { + "text": "אין לה נקודות קיצון", + "correct": true + }, + { + "text": "$(0, 0)$", + "mistake": "no_extremum" + }, + { + "text": "$(3, 2)$", + "mistake": "no_extremum" + } + ] + }, + { + "question": "מה ההבדל בין נקודת מקסימום לערך המקסימום?", + "choices": [ + { + "text": "הנקודה היא זוג $(x, y)$; הערך הוא שיעור ה־$y$", + "correct": true + }, + { + "text": "אין הבדל", + "mistake": "value_vs_point" + }, + { + "text": "הערך הוא שיעור ה־$x$", + "mistake": "x_as_value" + } + ] + }, + { + "question": "פונקציה עולה עד $x = 3$ ויורדת אחריו, ו־$f(3) = 7$. מה נכון?", + "choices": [ + { + "text": "$(3, 7)$ נקודת מקסימום", + "correct": true + }, + { + "text": "$(3, 7)$ נקודת מינימום", + "mistake": "max_vs_min" + }, + { + "text": "$(7, 3)$ נקודת מקסימום", + "mistake": "swapped_pair" + } + ] + } + ] + }, + { + "id": "n_eq_graph", + "unit": "n", + "name": "הקשר בין משוואות לגרף", + "short": "משוואות וגרף", + "prereqs": [ + "n_points" + ], + "description": "פתרונות $f(x) = m$ הם שיעורי ה־$x$ של הנקודות שבהן הגרף פוגש את הישר האופקי $y = m$.", + "month": "מרץ", + "questions": [ + { + "question": "לפי הגרף, מהם הפתרונות של $f(x) = 0$?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$x = −2$, $x = 1$, $x = 3$", + "correct": true + }, + { + "text": "$x = 1.5$", + "mistake": "axes_mixed" + }, + { + "text": "$x = −1$ ו־$x = 2$", + "mistake": "vertex_as_root" + } + ] + }, + { + "question": "לפי הגרף, כמה פתרונות יש ל־$f(x) = 1$?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$3$", + "correct": true + }, + { + "text": "$1$", + "mistake": "x_equals_m" + }, + { + "text": "$2$", + "mistake": "x_equals_m" + } + ] + }, + { + "question": "לפי הגרף, כמה פתרונות יש ל־$f(x) = 2$?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$2$", + "correct": true + }, + { + "text": "$1$", + "mistake": "x_equals_m" + }, + { + "text": "$3$", + "mistake": "x_equals_m" + } + ] + }, + { + "question": "לפי הגרף, כמה פתרונות יש ל־$f(x) = −2$?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$2$", + "correct": true + }, + { + "text": "$1$", + "mistake": "x_equals_m" + }, + { + "text": "$0$", + "mistake": "count_all" + } + ] + }, + { + "question": "לפי הגרף, כמה פתרונות יש ל־$f(x) = 5$?", + "graph": { + "points": [ + [ + -3, + -4 + ], + [ + -2, + 0 + ], + [ + -1, + 2 + ], + [ + 0, + 1.5 + ], + [ + 1, + 0 + ], + [ + 2, + -2 + ], + [ + 3, + 0 + ], + [ + 4, + 4 + ] + ], + "x": [ + -3.5, + 4.5 + ], + "y": [ + -4.5, + 4.5 + ] + }, + "choices": [ + { + "text": "$0$", + "correct": true + }, + { + "text": "$1$", + "mistake": "x_equals_m" + }, + { + "text": "$2$", + "mistake": "x_equals_m" + } + ] + }, + { + "question": "לפי הגרף, מה הפתרון של $f(x) = 3$?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$x = −4$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "x_equals_m" + }, + { + "text": "אין פתרון", + "mistake": "count_all" + } + ] + }, + { + "question": "לפי הגרף, כמה פתרונות יש ל־$f(x) = −2$?", + "graph": { + "points": [ + [ + -4, + 3 + ], + [ + -3, + 0 + ], + [ + -1, + -2 + ], + [ + 0, + -1.5 + ], + [ + 1, + 0 + ], + [ + 2, + 1.5 + ], + [ + 3, + 0 + ], + [ + 4, + -1 + ] + ], + "x": [ + -4.5, + 4.5 + ], + "y": [ + -2.5, + 3.5 + ] + }, + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$2$", + "mistake": "x_equals_m" + }, + { + "text": "$0$", + "mistake": "count_all" + } + ] + }, + { + "question": "לפי הגרף, מה הפתרון של $f(x) = 0$?", + "graph": { + "points": [ + [ + -3, + -2 + ], + [ + 0, + 0 + ], + [ + 3, + 2 + ] + ], + "x": [ + -3.5, + 3.5 + ], + "y": [ + -2.5, + 2.5 + ] + }, + "choices": [ + { + "text": "$x = 0$", + "correct": true + }, + { + "text": "$y = 0$", + "mistake": "x_vs_y_interval" + }, + { + "text": "אין פתרון", + "mistake": "count_all" + } + ] + }, + { + "question": "מה המשמעות הגרפית של פתרון המשוואה $f(x) = 4$?", + "choices": [ + { + "text": "שיעור ה־$x$ של נקודה שבה הגרף פוגש את הישר $y = 4$", + "correct": true + }, + { + "text": "שיעור ה־$x$ של נקודה שבה הגרף פוגש את הישר $x = 4$", + "mistake": "x_equals_m" + }, + { + "text": "הערך $f(4)$", + "mistake": "x_equals_m" + } + ] + }, + { + "question": "הגרף של $f$ עובר בנקודה $(2, 5)$. איזו משוואה בהכרח מתקיימת?", + "choices": [ + { + "text": "$f(2) = 5$", + "correct": true + }, + { + "text": "$f(5) = 2$", + "mistake": "swapped_pair" + }, + { + "text": "$f(0) = 5$", + "mistake": "axes_mixed" + } + ] + } + ] + }, + { + "id": "n_vshift", + "unit": "n", + "name": "הזזה אנכית של פונקציה", + "short": "הזזה אנכית", + "prereqs": [ + "n_extremum" + ], + "description": "$f(x) + k$ מזיזה את הגרף $k$ יחידות למעלה ($k > 0$) או למטה ($k < 0$). תחומי העלייה והירידה נשמרים; חיתוכים עם הצירים משתנים.", + "month": "מרץ", + "questions": [ + { + "question": "לפונקציה $f$ נקודת מינימום $(−1, −2)$. מהי נקודת המינימום של $g(x) = f(x) + 2$?", + "choices": [ + { + "text": "$(−1, 0)$", + "correct": true + }, + { + "text": "$(1, −2)$", + "mistake": "vshift_as_h" + }, + { + "text": "$(−1, −4)$", + "mistake": "vshift_dir" + } + ] + }, + { + "question": "לפונקציה $f$ נקודת מקסימום $(2, 1.5)$. מהי נקודת המקסימום של $g(x) = f(x) − 3$?", + "choices": [ + { + "text": "$(2, −1.5)$", + "correct": true + }, + { + "text": "$(−1, 1.5)$", + "mistake": "vshift_as_h" + }, + { + "text": "$(2, 4.5)$", + "mistake": "vshift_dir" + } + ] + }, + { + "question": "$f$ עולה בתחום $−1 < x < 2$. באיזה תחום עולה $g(x) = f(x) + 5$?", + "choices": [ + { + "text": "$−1 < x < 2$", + "correct": true + }, + { + "text": "$4 < x < 7$", + "mistake": "vshift_as_h" + }, + { + "text": "$−6 < x < −3$", + "mistake": "shift_keeps" + } + ] + }, + { + "question": "איך מתקבל הגרף של $g(x) = f(x) − 4$ מהגרף של $f$?", + "choices": [ + { + "text": "הזזה של $4$ יחידות למטה", + "correct": true + }, + { + "text": "הזזה של $4$ יחידות למעלה", + "mistake": "vshift_dir" + }, + { + "text": "הזזה של $4$ יחידות ימינה", + "mistake": "vshift_as_h" + } + ] + }, + { + "question": "$f(0) = −1.5$. מה נקודת החיתוך של $g(x) = f(x) + 1.5$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, 0)$", + "correct": true + }, + { + "text": "$(0, −3)$", + "mistake": "vshift_dir" + }, + { + "text": "$(1.5, −1.5)$", + "mistake": "vshift_as_h" + } + ] + }, + { + "question": "מה נשמר כשמזיזים גרף הזזה אנכית?", + "choices": [ + { + "text": "תחומי העלייה והירידה", + "correct": true + }, + { + "text": "נקודות החיתוך עם ציר $x$", + "mistake": "shift_keeps" + }, + { + "text": "ערך המקסימום", + "mistake": "vshift_keeps_y" + } + ] + }, + { + "question": "הנקודה $(3, 0)$ על הגרף של $f$. איזו נקודה על הגרף של $f(x) + 2$?", + "choices": [ + { + "text": "$(3, 2)$", + "correct": true + }, + { + "text": "$(5, 0)$", + "mistake": "vshift_as_h" + }, + { + "text": "$(3, −2)$", + "mistake": "vshift_dir" + } + ] + }, + { + "question": "$f(x) = x²$. מהי $g$ שמתקבלת מהזזת $f$ שלוש יחידות למטה?", + "choices": [ + { + "text": "$g(x) = x² − 3$", + "correct": true + }, + { + "text": "$g(x) = (x − 3)²$", + "mistake": "vshift_as_h" + }, + { + "text": "$g(x) = x² + 3$", + "mistake": "vshift_dir" + } + ] + }, + { + "question": "ערך המקסימום של $f$ הוא $4$. מה ערך המקסימום של $f(x) − 6$?", + "choices": [ + { + "text": "$−2$", + "correct": true + }, + { + "text": "$10$", + "mistake": "vshift_dir" + }, + { + "text": "$4$", + "mistake": "vshift_keeps_y" + } + ] + }, + { + "question": "ל־$f$ שלוש נקודות חיתוך עם ציר $x$. האם גם ל־$f(x) + 1$ בהכרח שלוש?", + "choices": [ + { + "text": "לא בהכרח", + "correct": true + }, + { + "text": "כן, הזזה שומרת על החיתוכים", + "mistake": "shift_keeps" + } + ] + } + ] + }, + { + "id": "n_hshift", + "unit": "n", + "name": "הזזה אופקית של פונקציה", + "short": "הזזה אופקית", + "prereqs": [ + "n_extremum" + ], + "description": "$f(x − b)$ מזיזה את הגרף $b$ יחידות ימינה ($b > 0$) או שמאלה ($b < 0$). ערכי המקסימום והמינימום נשמרים; התחומים זזים.", + "month": "מרץ", + "questions": [ + { + "question": "לפונקציה $f$ נקודת מינימום $(−1, −2)$. מהי נקודת המינימום של $g(x) = f(x − 2)$?", + "choices": [ + { + "text": "$(1, −2)$", + "correct": true + }, + { + "text": "$(−3, −2)$", + "mistake": "hshift_sign" + }, + { + "text": "$(−1, −4)$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "לפונקציה $f$ נקודת מקסימום $(2, 1.5)$. מהי נקודת המקסימום של $g(x) = f(x + 3)$?", + "choices": [ + { + "text": "$(−1, 1.5)$", + "correct": true + }, + { + "text": "$(5, 1.5)$", + "mistake": "hshift_sign" + }, + { + "text": "$(2, 4.5)$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "$f$ עולה בתחום $−1 < x < 2$. באיזה תחום עולה $g(x) = f(x − 4)$?", + "choices": [ + { + "text": "$3 < x < 6$", + "correct": true + }, + { + "text": "$−1 < x < 2$", + "mistake": "shift_keeps" + }, + { + "text": "$−5 < x < −2$", + "mistake": "hshift_sign" + } + ] + }, + { + "question": "איך מתקבל הגרף של $g(x) = f(x + 2)$ מהגרף של $f$?", + "choices": [ + { + "text": "הזזה של $2$ יחידות שמאלה", + "correct": true + }, + { + "text": "הזזה של $2$ יחידות ימינה", + "mistake": "hshift_sign" + }, + { + "text": "הזזה של $2$ יחידות למעלה", + "mistake": "h_as_v" + } + ] + }, + { + "question": "ל־$f$ חיתוכים עם ציר $x$ ב־$x = −3$, $x = 1$, $x = 3$. היכן חותכת $g(x) = f(x − 1)$ את ציר $x$?", + "choices": [ + { + "text": "$x = −2$, $x = 2$, $x = 4$", + "correct": true + }, + { + "text": "$x = −4$, $x = 0$, $x = 2$", + "mistake": "hshift_sign" + }, + { + "text": "$x = −3$, $x = 1$, $x = 3$", + "mistake": "shift_keeps" + } + ] + }, + { + "question": "מה נשמר כשמזיזים גרף הזזה אופקית?", + "choices": [ + { + "text": "ערכי המקסימום והמינימום", + "correct": true + }, + { + "text": "תחומי העלייה והירידה", + "mistake": "shift_keeps" + }, + { + "text": "נקודת החיתוך עם ציר $y$", + "mistake": "hshift_keeps_x" + } + ] + }, + { + "question": "הנקודה $(3, 0)$ על הגרף של $f$. איזו נקודה על הגרף של $f(x − 2)$?", + "choices": [ + { + "text": "$(5, 0)$", + "correct": true + }, + { + "text": "$(1, 0)$", + "mistake": "hshift_sign" + }, + { + "text": "$(3, −2)$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "$f(x) = x²$. מהי $g$ שמתקבלת מהזזת $f$ שלוש יחידות ימינה?", + "choices": [ + { + "text": "$g(x) = (x − 3)²$", + "correct": true + }, + { + "text": "$g(x) = (x + 3)²$", + "mistake": "hshift_sign" + }, + { + "text": "$g(x) = x² − 3$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "ערך המינימום של $f$ הוא $−2$. מה ערך המינימום של $f(x + 5)$?", + "choices": [ + { + "text": "$−2$", + "correct": true + }, + { + "text": "$3$", + "mistake": "h_as_v" + }, + { + "text": "$−7$", + "mistake": "h_as_v" + } + ] + }, + { + "question": "$f$ חיובית בתחום $1 < x < 3$. באיזה תחום חיובית $g(x) = f(x + 1)$?", + "choices": [ + { + "text": "$0 < x < 2$", + "correct": true + }, + { + "text": "$2 < x < 4$", + "mistake": "hshift_sign" + }, + { + "text": "$1 < x < 3$", + "mistake": "shift_keeps" + } + ] + } + ] + }, + { + "id": "n_reflect", + "unit": "n", + "name": "שיקוף ביחס לציר $x$", + "short": "שיקוף", + "prereqs": [ + "n_extremum" + ], + "description": "$−f(x)$ היא שיקוף של $f$ ביחס לציר $x$: $(a, b)$ עוברת ל־$(a, −b)$. מקסימום הופך למינימום, וחיובית הופכת לשלילית.", + "month": "מרץ", + "questions": [ + { + "question": "לפונקציה $f$ נקודת מינימום $(−1, −2)$. מה נקודת הקיצון של $−f(x)$, ומה סוגה?", + "choices": [ + { + "text": "$(−1, 2)$, מקסימום", + "correct": true + }, + { + "text": "$(−1, 2)$, מינימום", + "mistake": "reflect_type" + }, + { + "text": "$(1, −2)$, מינימום", + "mistake": "reflect_axis" + } + ] + }, + { + "question": "ל־$f$ חיתוכים עם ציר $x$ ב־$x = −3$, $x = 1$, $x = 3$. היכן חותכת $−f(x)$ את ציר $x$?", + "choices": [ + { + "text": "$x = −3$, $x = 1$, $x = 3$", + "correct": true + }, + { + "text": "$x = 3$, $x = −1$, $x = −3$", + "mistake": "reflect_zeros" + } + ] + }, + { + "question": "$f$ חיובית בתחום $1 < x < 3$. מה נכון לגבי $−f(x)$ בתחום זה?", + "choices": [ + { + "text": "היא שלילית", + "correct": true + }, + { + "text": "היא חיובית", + "mistake": "reflect_zeros" + }, + { + "text": "היא אפס", + "mistake": "reflect_zeros" + } + ] + }, + { + "question": "$f$ עולה בתחום $−1 < x < 2$. מה עושה $−f(x)$ בתחום זה?", + "choices": [ + { + "text": "יורדת", + "correct": true + }, + { + "text": "עולה", + "mistake": "reflect_type" + }, + { + "text": "קבועה", + "mistake": "reflect_type" + } + ] + }, + { + "question": "הנקודה $(2, 5)$ על הגרף של $f$. איזו נקודה על הגרף של $−f(x)$?", + "choices": [ + { + "text": "$(2, −5)$", + "correct": true + }, + { + "text": "$(−2, 5)$", + "mistake": "reflect_axis" + }, + { + "text": "$(−2, −5)$", + "mistake": "reflect_axis" + } + ] + }, + { + "question": "$f(x) = x² − 4$. מהי $−f(x)$?", + "choices": [ + { + "text": "$−x² + 4$", + "correct": true + }, + { + "text": "$−x² − 4$", + "mistake": "reflect_zeros" + }, + { + "text": "$x² + 4$", + "mistake": "reflect_axis" + } + ] + }, + { + "question": "ערך המקסימום של $f$ הוא $3$. מה נכון לגבי $−f(x)$?", + "choices": [ + { + "text": "יש לה ערך מינימום $−3$", + "correct": true + }, + { + "text": "יש לה ערך מקסימום $−3$", + "mistake": "reflect_type" + }, + { + "text": "יש לה ערך מקסימום $3$", + "mistake": "reflect_type" + } + ] + }, + { + "question": "$f(0) = −1.5$. מהי נקודת החיתוך של $−f(x)$ עם ציר $y$?", + "choices": [ + { + "text": "$(0, 1.5)$", + "correct": true + }, + { + "text": "$(0, −1.5)$", + "mistake": "reflect_zeros" + }, + { + "text": "$(1.5, 0)$", + "mistake": "swapped_pair" + } + ] + }, + { + "question": "איך מתקבל הגרף של $−f(x)$ מהגרף של $f$?", + "choices": [ + { + "text": "שיקוף ביחס לציר $x$", + "correct": true + }, + { + "text": "שיקוף ביחס לציר $y$", + "mistake": "reflect_axis" + }, + { + "text": "הזזה למטה", + "mistake": "vshift_dir" + } + ] + }, + { + "question": "$f$ שלילית בתחום $x < −2$. באיזה תחום $−f(x)$ חיובית?", + "choices": [ + { + "text": "$x < −2$", + "correct": true + }, + { + "text": "$x > −2$", + "mistake": "reflect_axis" + }, + { + "text": "$x > 2$", + "mistake": "reflect_axis" + } + ] + } + ] + }, + { + "id": "b_def", + "unit": "b", + "name": "הגדרת המעוין ותכונות הצלעות", + "short": "הגדרת מעוין", + "prereqs": [ + "g_def" + ], + "description": "מעוין הוא מרובע שכל צלעותיו שוות. הוא גם מקבילית וגם דלתון.", + "month": "מרץ", + "questions": [ + { + "question": "איזה מרובע נקרא מעוין?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D", + "choices": [ + { + "text": "מרובע שכל צלעותיו שוות", + "correct": true + }, + { + "text": "מרובע שכל זוויותיו ישרות", + "mistake": "rect_vs_rhombus" + }, + { + "text": "מרובע שאלכסוניו שווים", + "mistake": "rect_vs_rhombus" + } + ] + }, + { + "question": "היקף מעוין $36$. מה אורך צלעו?", + "figure": "_A=-3.46,0; _B=0,-2; _C=3.46,0; _D=0,2; poly _A _B _C _D; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; len _A _B ?; note P = 36", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$18$", + "mistake": "perim_all_sides" + }, + { + "text": "$12$", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "צלע מעוין $7$. מה היקפו?", + "figure": "_A=-3.46,0; _B=0,-2; _C=3.46,0; _D=0,2; poly _A _B _C _D; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; len _A _B 7", + "choices": [ + { + "text": "$28$", + "correct": true + }, + { + "text": "$14$", + "mistake": "perim_all_sides" + }, + { + "text": "$49$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "האם כל מעוין הוא מקבילית?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במעוין $ABCD$: $AB = 2x + 1$, $BC = x + 6$. מה $x$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; len A B 2x + 1; len B C x + 6", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 7/3$", + "mistake": "move_sign" + }, + { + "text": "$x = 7$", + "mistake": "move_sign" + } + ] + }, + { + "question": "מעוין הוא גם:", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1", + "choices": [ + { + "text": "דלתון וגם מקבילית", + "correct": true + }, + { + "text": "מלבן", + "mistake": "square_hierarchy" + }, + { + "text": "טרפז", + "mistake": "trap_vs_par" + } + ] + }, + { + "question": "צלע מעוין $3x − 1$ והיקפו $44$. מה $x$?", + "figure": "_A=-3.46,0; _B=0,-2; _C=3.46,0; _D=0,2; poly _A _B _C _D; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; len _A _B 3x − 1; note P = 44", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 15$", + "mistake": "perim_all_sides" + }, + { + "text": "$x = 11$", + "mistake": "perim_all_sides" + } + ] + }, + { + "question": "איזו טענה נכונה?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1", + "choices": [ + { + "text": "כל ריבוע הוא מעוין", + "correct": true + }, + { + "text": "כל מעוין הוא ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "כל מלבן הוא מעוין", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במרובע $ABCD$: $AB = BC = CD = DA = 6$ ו־$∢A = 90°$. מהו המרובע?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; len A B 6; note AB = BC = CD = DA, ∢A = 90°", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במעוין $ABCD$: $AB = 3y − 2$, $CD = y + 4$. מה $y$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; len A B 3y − 2; len C D y + 4", + "choices": [ + { + "text": "$y = 3$", + "correct": true + }, + { + "text": "$y = 1$", + "mistake": "move_sign" + }, + { + "text": "$y = 0.5$", + "mistake": "move_sign" + } + ] + } + ] + }, + { + "id": "b_angles", + "unit": "b", + "name": "זוויות המעוין", + "short": "זוויות מעוין", + "prereqs": [ + "b_def" + ], + "description": "במעוין זוויות נגדיות שוות, זוויות סמוכות משלימות ל־$180°$, והאלכסונים חוצים את הזוויות.", + "month": "מרץ", + "questions": [ + { + "question": "במעוין $ABCD$: $∢A = 70°$. מה גודל $∢B$?", + "figure": "A=-3.28,0; B=0,-2.29; C=3.28,0; D=0,2.29; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; ang B A D 70°; ang C B A ?", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "par_adjacent" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢A = 70°$. מה גודל $∢BAC$?", + "figure": "A=-3.28,0; B=0,-2.29; C=3.28,0; D=0,2.29; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; ang B A D 70°", + "choices": [ + { + "text": "$35°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "rh_bisect" + }, + { + "text": "$55°$", + "mistake": "rh_perp" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢ABC = 120°$. מה גודל $∢ABD$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line B D; ang A B C 120°", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$120°$", + "mistake": "rh_bisect" + }, + { + "text": "$30°$", + "mistake": "rh_perp" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢A = 60°$ ו־$AB = 4$. מה אורך האלכסון $BD$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash B D; ang B A D 60°; len A B 4; lenx B D ?", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$8$", + "mistake": "other_quantity" + }, + { + "text": "$2$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢BAC = 25°$. מה גודל $∢ABC$?", + "figure": "A=-3.63,0; B=0,-1.69; C=3.63,0; D=0,1.69; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; ang B A C 25°; ang A B C ?", + "choices": [ + { + "text": "$130°$", + "correct": true + }, + { + "text": "$50°$", + "mistake": "rh_bisect" + }, + { + "text": "$65°$", + "mistake": "rh_bisect" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢ABD = 40°$. מה גודל $∢BAD$?", + "figure": "A=-2.57,0; B=0,-3.06; C=2.57,0; D=0,3.06; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line B D; ang A B D 40°; ang B A D ?", + "choices": [ + { + "text": "$100°$", + "correct": true + }, + { + "text": "$80°$", + "mistake": "par_adjacent" + }, + { + "text": "$40°$", + "mistake": "rh_bisect" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢A = 2 · ∢B$. מה גודל $∢A$?", + "figure": "A=-2,0; B=0,-3.46; C=2,0; D=0,3.46; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; ang B A D ?; note ∢A = 2 · ∢B", + "choices": [ + { + "text": "$120°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "other_quantity" + }, + { + "text": "$90°$", + "mistake": "par_adjacent" + } + ] + }, + { + "question": "במעוין $ABCD$ ($O$ מפגש האלכסונים): $∢OAB = 30°$. מה גודל $∢OBA$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; O=0,0@se; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; ang O A B 30°; ang A B O ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$30°$", + "mistake": "rh_perp" + }, + { + "text": "$90°$", + "mistake": "rh_perp" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢A = 80°$. מה גודל $∢ACD$?", + "figure": "A=-3.06,0; B=0,-2.57; C=3.06,0; D=0,2.57; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; ang B A D 80°; ang A C D ?", + "choices": [ + { + "text": "$40°$", + "correct": true + }, + { + "text": "$80°$", + "mistake": "rh_bisect" + }, + { + "text": "$50°$", + "mistake": "rh_perp" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢A + ∢C = 100°$. מה גודל $∢B$?", + "figure": "A=-3.63,0; B=0,-1.69; C=3.63,0; D=0,1.69; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; ang C B A ?; note ∢A + ∢C = 100°", + "choices": [ + { + "text": "$130°$", + "correct": true + }, + { + "text": "$50°$", + "mistake": "par_adjacent" + }, + { + "text": "$80°$", + "mistake": "par_opposite" + } + ] + } + ] + }, + { + "id": "b_diag", + "unit": "b", + "name": "אלכסוני המעוין", + "short": "אלכסוני מעוין", + "prereqs": [ + "b_def" + ], + "description": "אלכסוני המעוין מאונכים זה לזה וחוצים זה את זה. שטח המעוין הוא מכפלת האלכסונים חלקי $2$.", + "month": "מרץ", + "questions": [ + { + "question": "אלכסוני מעוין $16$ ו־$12$. מה אורך צלעו?", + "figure": "A=-4,0; B=0,-3; C=4,0; D=0,3; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash A C; dash B D; len A B ?; note AC = 16, BD = 12", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$20$", + "mistake": "diag_half" + }, + { + "text": "$14$", + "mistake": "add_lengths" + } + ] + }, + { + "question": "אלכסוני מעוין $10$ ו־$8$. מה שטחו?", + "figure": "A=-3.9,0; B=0,-3.12; C=3.9,0; D=0,3.12; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash A C; dash B D; note AC = 10, BD = 8", + "choices": [ + { + "text": "$40$", + "correct": true + }, + { + "text": "$80$", + "mistake": "forgot_half_area" + }, + { + "text": "$18$", + "mistake": "area_add" + } + ] + }, + { + "question": "מה נכון לגבי אלכסוני המעוין?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; O=0,0@se; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O", + "choices": [ + { + "text": "הם מאונכים וחוצים זה את זה", + "correct": true + }, + { + "text": "הם שווים וחוצים זה את זה", + "mistake": "rect_vs_rhombus" + }, + { + "text": "הם מאונכים, אבל לא חוצים זה את זה", + "mistake": "kite_par" + } + ] + }, + { + "question": "צלע מעוין $13$ ואחד מאלכסוניו $10$. מה האלכסון השני?", + "figure": "A=-5.54,0; B=0,-2.31; C=5.54,0; D=0,2.31; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash A C; dash B D; len A B 13; note BD = 10, AC = ?", + "choices": [ + { + "text": "$24$", + "correct": true + }, + { + "text": "$12$", + "mistake": "diag_half" + }, + { + "text": "$23$", + "mistake": "add_lengths" + } + ] + }, + { + "question": "צלע מעוין $5$ ואחד מאלכסוניו $6$. מה האלכסון השני?", + "figure": "A=-4,0; B=0,-3; C=4,0; D=0,3; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash A C; dash B D; len A B 5; note BD = 6, AC = ?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$4$", + "mistake": "diag_half" + }, + { + "text": "$√11$", + "mistake": "pyth" + } + ] + }, + { + "question": "שטח מעוין $24$ ואחד מאלכסוניו $6$. מה האלכסון השני?", + "figure": "A=-4,0; B=0,-3; C=4,0; D=0,3; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash A C; dash B D; note BD = 6, AC = ?, S = 24", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$4$", + "mistake": "forgot_half_area" + }, + { + "text": "$18$", + "mistake": "area_add" + } + ] + }, + { + "question": "במעוין $ABCD$ ($O$ מפגש האלכסונים), מה גודל $∢AOB$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; O=0,0@se; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; ang A O D ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$45°$", + "mistake": "rh_perp" + }, + { + "text": "תלוי במעוין", + "mistake": "rh_perp" + } + ] + }, + { + "question": "במעוין $ABCD$ ($O$ מפגש האלכסונים): $AO = 4$, $BO = 3$. מה שטח המעוין?", + "figure": "A=-4,0; B=0,-3; C=4,0; D=0,3; O=0,0@se; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; len A O 4; lenx B O 3", + "choices": [ + { + "text": "$24$", + "correct": true + }, + { + "text": "$12$", + "mistake": "diag_half" + }, + { + "text": "$48$", + "mistake": "forgot_half_area" + } + ] + }, + { + "question": "במעוין $AC = 2x$, $BD = x + 3$, והשטח $18$. מה $x$?", + "figure": "A=-3.28,0; B=0,-2.29; C=3.28,0; D=0,2.29; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; dash A C; dash B D; note AC = 2x, BD = x + 3, S = 18", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = −6$", + "mistake": "inadmissible" + }, + { + "text": "$x = 1.5$", + "mistake": "forgot_half_area" + } + ] + }, + { + "question": "צלע מעוין $6$ והגובה אליה $4$. מה שטח המעוין?", + "figure": "_A=0,0; _B=6,0; _C=10.47,4; _D=4.47,4; _H=4.47,0; poly _A _B _C _D; dash _D _H; right _D _H _B; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; len _A _B 6; lenx _D _H 4", + "choices": [ + { + "text": "$24$", + "correct": true + }, + { + "text": "$12$", + "mistake": "par_area" + }, + { + "text": "$10$", + "mistake": "area_add" + } + ] + } + ] + }, + { + "id": "b_converse", + "unit": "b", + "name": "משפטים הפוכים: מתי מרובע הוא מעוין", + "short": "הוכחת מעוין", + "prereqs": [ + "b_diag", + "b_angles" + ], + "description": "מקבילית שאלכסוניה מאונכים, שיש בה צלעות סמוכות שוות, או שאלכסון חוצה בה זווית, היא מעוין.", + "month": "מרץ", + "questions": [ + { + "question": "מקבילית שאלכסוניה מאונכים היא:", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AC ⊥ BD", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + }, + { + "text": "לא בהכרח מעוין", + "mistake": "par_not_rhombus" + } + ] + }, + { + "question": "במקבילית $ABCD$: $AB = BC$. מה סוג המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; note AB = BC", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + }, + { + "text": "אי אפשר לדעת", + "mistake": "par_not_rhombus" + } + ] + }, + { + "question": "מרובע שאלכסוניו מאונכים הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AC ⊥ BD", + "choices": [ + { + "text": "לא בהכרח מעוין (למשל דלתון)", + "correct": true + }, + { + "text": "מעוין", + "mistake": "kite_par" + } + ] + }, + { + "question": "במקבילית $ABCD$ האלכסון $AC$ חוצה את $∢A$. מה סוג המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; line A C; ang B A C; ang C A D", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + }, + { + "text": "אי אפשר לדעת", + "mistake": "rh_bisect" + } + ] + }, + { + "question": "מרובע שאלכסוניו מאונכים וחוצים זה את זה הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AC ⊥ BD, AO = OC, BO = OD", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "דלתון שאינו מעוין", + "mistake": "kite_par" + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + } + ] + }, + { + "question": "מרובע שכל צלעותיו שוות הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; note AB = BC = CD = DA", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "לא בהכרח מקבילית", + "mistake": "par_tests" + } + ] + }, + { + "question": "במקבילית $ABCD$: $AB = 2x$, $BC = x + 5$, ו־$x = 5$. מה סוג המקבילית?", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; poly A B C D; len A B 2x; len B C x + 5; note x = 5", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + }, + { + "text": "אי אפשר לדעת", + "mistake": "par_not_rhombus" + } + ] + }, + { + "question": "מקבילית שאלכסוניה שווים ומאונכים היא:", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AC = BD, AC ⊥ BD", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במרובע $ABCD$ כל אלכסון חוצה את שתי הזוויות שהוא מחבר. מהו המרובע?", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; poly A B C D; line A C; line B D; ang B A C; ang C A D; ang D C A; ang A C B; ang2 A B D; ang2 D B C; ang2 C D B; ang2 B D A", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "דלתון שאינו מעוין", + "mistake": "kite_par" + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + } + ] + }, + { + "question": "בדלתון $ABCD$ ($AB = AD$, $CB = CD$) נתון גם $AB = BC$. מהו המרובע?", + "figure": "A=0,2.18; B=-2.6,0; C=0,-4.5; D=2.6,0; poly A B C D; tick A B 1; tick A D 1; tick C B 2; tick C D 2; note AB = BC", + "choices": [ + { + "text": "מעוין", + "correct": true + }, + { + "text": "דלתון שאינו מעוין", + "mistake": "kite_rhombus" + }, + { + "text": "מלבן", + "mistake": "rect_vs_rhombus" + } + ] + } + ] + }, + { + "id": "c_def", + "unit": "c", + "name": "הגדרת הריבוע, צלעות וזוויות", + "short": "הגדרת ריבוע", + "prereqs": [ + "m_def", + "b_def" + ], + "description": "ריבוע הוא מלבן שצלעותיו הסמוכות שוות, והוא גם מעוין שיש בו זווית ישרה.", + "month": "מרץ", + "questions": [ + { + "question": "איזה מרובע נקרא ריבוע?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; poly A B C D", + "choices": [ + { + "text": "מלבן שבו צלעות סמוכות שוות", + "correct": true + }, + { + "text": "מעוין שבו האלכסונים מאונכים", + "mistake": "square_hierarchy" + }, + { + "text": "מקבילית שבה האלכסונים חוצים זה את זה", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "צלע ריבוע $6$. מה אורך האלכסון?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; line _A _C; len _A _B 6; lenx _A _C ?", + "choices": [ + { + "text": "$√72$", + "correct": true + }, + { + "text": "$12$", + "mistake": "pyth" + }, + { + "text": "$6$", + "mistake": "square_diag" + } + ] + }, + { + "question": "היקף ריבוע $20$. מה שטחו?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; note P = 20", + "choices": [ + { + "text": "$25$", + "correct": true + }, + { + "text": "$20$", + "mistake": "area_perimeter" + }, + { + "text": "$100$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "האם כל ריבוע הוא מלבן?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1", + "choices": [ + { + "text": "כן", + "correct": true + }, + { + "text": "לא", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "האם כל מלבן הוא ריבוע?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D; right B A D; right C B A; right D C B; right A D C", + "choices": [ + { + "text": "לא", + "correct": true + }, + { + "text": "כן", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "שטח ריבוע $49$. מה היקפו?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; note S = 49", + "choices": [ + { + "text": "$28$", + "correct": true + }, + { + "text": "$14$", + "mistake": "perim_all_sides" + }, + { + "text": "$196$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "אלכסון ריבוע $10$. מה שטחו?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; line _A _C; lenx _A _C 10", + "choices": [ + { + "text": "$50$", + "correct": true + }, + { + "text": "$100$", + "mistake": "forgot_half_area" + }, + { + "text": "$25$", + "mistake": "diag_half" + } + ] + }, + { + "question": "בריבוע $ABCD$, מה גודל $∢ABD$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line B D; ang A B D ?", + "choices": [ + { + "text": "$45°$", + "correct": true + }, + { + "text": "$90°$", + "mistake": "square_diag" + }, + { + "text": "$60°$", + "mistake": "square_diag" + } + ] + }, + { + "question": "מלבן שהוא גם מעוין הוא:", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מקבילית שאינה ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "לא ייתכן מרובע כזה", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "צלע ריבוע $x + 3$ והיקפו $28$. מה $x$?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; len _A _B x + 3; note P = 28", + "choices": [ + { + "text": "$x = 4$", + "correct": true + }, + { + "text": "$x = 25$", + "mistake": "perim_all_sides" + }, + { + "text": "$x = 11$", + "mistake": "perim_all_sides" + } + ] + } + ] + }, + { + "id": "c_diag", + "unit": "c", + "name": "אלכסוני הריבוע", + "short": "אלכסוני ריבוע", + "prereqs": [ + "c_def" + ], + "description": "אלכסוני הריבוע שווים, מאונכים, חוצים זה את זה וחוצים את הזוויות הישרות.", + "month": "אפריל", + "questions": [ + { + "question": "מה נכון לגבי אלכסוני הריבוע?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O", + "choices": [ + { + "text": "הם שווים, מאונכים, חוצים זה את זה וחוצים את הזוויות", + "correct": true + }, + { + "text": "הם שווים, אבל לא מאונכים", + "mistake": "square_diag" + }, + { + "text": "הם מאונכים, אבל לא שווים", + "mistake": "square_diag" + } + ] + }, + { + "question": "בריבוע $ABCD$ ($O$ מפגש האלכסונים), מה גודל $∢AOB$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@n; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; ang A O B ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$45°$", + "mistake": "square_diag" + }, + { + "text": "$60°$", + "mistake": "square_diag" + } + ] + }, + { + "question": "בריבוע $ABCD$ ($O$ מפגש האלכסונים), מה גודל $∢OAB$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; ang O A B ?", + "choices": [ + { + "text": "$45°$", + "correct": true + }, + { + "text": "$90°$", + "mistake": "square_diag" + }, + { + "text": "$30°$", + "mistake": "square_diag" + } + ] + }, + { + "question": "בריבוע $ABCD$ ($O$ מפגש האלכסונים) $AC = 12$. מה $OB$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; lenx O B ?; note AC = 12", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$12$", + "mistake": "whole_diag" + }, + { + "text": "$√72$", + "mistake": "square_diag" + } + ] + }, + { + "question": "אלכסון ריבוע $8$. מה שטחו?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; line _A _C; lenx _A _C 8", + "choices": [ + { + "text": "$32$", + "correct": true + }, + { + "text": "$64$", + "mistake": "forgot_half_area" + }, + { + "text": "$16$", + "mistake": "diag_half" + } + ] + }, + { + "question": "בריבוע $ABCD$ ($O$ מפגש האלכסונים), איזה משולש הוא $AOB$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O", + "choices": [ + { + "text": "ישר זווית ושווה שוקיים", + "correct": true + }, + { + "text": "שווה צלעות", + "mistake": "square_diag" + }, + { + "text": "ישר זווית שאינו שווה שוקיים", + "mistake": "square_diag" + } + ] + }, + { + "question": "בריבוע $ABCD$ ($O$ מפגש האלכסונים) $AO = 5$. מה שטח הריבוע?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; lenx A O 5", + "choices": [ + { + "text": "$50$", + "correct": true + }, + { + "text": "$25$", + "mistake": "diag_half" + }, + { + "text": "$100$", + "mistake": "forgot_half_area" + } + ] + }, + { + "question": "בריבוע $ABCD$, מה גודל $∢CAD$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; ang C A D ?", + "choices": [ + { + "text": "$45°$", + "correct": true + }, + { + "text": "$90°$", + "mistake": "square_diag" + }, + { + "text": "$30°$", + "mistake": "square_diag" + } + ] + }, + { + "question": "אלכסון ריבוע $√50$. מה אורך צלעו?", + "figure": "_A=0,0; _B=4,0; _C=4,4; _D=0,4; poly _A _B _C _D; right _B _A _D; right _C _B _A; right _D _C _B; right _A _D _C; tick _A _B 1; tick _B _C 1; tick _C _D 1; tick _D _A 1; line _A _C; lenx _A _C √50; len _A _B ?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$25$", + "mistake": "sqrt_forgot" + }, + { + "text": "$√25$", + "mistake": "pyth" + } + ] + }, + { + "question": "בריבוע $ABCD$ ($O$ מפגש האלכסונים): $AO = 2x − 1$, $BD = 3x + 4$. מה $x$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; lenx A O 2x − 1; note BD = 3x + 4", + "choices": [ + { + "text": "$x = 6$", + "correct": true + }, + { + "text": "$x = −5$", + "mistake": "whole_diag" + }, + { + "text": "$x = 3$", + "mistake": "move_sign" + } + ] + } + ] + }, + { + "id": "c_converse", + "unit": "c", + "name": "משפטים הפוכים: מתי מרובע הוא ריבוע", + "short": "הוכחת ריבוע", + "prereqs": [ + "c_diag" + ], + "description": "מלבן שאלכסוניו מאונכים או שצלעותיו הסמוכות שוות הוא ריבוע; מעוין שאלכסוניו שווים או שיש בו זווית ישרה הוא ריבוע.", + "month": "אפריל", + "questions": [ + { + "question": "מלבן שאלכסוניו מאונכים הוא:", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; note AC ⊥ BD", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מעוין שאלכסוניו שווים הוא:", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; O=0,0@se; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; note AC = BD", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מעוין שיש בו זווית ישרה הוא:", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; note ∢A = 90°", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מלבן שיש בו שתי צלעות סמוכות שוות הוא:", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D; right B A D; right C B A; right D C B; right A D C; note AB = BC", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מרובע שאלכסוניו שווים ומאונכים הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AC = BD, AC ⊥ BD", + "choices": [ + { + "text": "לא בהכרח ריבוע", + "correct": true + }, + { + "text": "ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מקבילית שאלכסוניה שווים ומאונכים היא:", + "figure": "A=0,0; B=6,0; C=7.44,3.08; D=1.44,3.08; O=3.72,1.54@s; poly A B C D; line A C; line B D; dot O; note AC = BD, AC ⊥ BD", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במעוין $ABCD$: $∢A = ∢B$. מה סוג המעוין?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; note ∢A = ∢B", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "par_adjacent" + }, + { + "text": "אי אפשר לדעת", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במלבן $ABCD$ האלכסון $AC$ חוצה את $∢A$. מה סוג המלבן?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; ang B A C; ang C A D", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "אי אפשר לדעת", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "מרובע שכל צלעותיו שוות ואלכסוניו שווים הוא:", + "figure": "A=0,0; B=6,-0.4; C=5.1,3.4; D=0.9,2.7; O=2.55,1.7@s; poly A B C D; line A C; line B D; dot O; note AB = BC = CD = DA, AC = BD", + "choices": [ + { + "text": "ריבוע", + "correct": true + }, + { + "text": "מעוין שאינו ריבוע", + "mistake": "square_hierarchy" + }, + { + "text": "מלבן שאינו ריבוע", + "mistake": "square_hierarchy" + } + ] + }, + { + "question": "במלבן $ABCD$: $AB = 2x + 1$, $BC = 3x − 4$. עבור איזה $x$ המלבן ריבוע?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; poly A B C D; right B A D; right C B A; right D C B; right A D C; len A B 2x + 1; len B C 3x − 4", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 3$", + "mistake": "move_sign" + }, + { + "text": "$x = 0.6$", + "mistake": "move_sign" + } + ] + } + ] + }, + { + "id": "o_median", + "unit": "o", + "name": "התיכון ליתר", + "short": "התיכון ליתר", + "prereqs": [], + "description": "במשולש ישר זווית התיכון ליתר שווה למחצית היתר.", + "month": "אפריל", + "questions": [ + { + "question": "במשולש ישר זווית היתר $10$ ס״מ. מה אורך התיכון ליתר?", + "figure": "_A=6,0; _B=0,4.2; _C=0,0; _M=3,2.1@ne; poly _A _B _C; right _A _C _B; line _C _M; len _A _B 10; len _C _M ?", + "choices": [ + { + "text": "$5$ ס״מ", + "correct": true + }, + { + "text": "$10$ ס״מ", + "mistake": "median_hyp_rule" + }, + { + "text": "$20$ ס״מ", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר ו־$CM = 7$. מה $AB$?", + "figure": "A=6,0; B=0,4.2; C=0,0; M=3,2.1@ne; poly A B C; right A C B; line C M; len C M 7; note AB = ?", + "choices": [ + { + "text": "$14$", + "correct": true + }, + { + "text": "$3.5$", + "mistake": "median_hyp_rule" + }, + { + "text": "$7$", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר ו־$∢A = 35°$. מה גודל $∢ACM$?", + "figure": "A=6,0; B=0,4.2; C=0,0; M=3,2.1@ne; poly A B C; right A C B; line C M; ang C A B 35°; ang A C M ?", + "choices": [ + { + "text": "$35°$", + "correct": true + }, + { + "text": "$55°$", + "mistake": "median_iso" + }, + { + "text": "$90°$", + "mistake": "median_iso" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר ו־$∢A = 35°$. מה גודל $∢BCM$?", + "figure": "A=6,0; B=0,4.2; C=0,0; M=3,2.1@ne; poly A B C; right A C B; line C M; ang C A B 35°; ang B C M ?", + "choices": [ + { + "text": "$55°$", + "correct": true + }, + { + "text": "$35°$", + "mistake": "median_iso" + }, + { + "text": "$45°$", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$): $AC = 6$, $BC = 8$. מה אורך התיכון ליתר?", + "figure": "A=6,0; B=0,8; C=0,0; M=3,4@ne; poly A B C; right A C B; line C M; len A C 6; len B C 8; len C M ?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "median_hyp_rule" + }, + { + "text": "$7$", + "mistake": "pyth" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר. איזה משולש $AMC$?", + "figure": "A=6,0; B=0,4.2; C=0,0; M=3,2.1@ne; poly A B C; right A C B; line C M", + "choices": [ + { + "text": "שווה שוקיים", + "correct": true + }, + { + "text": "שווה צלעות", + "mistake": "median_iso" + }, + { + "text": "ישר זווית", + "mistake": "median_iso" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר ו־$∢B = 60°$. מה גודל $∢CMB$?", + "figure": "A=6,0; B=0,3.46; C=0,0; M=3,1.73@ne; poly A B C; right A C B; line C M; ang A B C 60°; ang C M B ?", + "choices": [ + { + "text": "$60°$", + "correct": true + }, + { + "text": "$30°$", + "mistake": "median_iso" + }, + { + "text": "$120°$", + "mistake": "median_iso" + } + ] + }, + { + "question": "במשולש ישר זווית התיכון ליתר $2x + 1$ והיתר $6x − 4$. מה $x$?", + "figure": "_A=6,0; _B=0,4.2; _C=0,0; _M=3,2.1@ne; poly _A _B _C; right _A _C _B; line _C _M; len _C _M 2x + 1; len _A _B 6x − 4", + "choices": [ + { + "text": "$x = 3$", + "correct": true + }, + { + "text": "$x = 1.25$", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר ו־$AB = 18$. מה $AM + CM$?", + "figure": "A=6,0; B=0,4.2; C=0,0; M=3,2.1@ne; poly A B C; right A C B; line C M; note AB = 18", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$27$", + "mistake": "median_hyp_rule" + }, + { + "text": "$9$", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במשולש $ABC$ ($∢C = 90°$) $CM$ תיכון ליתר ו־$∢ACM = 25°$. מה גודל $∢B$?", + "figure": "A=6,0; B=0,2.8; C=0,0; M=3,1.4@ne; poly A B C; right A C B; line C M; ang A C M 25°; ang A B C ?", + "choices": [ + { + "text": "$65°$", + "correct": true + }, + { + "text": "$25°$", + "mistake": "median_iso" + }, + { + "text": "$50°$", + "mistake": "median_iso" + } + ] + } + ] + }, + { + "id": "o_converse", + "unit": "o", + "name": "המשפט ההפוך לתיכון ליתר", + "short": "משפט הפוך לתיכון", + "prereqs": [ + "o_median" + ], + "description": "אם במשולש התיכון לצלע שווה למחצית הצלע שאליה הוא יורד, המשולש ישר זווית, והזווית הישרה מול אותה צלע.", + "month": "אפריל", + "questions": [ + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$ ו־$CM = AB : 2$. מה גודל $∢C$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.73,2.72; poly A B C; line C M; tick A M 1; tick M B 1; ang A C B ?; note CM = AB : 2", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "median_converse" + }, + { + "text": "אי אפשר לדעת", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$: $AB = 12$, $CM = 6$. איזו זווית ישרה?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.73,2.72; poly A B C; line C M; tick A M 1; tick M B 1; len C M 6; note AB = 12", + "choices": [ + { + "text": "$∢C$", + "correct": true + }, + { + "text": "$∢M$", + "mistake": "median_converse" + }, + { + "text": "$∢A$", + "mistake": "opposite_angle" + } + ] + }, + { + "question": "במשולש $PQR$, $PN$ תיכון לצלע $QR$: $QR = 10$, $PN = 5$. מה גודל $∢P$?", + "figure": "Q=0,0; R=6,0; N=3,0@s; P=1.73,2.72; poly Q R P; line P N; tick Q N 1; tick N R 1; len P N 5; ang Q P R ?; note QR = 10", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$45°$", + "mistake": "median_converse" + }, + { + "text": "$60°$", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$: $AB = 12$, $CM = 7$. האם $∢C = 90°$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.8,3.29; poly A B C; line C M; tick A M 1; tick M B 1; len C M 7; ang A C B ?; note AB = 12", + "choices": [ + { + "text": "לא, התיכון אינו חצי מ־$AB$", + "correct": true + }, + { + "text": "כן", + "mistake": "median_converse" + } + ] + }, + { + "question": "הנקודות $A$, $B$, $C$ נמצאות במרחק $5$ מהנקודה $M$, ו־$M$ אמצע $AB$. מה גודל $∢ACB$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.73,2.72; poly A B C; line C M; tick A M 1; tick M B 1; len A M 5; len M B 5; len C M 5; ang A C B ?", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "$60°$", + "mistake": "median_converse" + }, + { + "text": "אי אפשר לדעת", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$, $AM = MC$ ו־$∢A = 40°$. מה גודל $∢B$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=3.52,2.95; poly A B C; line C M; tick A M 1; tick M B 1; tick C M 1; ang B A C 40°; ang C B A ?", + "choices": [ + { + "text": "$50°$", + "correct": true + }, + { + "text": "$40°$", + "mistake": "median_iso" + }, + { + "text": "$100°$", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$: $AB = 2x + 6$, $CM = x + 3$. מה גודל $∢C$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.73,2.72; poly A B C; line C M; tick A M 1; tick M B 1; len C M x + 3; ang A C B ?; note AB = 2x + 6", + "choices": [ + { + "text": "$90°$", + "correct": true + }, + { + "text": "תלוי ב־$x$", + "mistake": "median_converse" + }, + { + "text": "$60°$", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $M$ אמצע $AB$ ו־$MA = MB = MC = 4$. מה אורך $AB$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.73,2.72; poly A B C; line C M; tick A M 1; tick M B 1; len A M 4; len M B 4; len C M 4", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$4$", + "mistake": "median_hyp_rule" + }, + { + "text": "$12$", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$ ו־$CM = AM$. אילו שתי זוויות משלימות ל־$90°$?", + "figure": "A=0,0; B=6,0; M=3,0@s; C=1.73,2.72; poly A B C; line C M; tick A M 1; tick M B 1; tick C M 1", + "choices": [ + { + "text": "$∢A$ ו־$∢B$", + "correct": true + }, + { + "text": "$∢A$ ו־$∢C$", + "mistake": "median_converse" + }, + { + "text": "$∢B$ ו־$∢C$", + "mistake": "median_converse" + } + ] + }, + { + "question": "במשולש $ABC$, $CM$ תיכון לצלע $AB$: $CM = 5$, $AC = 6$, $AB = 10$. מה $BC$?", + "figure": "A=0,0; B=10,0; M=5,0@s; C=3.6,4.8; poly A B C; line C M; tick A M 1; tick M B 1; len C M 5; len A C 6; len B C ?; note AB = 10", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$4$", + "mistake": "pyth" + }, + { + "text": "$5$", + "mistake": "median_hyp_rule" + } + ] + } + ] + }, + { + "id": "o_quads", + "unit": "o", + "name": "התיכון ליתר בשילוב מרובעים", + "short": "תיכון ליתר ומרובעים", + "prereqs": [ + "o_median" + ], + "description": "במרובעים עם זוויות ישרות מוצאים משולשים ישרי זווית ומשתמשים בתיכון ליתר.", + "month": "אפריל", + "questions": [ + { + "question": "במלבן $ABCD$ האלכסון $AC = 16$, ו־$O$ אמצע $AC$. מה $BO$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@n; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; dot O; dash B O; len B O ?; note AC = 16", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$16$", + "mistake": "whole_diag" + }, + { + "text": "$4$", + "mistake": "whole_diag" + } + ] + }, + { + "question": "במלבן $ABCD$, $O$ נקודת חיתוך האלכסונים ו־$BO = 6.5$. מה אורך האלכסון $AC$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; lenx B O 6.5", + "choices": [ + { + "text": "$13$", + "correct": true + }, + { + "text": "$6.5$", + "mistake": "whole_diag" + }, + { + "text": "$3.25$", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢B = ∢D = 90°$ ו־$M$ אמצע $AC$. מה נכון?", + "figure": "A=-3,0; C=3,0; B=1.5,-2.6; D=-1.03,2.82; M=0,0@n; poly A B C D; line A C; dot M; dash M B; dash M D; right A B C; right C D A", + "choices": [ + { + "text": "$MB = MD = AC : 2$", + "correct": true + }, + { + "text": "$MB = MD = AC$", + "mistake": "whole_diag" + }, + { + "text": "$MB = AC : 2$, אבל $MD$ לא בהכרח", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במרובע $ABCD$: $∢B = ∢D = 90°$, $AC = 20$, ו־$M$ אמצע $AC$. מה $BM + DM$?", + "figure": "A=-3,0; C=3,0; B=1.5,-2.6; D=-1.03,2.82; M=0,0@n; poly A B C D; line A C; dot M; dash M B; dash M D; right A B C; right C D A; note AC = 20", + "choices": [ + { + "text": "$20$", + "correct": true + }, + { + "text": "$40$", + "mistake": "whole_diag" + }, + { + "text": "$10$", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במלבן $ABCD$, $O$ נקודת חיתוך האלכסונים ו־$∢OAB = 25°$. מה גודל $∢OBA$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang O A B 25°; ang A B O ?", + "choices": [ + { + "text": "$25°$", + "correct": true + }, + { + "text": "$65°$", + "mistake": "median_iso" + }, + { + "text": "$50°$", + "mistake": "median_iso" + } + ] + }, + { + "question": "במלבן $ABCD$, $O$ נקודת חיתוך האלכסונים ו־$∢OBC = 35°$. מה גודל $∢BOC$?", + "figure": "A=0,0; B=6,0; C=6,3.6; D=0,3.6; O=3,1.8@w; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; ang O B C 35°; ang B O C ?", + "choices": [ + { + "text": "$110°$", + "correct": true + }, + { + "text": "$70°$", + "mistake": "median_iso" + }, + { + "text": "$35°$", + "mistake": "median_iso" + } + ] + }, + { + "question": "בריבוע $ABCD$ האלכסון $10$, ו־$O$ אמצע האלכסון $AC$. מה $OB$?", + "figure": "A=0,0; B=4,0; C=4,4; D=0,4; O=2,2@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; lenx O B ?; note AC = 10", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "whole_diag" + }, + { + "text": "$5√2$", + "mistake": "pyth" + } + ] + }, + { + "question": "בטרפז ישר זווית $ABCD$ ($AB ∥ DC$, $∢D = 90°$) $M$ אמצע $AC$ ו־$AC = 12$. מה $DM$?", + "figure": "A=0,0; B=7,0; C=4,3; D=0,3; M=2,1.5@se; poly A B C D; par A B 1; par D C 1; right A D C; line A C; dot M; dash D M; len D M ?; note AC = 12", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$12$", + "mistake": "whole_diag" + }, + { + "text": "אי אפשר לדעת", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במעוין $ABCD$ האלכסונים נחתכים ב־$O$, ו־$M$ אמצע הצלע $AB = 10$. מה $OM$?", + "figure": "A=-3.46,0; B=0,-2; C=3.46,0; D=0,2; O=0,0@se; M=-1.73,-1@sw; poly A B C D; tick A B 1; tick B C 1; tick C D 1; tick D A 1; line A C; line B D; dot O; dot M; dash O M; lenx O M ?; note AB = 10", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "whole_diag" + }, + { + "text": "אי אפשר לדעת", + "mistake": "median_hyp_rule" + } + ] + }, + { + "question": "במלבן $ABCD$: $AB = 8$, $BC = 6$, ו־$O$ נקודת חיתוך האלכסונים. מה $BO$?", + "figure": "A=0,0; B=8,0; C=8,6; D=0,6; O=4,3@s; poly A B C D; right B A D; right C B A; right D C B; right A D C; line A C; line B D; dot O; len A B 8; len B C 6; lenx B O ?", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$10$", + "mistake": "whole_diag" + }, + { + "text": "$7$", + "mistake": "pyth" + } + ] + } + ] + }, + { + "id": "p_mult_div", + "unit": "p", + "name": "כפל וחילוק חזקות", + "short": "כפל וחילוק חזקות", + "prereqs": [], + "description": "בכפל חזקות עם אותו בסיס מחברים מעריכים; בחילוק מחסרים מעריכים.", + "month": "מאי", + "questions": [ + { + "question": "$a³ · a⁵ = ?$", + "choices": [ + { + "text": "$a⁸$", + "correct": true + }, + { + "text": "$a¹⁵$", + "mistake": "mult_exponents" + }, + { + "text": "$2a⁸$", + "mistake": "coef_doubled" + } + ] + }, + { + "question": "$x¹² : x⁴ = ?$", + "choices": [ + { + "text": "$x⁸$", + "correct": true + }, + { + "text": "$x³$", + "mistake": "div_exponents" + }, + { + "text": "$x¹⁶$", + "mistake": "div_as_mult" + } + ] + }, + { + "question": "$2⁵ · 2³ = ?$", + "choices": [ + { + "text": "$2⁸$", + "correct": true + }, + { + "text": "$2¹⁵$", + "mistake": "mult_exponents" + }, + { + "text": "$4⁸$", + "mistake": "coef_doubled" + } + ] + }, + { + "question": "$y⁷ : y⁴ = ?$", + "choices": [ + { + "text": "$y³$", + "correct": true + }, + { + "text": "$y¹¹$", + "mistake": "div_as_mult" + }, + { + "text": "$y^(7/4)$", + "mistake": "div_exponents" + } + ] + }, + { + "question": "$3x² · 4x⁵ = ?$", + "choices": [ + { + "text": "$12x⁷$", + "correct": true + }, + { + "text": "$7x⁷$", + "mistake": "coef_doubled" + }, + { + "text": "$12x¹⁰$", + "mistake": "mult_exponents" + } + ] + }, + { + "question": "$10a⁶ : 2a² = ?$", + "choices": [ + { + "text": "$5a⁴$", + "correct": true + }, + { + "text": "$5a³$", + "mistake": "div_exponents" + }, + { + "text": "$8a⁴$", + "mistake": "div_as_mult" + } + ] + }, + { + "question": "$5⁹ : 5⁷ = ?$", + "choices": [ + { + "text": "$25$", + "correct": true + }, + { + "text": "$5^(9/7)$", + "mistake": "div_exponents" + }, + { + "text": "$1$", + "mistake": "div_exponents" + } + ] + }, + { + "question": "$x³ · x · x⁴ = ?$", + "choices": [ + { + "text": "$x⁸$", + "correct": true + }, + { + "text": "$x⁷$", + "mistake": "mult_exponents" + }, + { + "text": "$x¹²$", + "mistake": "mult_exponents" + } + ] + }, + { + "question": "$a⁵ · a⁵ : a² = ?$", + "choices": [ + { + "text": "$a⁸$", + "correct": true + }, + { + "text": "$a²³$", + "mistake": "mult_exponents" + }, + { + "text": "$a¹²$", + "mistake": "div_as_mult" + } + ] + }, + { + "question": "עבור איזה $n$ מתקיים $2ⁿ · 2³ = 2¹⁰$?", + "choices": [ + { + "text": "$n = 7$", + "correct": true + }, + { + "text": "$n = 13$", + "mistake": "div_as_mult" + }, + { + "text": "$n = 10/3$", + "mistake": "mult_exponents" + } + ] + } + ] + }, + { + "id": "p_power_product", + "unit": "p", + "name": "חזקה של חזקה, של מכפלה ושל מנה", + "short": "חזקה של חזקה", + "prereqs": [ + "p_mult_div" + ], + "description": "$(aᵐ)ⁿ = aᵐⁿ$, $(ab)ⁿ = aⁿbⁿ$ ו־$(a/b)ⁿ = aⁿ/bⁿ$.", + "month": "מאי", + "questions": [ + { + "question": "$(y⁴)³ = ?$", + "choices": [ + { + "text": "$y¹²$", + "correct": true + }, + { + "text": "$y⁷$", + "mistake": "pow_pow_add" + }, + { + "text": "$y⁶⁴$", + "mistake": "pow_tower" + } + ] + }, + { + "question": "$(2x³)⁴ = ?$", + "choices": [ + { + "text": "$16x¹²$", + "correct": true + }, + { + "text": "$8x¹²$", + "mistake": "coef_mult" + }, + { + "text": "$2x¹²$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(3a²b)² = ?$", + "choices": [ + { + "text": "$9a⁴b²$", + "correct": true + }, + { + "text": "$6a⁴b²$", + "mistake": "coef_mult" + }, + { + "text": "$9a⁴b$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "$(x/3)³ = ?$", + "choices": [ + { + "text": "$x³/27$", + "correct": true + }, + { + "text": "$x³/3$", + "mistake": "denom_not_raised" + }, + { + "text": "$x³/9$", + "mistake": "coef_mult" + } + ] + }, + { + "question": "$(2⁵)² = ?$", + "choices": [ + { + "text": "$2¹⁰$", + "correct": true + }, + { + "text": "$2⁷$", + "mistake": "pow_pow_add" + }, + { + "text": "$4¹⁰$", + "mistake": "coef_doubled" + } + ] + }, + { + "question": "$(−2)⁴ = ?$", + "choices": [ + { + "text": "$16$", + "correct": true + }, + { + "text": "$−16$", + "mistake": "neg_base_power" + }, + { + "text": "$−8$", + "mistake": "coef_mult" + } + ] + }, + { + "question": "$−2⁴ = ?$", + "choices": [ + { + "text": "$−16$", + "correct": true + }, + { + "text": "$16$", + "mistake": "neg_base_power" + }, + { + "text": "$−8$", + "mistake": "coef_mult" + } + ] + }, + { + "question": "$(a²)³ · a = ?$", + "choices": [ + { + "text": "$a⁷$", + "correct": true + }, + { + "text": "$a⁶$", + "mistake": "pow_pow_add" + }, + { + "text": "$a⁹$", + "mistake": "pow_pow_add" + } + ] + }, + { + "question": "$(5x)² : (5x) = ?$", + "choices": [ + { + "text": "$5x$", + "correct": true + }, + { + "text": "$1$", + "mistake": "cancel_power" + }, + { + "text": "$x$", + "mistake": "coef_not_raised" + } + ] + }, + { + "question": "מה גדול יותר: $4¹⁴$ או $2³⁰$?", + "choices": [ + { + "text": "$2³⁰$", + "correct": true + }, + { + "text": "$4¹⁴$", + "mistake": "bigger_base" + }, + { + "text": "הם שווים", + "mistake": "pow_pow_add" + } + ] + } + ] + }, + { + "id": "p_zero", + "unit": "p", + "name": "מעריך אפס", + "short": "מעריך אפס", + "prereqs": [ + "p_mult_div" + ], + "description": "כל מספר שונה מאפס בחזקת $0$ שווה $1$, כי $aⁿ : aⁿ = a⁰ = 1$.", + "month": "מאי", + "questions": [ + { + "question": "$7⁰ = ?$", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$0$", + "mistake": "zero_power" + }, + { + "text": "$7$", + "mistake": "zero_power" + } + ] + }, + { + "question": "$(−3)⁰ = ?$", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$−1$", + "mistake": "zero_power" + }, + { + "text": "$0$", + "mistake": "zero_power" + } + ] + }, + { + "question": "$5 · 2⁰ = ?$", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$0$", + "mistake": "zero_power" + }, + { + "text": "$10$", + "mistake": "zero_power" + } + ] + }, + { + "question": "$x⁵ : x⁵ = ?$", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$0$", + "mistake": "zero_power" + }, + { + "text": "$x$", + "mistake": "div_exponents" + } + ] + }, + { + "question": "$(2x)⁰ + 3 = ?$", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$3$", + "mistake": "zero_power" + }, + { + "text": "$2x + 3$", + "mistake": "zero_power" + } + ] + }, + { + "question": "$10⁰ + 10¹ = ?$", + "choices": [ + { + "text": "$11$", + "correct": true + }, + { + "text": "$10$", + "mistake": "zero_power" + }, + { + "text": "$20$", + "mistake": "zero_power" + } + ] + }, + { + "question": "$a³ · a⁰ = ?$", + "choices": [ + { + "text": "$a³$", + "correct": true + }, + { + "text": "$0$", + "mistake": "zero_power" + }, + { + "text": "$a⁰$", + "mistake": "zero_power" + } + ] + }, + { + "question": "$4⁰ · 4² = ?$", + "choices": [ + { + "text": "$16$", + "correct": true + }, + { + "text": "$0$", + "mistake": "zero_power" + }, + { + "text": "$8$", + "mistake": "coef_mult" + } + ] + }, + { + "question": "$(7⁰)³ = ?$", + "choices": [ + { + "text": "$1$", + "correct": true + }, + { + "text": "$7³$", + "mistake": "zero_power" + }, + { + "text": "$0$", + "mistake": "zero_power" + } + ] + }, + { + "question": "עבור איזה $n$ מתקיים $3ⁿ = 1$?", + "choices": [ + { + "text": "$n = 0$", + "correct": true + }, + { + "text": "$n = 1$", + "mistake": "zero_power" + }, + { + "text": "$n = 1/3$", + "mistake": "zero_power" + } + ] + } + ] + }, + { + "id": "p_sqrt", + "unit": "p", + "name": "חוקי שורש ריבועי", + "short": "חוקי שורש", + "prereqs": [], + "description": "$√a · √b = √(ab)$ ו־$√a : √b = √(a : b)$, אבל שורש של סכום אינו סכום השורשים.", + "month": "מאי", + "questions": [ + { + "question": "$√12 · √3 = ?$", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$√15$", + "mistake": "sqrt_add" + }, + { + "text": "$36$", + "mistake": "sqrt_forgot" + } + ] + }, + { + "question": "$√50 : √2 = ?$", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$25$", + "mistake": "sqrt_forgot" + }, + { + "text": "$√48$", + "mistake": "sqrt_add" + } + ] + }, + { + "question": "$√9 + √16 = ?$", + "choices": [ + { + "text": "$7$", + "correct": true + }, + { + "text": "$5$", + "mistake": "sqrt_split" + }, + { + "text": "$√25$", + "mistake": "sqrt_split" + } + ] + }, + { + "question": "$√(9 + 16) = ?$", + "choices": [ + { + "text": "$5$", + "correct": true + }, + { + "text": "$7$", + "mistake": "sqrt_split" + }, + { + "text": "$25$", + "mistake": "sqrt_forgot" + } + ] + }, + { + "question": "$√50 = ?$", + "choices": [ + { + "text": "$5√2$", + "correct": true + }, + { + "text": "$25√2$", + "mistake": "sqrt_of_square" + }, + { + "text": "$2√5$", + "mistake": "sqrt_of_square" + } + ] + }, + { + "question": "$(√7)² = ?$", + "choices": [ + { + "text": "$7$", + "correct": true + }, + { + "text": "$49$", + "mistake": "sqrt_forgot" + }, + { + "text": "$√14$", + "mistake": "sqrt_add" + } + ] + }, + { + "question": "$√2 · √8 = ?$", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$√10$", + "mistake": "sqrt_add" + }, + { + "text": "$16$", + "mistake": "sqrt_forgot" + } + ] + }, + { + "question": "$√36x² = ?$ (כאשר $x > 0$)", + "choices": [ + { + "text": "$6x$", + "correct": true + }, + { + "text": "$36x$", + "mistake": "sqrt_forgot" + }, + { + "text": "$6x²$", + "mistake": "sqrt_of_square" + } + ] + }, + { + "question": "$3√5 · 2√5 = ?$", + "choices": [ + { + "text": "$30$", + "correct": true + }, + { + "text": "$6√5$", + "mistake": "sqrt_forgot" + }, + { + "text": "$5√10$", + "mistake": "sqrt_add" + } + ] + }, + { + "question": "$√18 + √8 = ?$", + "choices": [ + { + "text": "$5√2$", + "correct": true + }, + { + "text": "$√26$", + "mistake": "sqrt_split" + }, + { + "text": "$13√2$", + "mistake": "sqrt_of_square" + } + ] + } + ] + }, + { + "id": "w_geo", + "unit": "w", + "name": "שאלות מילוליות הנדסיות", + "short": "מילוליות הנדסיות", + "prereqs": [ + "e_apply_geo" + ], + "description": "מבטאים אורכים בעזרת משתנה, בונים משוואה מנתוני שטח או היקף, ופוסלים פתרונות שאינם אורכים.", + "month": "מאי", + "questions": [ + { + "question": "גינה מלבנית צמודה לקיר, ו־$40$ מ׳ גדר מקיפות את שלוש צלעותיה האחרות. הצלע המקבילה לקיר באורך $y$ והאחרות $x$. איזו משוואה נכונה?", + "choices": [ + { + "text": "$2x + y = 40$", + "correct": true + }, + { + "text": "$2x + 2y = 40$", + "mistake": "wall_side" + }, + { + "text": "$x + y = 40$", + "mistake": "wall_side" + } + ] + }, + { + "question": "גינה צמודה לקיר מוקפת ב־$40$ מ׳ גדר משלושה צדדים, ושטחה $200$ מ״ר. מה אורך הצלע המקבילה לקיר?", + "choices": [ + { + "text": "$20$ מ׳", + "correct": true + }, + { + "text": "$10$ מ׳", + "mistake": "other_quantity" + }, + { + "text": "$40$ מ׳", + "mistake": "wall_side" + } + ] + }, + { + "question": "ריבוע שצלעו $x$. מגדילים את אחת הצלעות ב־$3$ ואת השנייה ב־$2$, ומתקבל מלבן ששטחו $56$. מה $x$?", + "choices": [ + { + "text": "$x = 5$", + "correct": true + }, + { + "text": "$x = 5$ או $x = −10$", + "mistake": "inadmissible" + }, + { + "text": "$x = 7$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "היקף משולש ישר זווית $24$ והיתר $10$. מה אורכי הניצבים?", + "choices": [ + { + "text": "$6$ ו־$8$", + "correct": true + }, + { + "text": "$7$ ו־$7$", + "mistake": "half_product" + }, + { + "text": "$5$ ו־$9$", + "mistake": "pyth" + } + ] + }, + { + "question": "שטח מלבן $48$ וההפרש בין אורכו לרוחבו $2$. מה היקפו?", + "choices": [ + { + "text": "$28$", + "correct": true + }, + { + "text": "$14$", + "mistake": "half_perimeter" + }, + { + "text": "$48$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "מקטינים כל צלע של ריבוע ב־$2$, והשטח קטן ב־$32$. מה אורך צלע הריבוע?", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$8$", + "mistake": "forgot_middle" + }, + { + "text": "$16$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "בסיס משולש גדול ב־$4$ מהגובה אליו, ושטחו $30$. מה אורך הבסיס?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$6$", + "mistake": "other_quantity" + }, + { + "text": "$8$", + "mistake": "forgot_half_area" + } + ] + }, + { + "question": "גינה ריבועית מוקפת בשביל ברוחב $1$ מ׳. השטח הכולל $64$ מ״ר. מה צלע הגינה?", + "choices": [ + { + "text": "$6$ מ׳", + "correct": true + }, + { + "text": "$7$ מ׳", + "mistake": "frame_one_side" + }, + { + "text": "$8$ מ׳", + "mistake": "other_quantity" + } + ] + }, + { + "question": "אורך מלבן גדול פי $3$ מרוחבו, ואלכסונו $√40$. מה רוחבו?", + "choices": [ + { + "text": "$2$", + "correct": true + }, + { + "text": "$√10$", + "mistake": "pyth" + }, + { + "text": "$4$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "שני ריבועים: צלע הגדול גדולה ב־$3$ מצלע הקטן, וסכום שטחיהם $117$. מה צלע הריבוע הקטן?", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$9$", + "mistake": "other_quantity" + }, + { + "text": "$6$ או $−9$", + "mistake": "inadmissible" + } + ] + } + ] + }, + { + "id": "w_general", + "unit": "w", + "name": "שאלות מילוליות כלליות", + "short": "מילוליות כלליות", + "prereqs": [ + "e_apply_num", + "s_algebra" + ], + "description": "בונים משוואה ריבועית או מערכת משוואות ממעלה שנייה מהסיפור, פותרים ובודקים את התשובה.", + "month": "מאי", + "questions": [ + { + "question": "סכום שני מספרים $13$ ומכפלתם $40$. מהם המספרים?", + "choices": [ + { + "text": "$5$ ו־$8$", + "correct": true + }, + { + "text": "$4$ ו־$10$", + "mistake": "product_check" + }, + { + "text": "$6.5$ ו־$6.5$", + "mistake": "half_product" + } + ] + }, + { + "question": "סכום ריבועי שני מספרים $34$ וסכומם $8$. מהם המספרים?", + "choices": [ + { + "text": "$3$ ו־$5$", + "correct": true + }, + { + "text": "$4$ ו־$4$", + "mistake": "half_product" + }, + { + "text": "$1$ ו־$7$", + "mistake": "product_check" + } + ] + }, + { + "question": "מספר דו־ספרתי: מכפלת ספרותיו $12$ וסכומן $7$. איזה מספר יכול להיות?", + "choices": [ + { + "text": "$34$ או $43$", + "correct": true + }, + { + "text": "$26$ או $62$", + "mistake": "product_check" + }, + { + "text": "$34$ בלבד", + "mistake": "both_solutions" + } + ] + }, + { + "question": "גיל האב פי $3$ מגיל בנו, ומכפלת גיליהם $192$. מה גיל הבן?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$24$", + "mistake": "other_quantity" + }, + { + "text": "$64$", + "mistake": "forgot_root" + } + ] + }, + { + "question": "במלבן מסודרים $60$ כיסאות. בכל שורה יש $4$ כיסאות יותר ממספר השורות. כמה שורות?", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$10$", + "mistake": "other_quantity" + }, + { + "text": "$6$ או $−10$", + "mistake": "inadmissible" + } + ] + }, + { + "question": "קבוצה קנתה מתנה ב־$120$ ₪ ושילמה בחלקים שווים. אילו היו $2$ אנשים פחות, כל אחד היה משלם $5$ ₪ יותר. כמה אנשים בקבוצה?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$6$", + "mistake": "other_quantity" + }, + { + "text": "$15$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "מספר חיובי $x$ מקיים $x = 6 / x + 1$. מהו?", + "choices": [ + { + "text": "$3$", + "correct": true + }, + { + "text": "$−2$", + "mistake": "inadmissible" + }, + { + "text": "$6$", + "mistake": "mult_only_one" + } + ] + }, + { + "question": "הפרש בין שני מספרים $5$ ומכפלתם $36$. מהם המספרים?", + "choices": [ + { + "text": "$4$ ו־$9$, או $−9$ ו־$−4$", + "correct": true + }, + { + "text": "$4$ ו־$9$ בלבד", + "mistake": "both_solutions" + }, + { + "text": "$6$ ו־$6$", + "mistake": "product_check" + } + ] + }, + { + "question": "בטורניר כל קבוצה שיחקה פעם אחת מול כל קבוצה אחרת, ונערכו $28$ משחקים. כמה קבוצות?", + "choices": [ + { + "text": "$8$", + "correct": true + }, + { + "text": "$7$", + "mistake": "half_product" + }, + { + "text": "$14$", + "mistake": "half_product" + } + ] + }, + { + "question": "סכום מספר וחצי ריבועו הוא $12$. מהו המספר (חיובי)?", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$−6$", + "mistake": "inadmissible" + }, + { + "text": "$6$", + "mistake": "zero_root_sign" + } + ] + } + ] + }, + { + "id": "w_motion", + "unit": "w", + "name": "שאלות תנועה", + "short": "שאלות תנועה", + "prereqs": [ + "e_technique" + ], + "description": "מרחק = מהירות × זמן. בונים טבלה של מהירות, זמן ומרחק לכל גוף ומשווים את מה שידוע.", + "month": "מאי", + "questions": [ + { + "question": "שתי מכוניות יוצאות זו לקראת זו ממקומות שהמרחק ביניהם $300$ ק״מ, במהירויות $70$ ו־$80$ קמ״ש. אחרי כמה שעות ייפגשו?", + "choices": [ + { + "text": "$2$ שעות", + "correct": true + }, + { + "text": "$30$ שעות", + "mistake": "speed_diff" + }, + { + "text": "$4$ שעות", + "mistake": "one_speed" + } + ] + }, + { + "question": "רוכב נסע $60$ ק״מ. אילו היה נוסע מהר יותר ב־$5$ קמ״ש, היה מגיע שעה מוקדם יותר. מה הייתה מהירותו?", + "choices": [ + { + "text": "$15$ קמ״ש", + "correct": true + }, + { + "text": "$20$ קמ״ש", + "mistake": "other_quantity" + }, + { + "text": "$12$ קמ״ש", + "mistake": "time_units" + } + ] + }, + { + "question": "שתי מכוניות יוצאות מאותה נקודה באותו כיוון, במהירויות $90$ ו־$60$ קמ״ש. מה המרחק ביניהן אחרי $2$ שעות?", + "choices": [ + { + "text": "$60$ ק״מ", + "correct": true + }, + { + "text": "$300$ ק״מ", + "mistake": "relative_speed" + }, + { + "text": "$30$ ק״מ", + "mistake": "relative_speed" + } + ] + }, + { + "question": "הולך רגל הולך $30$ דקות במהירות $6$ קמ״ש. איזה מרחק עבר?", + "choices": [ + { + "text": "$3$ ק״מ", + "correct": true + }, + { + "text": "$180$ ק״מ", + "mistake": "time_units" + }, + { + "text": "$5$ ק״מ", + "mistake": "time_units" + } + ] + }, + { + "question": "רכבת עברה $240$ ק״מ. מהירותה הייתה גדולה ב־$20$ קמ״ש ממה שתוכנן, ולכן הגיעה שעה מוקדם יותר. מה הייתה מהירותה בפועל?", + "choices": [ + { + "text": "$80$ קמ״ש", + "correct": true + }, + { + "text": "$60$ קמ״ש", + "mistake": "other_quantity" + }, + { + "text": "$120$ קמ״ש", + "mistake": "one_speed" + } + ] + }, + { + "question": "שני רוכבים יוצאים בו־זמנית זה לקראת זה ממקומות שהמרחק ביניהם $90$ ק״מ, ונפגשים אחרי $3$ שעות. מהירות האחד $14$ קמ״ש. מה מהירות השני?", + "choices": [ + { + "text": "$16$ קמ״ש", + "correct": true + }, + { + "text": "$30$ קמ״ש", + "mistake": "speed_diff" + }, + { + "text": "$44$ קמ״ש", + "mistake": "one_speed" + } + ] + }, + { + "question": "סירה שטה $24$ ק״מ במורד הנהר במהירות $8$ קמ״ש ובחזרה במהירות $4$ קמ״ש. כמה זמן נמשך הכול?", + "choices": [ + { + "text": "$9$ שעות", + "correct": true + }, + { + "text": "$4$ שעות", + "mistake": "one_speed" + }, + { + "text": "$6$ שעות", + "mistake": "speed_diff" + } + ] + }, + { + "question": "מכונית נוסעת במהירות $x$ קמ״ש ועוברת $150$ ק״מ. כמה זמן נסעה?", + "choices": [ + { + "text": "$150 / x$ שעות", + "correct": true + }, + { + "text": "$150x$ שעות", + "mistake": "mult_instead" + }, + { + "text": "$x / 150$ שעות", + "mistake": "inverse" + } + ] + }, + { + "question": "אופנוען עבר $120$ ק״מ. על כל ק״מ הוא נסע מהר יותר ב־$10$ קמ״ש ממשאית, ועבר את המרחק בשעה פחות. מה מהירות המשאית?", + "choices": [ + { + "text": "$30$ קמ״ש", + "correct": true + }, + { + "text": "$40$ קמ״ש", + "mistake": "other_quantity" + }, + { + "text": "$−40$ קמ״ש", + "mistake": "inadmissible" + } + ] + }, + { + "question": "שתי מכוניות יוצאות מאותה נקודה, אחת צפונה במהירות $60$ קמ״ש ואחת מזרחה במהירות $80$ קמ״ש. מה המרחק ביניהן אחרי שעה?", + "choices": [ + { + "text": "$100$ ק״מ", + "correct": true + }, + { + "text": "$140$ ק״מ", + "mistake": "pyth" + }, + { + "text": "$20$ ק״מ", + "mistake": "relative_speed" + } + ] + } + ] + }, + { + "id": "w_percent", + "unit": "w", + "name": "שאלות עם אחוזים", + "short": "שאלות אחוזים", + "prereqs": [], + "description": "שינוי באחוזים מחושב מהכמות שלפני השינוי. שינויים חוזרים מצטברים בכפל.", + "month": "מאי", + "questions": [ + { + "question": "מחיר מוצר $80$ ₪ עלה ב־$25%$. מה מחירו החדש?", + "choices": [ + { + "text": "$100$ ₪", + "correct": true + }, + { + "text": "$105$ ₪", + "mistake": "percent_as_shekel" + }, + { + "text": "$20$ ₪", + "mistake": "other_quantity" + } + ] + }, + { + "question": "אחרי הנחה של $15%$ מחיר חולצה $68$ ₪. מה היה מחירה לפני ההנחה?", + "choices": [ + { + "text": "$80$ ₪", + "correct": true + }, + { + "text": "$78.2$ ₪", + "mistake": "percent_of_new" + }, + { + "text": "$83$ ₪", + "mistake": "percent_as_shekel" + } + ] + }, + { + "question": "מחיר עלה ב־$20%$ ואחר כך ירד ב־$20%$. מה השינוי הכולל?", + "choices": [ + { + "text": "ירידה של $4%$", + "correct": true + }, + { + "text": "אין שינוי", + "mistake": "percent_add" + }, + { + "text": "ירידה של $20%$", + "mistake": "percent_add" + } + ] + }, + { + "question": "מחיר עלה פעמיים באותו אחוז, ובסך הכול ב־$21%$. באיזה אחוז עלה בכל פעם?", + "choices": [ + { + "text": "$10%$", + "correct": true + }, + { + "text": "$10.5%$", + "mistake": "percent_split" + }, + { + "text": "$21%$", + "mistake": "square_total" + } + ] + }, + { + "question": "$30%$ מתוך $250$ תלמידים הם בני ט׳. כמה בני ט׳?", + "choices": [ + { + "text": "$75$", + "correct": true + }, + { + "text": "$30$", + "mistake": "percent_as_shekel" + }, + { + "text": "$220$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "משכורת $8000$ ₪ עלתה ב־$5%$. מה המשכורת החדשה?", + "choices": [ + { + "text": "$8400$ ₪", + "correct": true + }, + { + "text": "$8005$ ₪", + "mistake": "percent_as_shekel" + }, + { + "text": "$400$ ₪", + "mistake": "other_quantity" + } + ] + }, + { + "question": "מחיר ירד מ־$200$ ₪ ל־$150$ ₪. בכמה אחוזים ירד?", + "choices": [ + { + "text": "$25%$", + "correct": true + }, + { + "text": "$50%$", + "mistake": "percent_as_shekel" + }, + { + "text": "$33.3%$", + "mistake": "percent_base" + } + ] + }, + { + "question": "מספר תושבים גדל מ־$5000$ ל־$6050$ בשנתיים, באותו אחוז בכל שנה. מה אחוז הגידול השנתי?", + "choices": [ + { + "text": "$10%$", + "correct": true + }, + { + "text": "$10.5%$", + "mistake": "percent_split" + }, + { + "text": "$21%$", + "mistake": "square_total" + } + ] + }, + { + "question": "בחנות הנחה של $10%$ ועוד $10%$ על המחיר המוזל. מה ההנחה הכוללת?", + "choices": [ + { + "text": "$19%$", + "correct": true + }, + { + "text": "$20%$", + "mistake": "percent_add" + }, + { + "text": "$1%$", + "mistake": "percent_split" + } + ] + }, + { + "question": "מחיר אחרי עלייה של $25%$ הוא $150$ ₪. מה היה המחיר לפני העלייה?", + "choices": [ + { + "text": "$120$ ₪", + "correct": true + }, + { + "text": "$112.5$ ₪", + "mistake": "percent_of_new" + }, + { + "text": "$125$ ₪", + "mistake": "percent_as_shekel" + } + ] + } + ] + }, + { + "id": "w_literacy", + "unit": "w", + "name": "שאלות אוריינות", + "short": "אוריינות", + "prereqs": [ + "w_geo", + "w_percent" + ], + "description": "קוראים נתונים מטקסט, טבלה או גרף, בוחרים מודל מתמטי מתאים ובודקים שהתשובה הגיונית בהקשר.", + "month": "מאי", + "questions": [ + { + "question": "חברת מוניות גובה $12$ ₪ בכניסה ועוד $3$ ₪ לכל ק״מ. כמה עולה נסיעה של $8$ ק״מ?", + "choices": [ + { + "text": "$36$ ₪", + "correct": true + }, + { + "text": "$24$ ₪", + "mistake": "read_table" + }, + { + "text": "$120$ ₪", + "mistake": "mult_all" + } + ] + }, + { + "question": "באותה חברת מוניות ($12$ ₪ בכניסה ועוד $3$ ₪ לק״מ) נסיעה עלתה $45$ ₪. כמה ק״מ נסעו?", + "choices": [ + { + "text": "$11$ ק״מ", + "correct": true + }, + { + "text": "$15$ ק״מ", + "mistake": "read_table" + }, + { + "text": "$19$ ק״מ", + "mistake": "move_sign" + } + ] + }, + { + "question": "מסלול א׳: $50$ ₪ לחודש ו־$0.2$ ₪ לדקה. מסלול ב׳: $0.5$ ₪ לדקה בלי תשלום חודשי. מאיזה מספר דקות מסלול א׳ זול יותר?", + "choices": [ + { + "text": "החל מ־$167$ דקות", + "correct": true + }, + { + "text": "החל מ־$100$ דקות", + "mistake": "read_table" + }, + { + "text": "החל מ־$250$ דקות", + "mistake": "read_table" + } + ] + }, + { + "question": "גובה עץ (במטרים) אחרי $t$ שנים הוא $0.5t + 2$. אחרי כמה שנים יגיע ל־$7$ מ׳?", + "choices": [ + { + "text": "$10$ שנים", + "correct": true + }, + { + "text": "$5$ שנים", + "mistake": "forgot_divide" + }, + { + "text": "$18$ שנים", + "mistake": "move_sign" + } + ] + }, + { + "question": "בכיתה $30$ תלמידים, ו־$40%$ מהם בנות. כמה בנים בכיתה?", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$12$", + "mistake": "other_quantity" + }, + { + "text": "$26$", + "mistake": "percent_as_shekel" + } + ] + }, + { + "question": "מפה בקנה מידה $1 : 50000$. מרחק של $4$ ס״מ במפה הוא במציאות:", + "choices": [ + { + "text": "$2$ ק״מ", + "correct": true + }, + { + "text": "$200$ מ׳", + "mistake": "unit_conv" + }, + { + "text": "$20$ ק״מ", + "mistake": "unit_conv" + } + ] + }, + { + "question": "מיכל מלא $600$ ליטר ומתרוקן ב־$25$ ליטר בדקה. אחרי כמה דקות יישארו בו $200$ ליטר?", + "choices": [ + { + "text": "$16$ דקות", + "correct": true + }, + { + "text": "$8$ דקות", + "mistake": "other_quantity" + }, + { + "text": "$24$ דקות", + "mistake": "other_quantity" + } + ] + }, + { + "question": "רצפה מלבנית $4$ מ׳ על $3$ מ׳ מרוצפת באריחים ריבועיים של $20$ ס״מ. כמה אריחים צריך?", + "choices": [ + { + "text": "$300$", + "correct": true + }, + { + "text": "$60$", + "mistake": "unit_conv" + }, + { + "text": "$35$", + "mistake": "area_perimeter" + } + ] + }, + { + "question": "בסקר השתתפו $400$ אנשים, ו־$35%$ מהם ענו „כן“. כמה ענו „לא“, אם כל השאר ענו „לא“?", + "choices": [ + { + "text": "$260$", + "correct": true + }, + { + "text": "$140$", + "mistake": "other_quantity" + }, + { + "text": "$365$", + "mistake": "percent_as_shekel" + } + ] + }, + { + "question": "אריזה של $6$ בקבוקים עולה $21$ ₪, ובקבוק בודד עולה $4$ ₪. כמה חוסכים בקניית אריזה לעומת $6$ בקבוקים בודדים?", + "choices": [ + { + "text": "$3$ ₪", + "correct": true + }, + { + "text": "$17$ ₪", + "mistake": "read_table" + }, + { + "text": "$0.5$ ₪", + "mistake": "other_quantity" + } + ] + } + ] + }, + { + "id": "d_ratio", + "unit": "d", + "name": "משולשים דומים ויחס הדמיון", + "short": "יחס דמיון", + "prereqs": [], + "description": "במשולשים דומים הזוויות המתאימות שוות, והצלעות המתאימות פרופורציוניות ביחס הדמיון.", + "month": "מאי", + "questions": [ + { + "question": "$△ABC ∼ △DEF$: $AB = 6$, $DE = 9$, $BC = 8$. מה $EF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.44,0; F=6.29,3.3; poly A B C; poly D E F; len A B 6; len B C 8; len D E 9; len E F ?", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$11$", + "mistake": "add_vs_ratio" + }, + { + "text": "$16/3$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ו־$∢A = 50°$. מה גודל $∢D$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.44,0; F=6.29,3.3; poly A B C; poly D E F; ang B A C 50°; ang E D F ?", + "choices": [ + { + "text": "$50°$", + "correct": true + }, + { + "text": "$75°$", + "mistake": "angle_scale" + }, + { + "text": "אי אפשר לדעת", + "mistake": "angle_scale" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$: $AB = 4$, $DE = 10$. מה יחס הדמיון $△DEF : △ABC$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=12.64,0; F=7.39,5.5; poly A B C; poly D E F; len A B 4; len D E 10", + "choices": [ + { + "text": "$2.5$", + "correct": true + }, + { + "text": "$0.4$", + "mistake": "ratio_inverted" + }, + { + "text": "$6$", + "mistake": "add_vs_ratio" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ביחס $1 : 3$, ו־$AC = 5$. מה $DF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=12.64,0; F=7.39,5.5; poly A B C; poly D E F; len A C 5; len D F ?", + "choices": [ + { + "text": "$15$", + "correct": true + }, + { + "text": "$8$", + "mistake": "add_vs_ratio" + }, + { + "text": "$5/3$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$: $AB = 6$, $BC = 8$, $DE = 3$. מה $EF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=6.24,0; F=5.19,1.1; poly A B C; poly D E F; len A B 6; len B C 8; len D E 3; len E F ?", + "choices": [ + { + "text": "$4$", + "correct": true + }, + { + "text": "$16$", + "mistake": "ratio_inverted" + }, + { + "text": "$5$", + "mistake": "add_vs_ratio" + } + ] + }, + { + "question": "$△ABC ∼ △PQR$. איזו צלע מתאימה ל־$BC$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; P=4.64,0; Q=9.44,0; R=6.29,3.3; poly A B C; poly P Q R", + "choices": [ + { + "text": "$QR$", + "correct": true + }, + { + "text": "$PQ$", + "mistake": "similar_order" + }, + { + "text": "$PR$", + "mistake": "similar_order" + } + ] + }, + { + "question": "במשולש $ABC$, $DE ∥ BC$ ($D$ על $AB$, $E$ על $AC$): $AD = 2$, $AB = 6$, $BC = 9$. מה $DE$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=1.6,3.07@w; E=3.73,3.07@e; poly A B C; line D E; par D E 1; par B C 1; len A D 2; len B C 9; lenx D E ?; note AB = 6", + "choices": [ + { + "text": "$3$", + "correct": true + }, + { + "text": "$5$", + "mistake": "add_vs_ratio" + }, + { + "text": "$27$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ו־$∢B = 70°$, $∢C = 40°$. מה גודל $∢D$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.44,0; F=6.29,3.3; poly A B C; poly D E F; ang A B C 70°; ang B C A 40°; ang E D F ?", + "choices": [ + { + "text": "$70°$", + "correct": true + }, + { + "text": "$40°$", + "mistake": "similar_order" + }, + { + "text": "$140°$", + "mistake": "angle_scale" + } + ] + }, + { + "question": "צלעות משולש $3$, $4$, $5$. במשולש דומה הצלע הקטנה $6$. מהן שאר הצלעות?", + "figure": "_a=0,0; _b=4,0; _c=0,3; _d=5.8,0; _e=13.8,0; _f=5.8,6; poly _a _b _c; poly _d _e _f; len _a _b 4; len _a _c 3; len _b _c 5; len _d _f 6; len _d _e ?; len _e _f ?", + "choices": [ + { + "text": "$8$ ו־$10$", + "correct": true + }, + { + "text": "$7$ ו־$8$", + "mistake": "add_vs_ratio" + }, + { + "text": "$2$ ו־$2.5$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "במשולש $ABC$, $DE ∥ BC$: $AD = 3$, $DB = 2$, $DE = 6$. מה $BC$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=0.96,1.84@w; E=4.8,1.84@e; poly A B C; line D E; par D E 1; par B C 1; len A D 3; len D B 2; lenx D E 6; len B C ?", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$4$", + "mistake": "wrong_segment" + }, + { + "text": "$9$", + "mistake": "wrong_segment" + } + ] + } + ] + }, + { + "id": "d_perimeter", + "unit": "d", + "name": "יחס ההיקפים במשולשים דומים", + "short": "יחס היקפים", + "prereqs": [ + "d_ratio" + ], + "description": "יחס ההיקפים של משולשים דומים שווה ליחס הדמיון.", + "month": "מאי", + "questions": [ + { + "question": "יחס הדמיון בין שני משולשים $2 : 3$. מה יחס ההיקפים?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=9.44,0; _f=6.29,3.3; poly _a _b _c; poly _d _e _f; note k = 2 : 3", + "choices": [ + { + "text": "$2 : 3$", + "correct": true + }, + { + "text": "$4 : 9$", + "mistake": "perim_square" + }, + { + "text": "$3 : 2$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ביחס $1 : 4$, והיקף $ABC$ הוא $15$. מה היקף $DEF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=12.64,0; F=7.39,5.5; poly A B C; poly D E F; note k = 1 : 4, P(ABC) = 15", + "choices": [ + { + "text": "$60$", + "correct": true + }, + { + "text": "$240$", + "mistake": "perim_square" + }, + { + "text": "$15/4$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "היקפי שני משולשים דומים $12$ ו־$30$. מה יחס הדמיון?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=12.64,0; _f=7.39,5.5; poly _a _b _c; poly _d _e _f; note P₁ = 12, P₂ = 30", + "choices": [ + { + "text": "$2 : 5$", + "correct": true + }, + { + "text": "$4 : 25$", + "mistake": "perim_square" + }, + { + "text": "$5 : 2$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$: $AB = 5$, $DE = 15$, והיקף $DEF$ הוא $36$. מה היקף $ABC$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=12.64,0; F=7.39,5.5; poly A B C; poly D E F; len A B 5; len D E 15; note P(DEF) = 36", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$4$", + "mistake": "perim_square" + }, + { + "text": "$108$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "צלעות משולש $5$, $6$, $7$. מה היקף משולש דומה לו ביחס $3$?", + "figure": "_a=0,0; _b=7,0; _c=2.71,4.2; _d=10.15,0; _e=24.15,0; _f=15.58,8.4; poly _a _b _c; poly _d _e _f; len _a _b 7; len _a _c 5; len _b _c 6; note k = 3", + "choices": [ + { + "text": "$54$", + "correct": true + }, + { + "text": "$162$", + "mistake": "perim_square" + }, + { + "text": "$21$", + "mistake": "add_vs_ratio" + } + ] + }, + { + "question": "יחס ההיקפים של שני משולשים דומים $3 : 5$. מה יחס הצלעות המתאימות?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=9.97,0; _f=6.47,3.67; poly _a _b _c; poly _d _e _f; note P₁ : P₂ = 3 : 5", + "choices": [ + { + "text": "$3 : 5$", + "correct": true + }, + { + "text": "$9 : 25$", + "mistake": "perim_square" + }, + { + "text": "$√3 : √5$", + "mistake": "perim_square" + } + ] + }, + { + "question": "היקף משולש $24$. מקטינים אותו ביחס $1 : 2$. מה היקף המשולש החדש?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=6.24,0; _f=5.19,1.1; poly _a _b _c; poly _d _e _f; note P = 24, k = 1 : 2", + "choices": [ + { + "text": "$12$", + "correct": true + }, + { + "text": "$6$", + "mistake": "perim_square" + }, + { + "text": "$48$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "במשולש $ABC$, $DE ∥ BC$ ו־$AD : AB = 1 : 3$. היקף $ABC$ הוא $27$. מה היקף $ADE$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=1.6,3.07@w; E=3.73,3.07@e; poly A B C; line D E; par D E 1; par B C 1; note AD : AB = 1 : 3, P(ABC) = 27", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$3$", + "mistake": "perim_square" + }, + { + "text": "$13.5$", + "mistake": "wrong_segment" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$, והיקפיהם $20$ ו־$50$. $BC = 8$. מה $EF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=12.64,0; F=7.39,5.5; poly A B C; poly D E F; len B C 8; len E F ?; note P(ABC) = 20, P(DEF) = 50", + "choices": [ + { + "text": "$20$", + "correct": true + }, + { + "text": "$50$", + "mistake": "perim_square" + }, + { + "text": "$16/5$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "מגדילים משולש כך שכל צלע גדלה פי $1.5$. פי כמה גדל ההיקף?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=9.44,0; _f=6.29,3.3; poly _a _b _c; poly _d _e _f; note k = 1.5", + "choices": [ + { + "text": "פי $1.5$", + "correct": true + }, + { + "text": "פי $2.25$", + "mistake": "perim_square" + }, + { + "text": "פי $4.5$", + "mistake": "add_vs_ratio" + } + ] + } + ] + }, + { + "id": "d_area", + "unit": "d", + "name": "יחס השטחים במשולשים דומים", + "short": "יחס שטחים", + "prereqs": [ + "d_ratio" + ], + "description": "יחס השטחים של משולשים דומים שווה לריבוע יחס הדמיון: אם יחס הדמיון $k$, יחס השטחים $k²$.", + "month": "מאי", + "questions": [ + { + "question": "יחס הדמיון בין שני משולשים $2 : 3$. מה יחס השטחים?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=9.44,0; _f=6.29,3.3; poly _a _b _c; poly _d _e _f; note k = 2 : 3", + "choices": [ + { + "text": "$4 : 9$", + "correct": true + }, + { + "text": "$2 : 3$", + "mistake": "area_ratio" + }, + { + "text": "$9 : 4$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ביחס $1 : 3$, ושטח $ABC$ הוא $5$. מה שטח $DEF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=12.64,0; F=7.39,5.5; poly A B C; poly D E F; note k = 1 : 3, S(ABC) = 5", + "choices": [ + { + "text": "$45$", + "correct": true + }, + { + "text": "$15$", + "mistake": "area_ratio" + }, + { + "text": "$5/9$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "מגדילים משולש כך שכל צלע גדלה פי $2$. פי כמה גדל השטח?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=11.04,0; _f=6.84,4.4; poly _a _b _c; poly _d _e _f; note k = 2", + "choices": [ + { + "text": "פי $4$", + "correct": true + }, + { + "text": "פי $2$", + "mistake": "area_ratio" + }, + { + "text": "פי $8$", + "mistake": "area_ratio" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$: $AB = 4$, $DE = 6$, ושטח $ABC$ הוא $16$. מה שטח $DEF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.44,0; F=6.29,3.3; poly A B C; poly D E F; len A B 4; len D E 6; note S(ABC) = 16", + "choices": [ + { + "text": "$36$", + "correct": true + }, + { + "text": "$24$", + "mistake": "area_ratio" + }, + { + "text": "$64/9$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "במשולש $ABC$, $DE ∥ BC$ ו־$AD : AB = 1 : 2$. שטח $ABC$ הוא $40$. מה שטח $ADE$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=1.2,2.3@w; E=4.4,2.3@e; poly A B C; line D E; par D E 1; par B C 1; note AD : AB = 1 : 2, S(ABC) = 40", + "choices": [ + { + "text": "$10$", + "correct": true + }, + { + "text": "$20$", + "mistake": "area_ratio" + }, + { + "text": "$30$", + "mistake": "wrong_segment" + } + ] + }, + { + "question": "במשולש $ABC$, $DE ∥ BC$ ו־$AD : AB = 1 : 2$. שטח $ABC$ הוא $40$. מה שטח הטרפז $DBCE$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=1.2,2.3@w; E=4.4,2.3@e; poly A B C; line D E; par D E 1; par B C 1; note AD : AB = 1 : 2, S(ABC) = 40", + "choices": [ + { + "text": "$30$", + "correct": true + }, + { + "text": "$20$", + "mistake": "area_ratio" + }, + { + "text": "$10$", + "mistake": "other_quantity" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ביחס $3 : 5$, ושטח $DEF$ הוא $50$. מה שטח $ABC$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.97,0; F=6.47,3.67; poly A B C; poly D E F; note k = 3 : 5, S(DEF) = 50", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$30$", + "mistake": "area_ratio" + }, + { + "text": "$1250/9$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "מקטינים משולש ביחס $1 : 10$. איזה חלק מהשטח המקורי נשאר?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=5.92,0; _f=5.08,0.88; poly _a _b _c; poly _d _e _f; note k = 1 : 10", + "choices": [ + { + "text": "$1/100$", + "correct": true + }, + { + "text": "$1/10$", + "mistake": "area_ratio" + }, + { + "text": "$1/20$", + "mistake": "area_ratio" + } + ] + }, + { + "question": "במפה בקנה מידה $1 : 100$ שטח משולש הוא $12$ סמ״ר. מה השטח האמיתי בסמ״ר?", + "figure": "_a=1.1,2.2; _b=0,0; _c=3.2,0; poly _a _b _c; note 1 : 100, S = 12", + "choices": [ + { + "text": "$120000$", + "correct": true + }, + { + "text": "$1200$", + "mistake": "area_ratio" + }, + { + "text": "$12$", + "mistake": "unit_conv" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$ ביחס $k = 1.5$, ושטח $ABC$ הוא $8$. מה שטח $DEF$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.44,0; F=6.29,3.3; poly A B C; poly D E F; note k = 1.5, S(ABC) = 8", + "choices": [ + { + "text": "$18$", + "correct": true + }, + { + "text": "$12$", + "mistake": "area_ratio" + }, + { + "text": "$9.5$", + "mistake": "add_vs_ratio" + } + ] + } + ] + }, + { + "id": "d_area_back", + "unit": "d", + "name": "מיחס השטחים ליחס הדמיון", + "short": "משטחים לדמיון", + "prereqs": [ + "d_area" + ], + "description": "אם יחס השטחים $k²$, יחס הדמיון (ויחס הצלעות וההיקפים) הוא $k$: מוציאים שורש.", + "month": "מאי", + "questions": [ + { + "question": "יחס השטחים של שני משולשים דומים $9 : 16$. מה יחס הדמיון?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=8.91,0; _f=6.11,2.93; poly _a _b _c; poly _d _e _f; note S₁ : S₂ = 9 : 16", + "choices": [ + { + "text": "$3 : 4$", + "correct": true + }, + { + "text": "$9 : 16$", + "mistake": "area_ratio" + }, + { + "text": "$81 : 256$", + "mistake": "area_ratio" + } + ] + }, + { + "question": "שטחי שני משולשים דומים $8$ ו־$50$. מה יחס הצלעות?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=12.64,0; _f=7.39,5.5; poly _a _b _c; poly _d _e _f; note S₁ = 8, S₂ = 50", + "choices": [ + { + "text": "$2 : 5$", + "correct": true + }, + { + "text": "$4 : 25$", + "mistake": "area_ratio" + }, + { + "text": "$5 : 2$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "שטח משולש גדל פי $9$ בלי לשנות את צורתו. פי כמה גדלה כל צלע?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=12.64,0; _f=7.39,5.5; poly _a _b _c; poly _d _e _f; note S₂ = 9 · S₁", + "choices": [ + { + "text": "פי $3$", + "correct": true + }, + { + "text": "פי $9$", + "mistake": "area_ratio" + }, + { + "text": "פי $81$", + "mistake": "area_ratio" + } + ] + }, + { + "question": "$△ABC ∼ △DEF$, ושטחיהם $12$ ו־$27$. $AB = 4$. מה $DE$?", + "figure": "A=0,0; B=3.2,0; C=1.1,2.2; D=4.64,0; E=9.44,0; F=6.29,3.3; poly A B C; poly D E F; len A B 4; len D E ?; note S(ABC) = 12, S(DEF) = 27", + "choices": [ + { + "text": "$6$", + "correct": true + }, + { + "text": "$9$", + "mistake": "area_ratio" + }, + { + "text": "$16/9$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "יחס השטחים של שני משולשים דומים $1 : 4$. מה יחס ההיקפים?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=11.04,0; _f=6.84,4.4; poly _a _b _c; poly _d _e _f; note S₁ : S₂ = 1 : 4", + "choices": [ + { + "text": "$1 : 2$", + "correct": true + }, + { + "text": "$1 : 4$", + "mistake": "perim_square" + }, + { + "text": "$1 : 16$", + "mistake": "area_ratio" + } + ] + }, + { + "question": "שטחי שני משולשים דומים $25$ ו־$36$. היקף הקטן $20$. מה היקף הגדול?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=8.48,0; _f=5.96,2.64; poly _a _b _c; poly _d _e _f; note S₁ = 25, S₂ = 36, P₁ = 20", + "choices": [ + { + "text": "$24$", + "correct": true + }, + { + "text": "$28.8$", + "mistake": "perim_square" + }, + { + "text": "$50/3$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "במשולש $ABC$, $DE ∥ BC$, ושטח $ADE$ הוא רבע משטח $ABC$. מה $AD : AB$?", + "figure": "A=2.4,4.6; B=0,0; C=6.4,0; D=1.2,2.3@w; E=4.4,2.3@e; poly A B C; line D E; par D E 1; par B C 1; note S(ADE) = S(ABC) : 4", + "choices": [ + { + "text": "$1 : 2$", + "correct": true + }, + { + "text": "$1 : 4$", + "mistake": "area_ratio" + }, + { + "text": "$1 : 3$", + "mistake": "wrong_segment" + } + ] + }, + { + "question": "יחס השטחים של שני משולשים דומים $2 : 1$. מה יחס הדמיון?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=6.91,0; _f=5.42,1.56; poly _a _b _c; poly _d _e _f; note S₁ : S₂ = 2 : 1", + "choices": [ + { + "text": "$√2 : 1$", + "correct": true + }, + { + "text": "$2 : 1$", + "mistake": "area_ratio" + }, + { + "text": "$4 : 1$", + "mistake": "area_ratio" + } + ] + }, + { + "question": "שטח משולש $18$, ושטח משולש דומה לו $2$. צלע במשולש הקטן $3$. מה הצלע המתאימה בגדול?", + "figure": "_a=0,0; _b=3.2,0; _c=1.1,2.2; _d=4.64,0; _e=5.92,0; _f=5.08,0.88; poly _a _b _c; poly _d _e _f; len _d _e 3; len _a _b ?; note S₁ = 18, S₂ = 2", + "choices": [ + { + "text": "$9$", + "correct": true + }, + { + "text": "$27$", + "mistake": "area_ratio" + }, + { + "text": "$1$", + "mistake": "ratio_inverted" + } + ] + }, + { + "question": "במפה בקנה מידה $1 : 1000$ שטח מגרש $6$ סמ״ר. מה שטחו האמיתי במ״ר?", + "figure": "_a=1.1,2.2; _b=0,0; _c=3.2,0; poly _a _b _c; note 1 : 1000, S = 6", + "choices": [ + { + "text": "$600$", + "correct": true + }, + { + "text": "$6$", + "mistake": "area_ratio" + }, + { + "text": "$60000$", + "mistake": "unit_conv" + } + ] + } + ] + } + ], + "mistakes": { + "ext_partial": { + "name": "כפל חלקי בפילוג המורחב", + "tip": "כל איבר בסוגריים הראשונים כופל כל איבר בשניים: $(a + b)(c + d) = ac + ad + bc + bd$.", + "back": "t_ext" + }, + "sign_mid": { + "name": "טעות סימן באיבר האמצעי", + "tip": "חברו את שתי המכפלות האמצעיות עם הסימנים שלהן: $3x + (−5x) = −2x$.", + "back": null + }, + "sign_product": { + "name": "סימן של מכפלה", + "tip": "מכפלה של מספר חיובי במספר שלילי היא שלילית: $3 · (−5) = −15$.", + "back": null + }, + "move_sign": { + "name": "העברת אגף בלי החלפת סימן", + "tip": "כשמעבירים איבר לאגף השני מחליפים את סימנו: $5x + 6 = 16 ⇒ 5x = 10$.", + "back": null + }, + "forgot_divide": { + "name": "שכחתם לחלק במקדם", + "tip": "בסוף מחלקים במקדם של $x$: $5x = 10 ⇒ x = 2$.", + "back": null + }, + "forgot_middle": { + "name": "שכחתם את האיבר האמצעי", + "tip": "$(a + b)² = a² + 2ab + b²$, ולא $a² + b²$.", + "back": null + }, + "area_perimeter": { + "name": "היקף במקום שטח", + "tip": "שטח מלבן הוא אורך כפול רוחב; היקף הוא סכום הצלעות.", + "back": null + }, + "diff_order": { + "name": "חיסור בסדר הפוך", + "tip": "„בכמה גדול $A$ מ־$B$“ הוא $A − B$.", + "back": null + }, + "middle_no_2": { + "name": "שכחתם להכפיל ב־2", + "tip": "באיבר האמצעי יש כפל ב־2: $(a − b)² = a² − 2ab + b²$.", + "back": "t_formulas" + }, + "coef_not_raised": { + "name": "המקדם לא הועלה בחזקה", + "tip": "מעלים בחזקה גם את המקדם: $(2x)² = 4x²$, $(3x)² = 9x²$.", + "back": null + }, + "diff_sign": { + "name": "סימן בהפרש ריבועים", + "tip": "$(a + b)(a − b) = a² − b²$: התוצאה היא הפרש.", + "back": "t_formulas" + }, + "diffsq_as_square": { + "name": "בלבול בין הפרש ריבועים לריבוע של הפרש", + "tip": "$(a − b)² = a² − 2ab + b²$, ואילו $(a − b)(a + b) = a² − b²$, בלי איבר אמצעי.", + "back": "t_formulas" + }, + "partial_gcf": { + "name": "לא הוצאתם את כל הגורם המשותף", + "tip": "בדקו גם את המשתנים: $6x² − 9x = 3x(2x − 3)$.", + "back": "t_gcf" + }, + "divide_each": { + "name": "לא חילקתם כל איבר", + "tip": "כל איבר בסוגריים הוא האיבר המקורי חלקי הגורם המשותף: $9x : 3x = 3$.", + "back": "t_gcf" + }, + "sign_of_term": { + "name": "סימן האיבר אבד", + "tip": "הסימן נשאר עם האיבר: $−9x : 3x = −3$.", + "back": null + }, + "signs_swapped": { + "name": "הסימנים התחלפו", + "tip": "צריך שני מספרים שמכפלתם $c$ וסכומם $b$. בדקו את הסימנים בפתיחת הסוגריים.", + "back": "t_trinomial" + }, + "product_only": { + "name": "בדקתם רק את המכפלה", + "tip": "שני המספרים צריכים לתת גם את המכפלה $c$ וגם את הסכום $b$.", + "back": "t_trinomial" + }, + "partial_factor": { + "name": "הפירוק לא הושלם", + "tip": "אחרי הוצאת גורם משותף בדקו אם מה שנשאר מתפרק: $x² − 9 = (x − 3)(x + 3)$.", + "back": null + }, + "gcf_first": { + "name": "פירוק בלי הוצאת גורם משותף", + "tip": "$(2x − 3)(2x + 3) = 4x² − 9$. הוציאו קודם את הגורם המשותף $2$.", + "back": "t_gcf" + }, + "cancel_terms": { + "name": "צמצום של מחוברים", + "tip": "מצמצמים רק גורמים (כופלים), לא מחוברים. פרקו קודם את המונה ואת המכנה.", + "back": null + }, + "factor_sign": { + "name": "צמצום של הגורם הלא נכון", + "tip": "$a² − b² = (a − b)(a + b)$: מצמצמים רק את הגורם שמופיע גם במונה וגם במכנה, והגורם השני נשאר.", + "back": null + }, + "lost_denominator": { + "name": "המכנה נעלם", + "tip": "המכנה לא נעלם: אחרי צמצום נשאר בו כל גורם שלא צומצם.", + "back": null + }, + "div_not_flipped": { + "name": "חילקתם בלי להפוך את השבר", + "tip": "חילוק בשבר הוא כפל בשבר ההפוך: $A/B : C/D = A/B · D/C$.", + "back": null + }, + "cancel_power": { + "name": "צמצום שגוי של חזקה", + "tip": "$x² : x = x$, לא $1$. אחרי הצמצום נשאר גורם $x$.", + "back": null + }, + "kite_rhombus": { + "name": "בלבול בין דלתון למעוין", + "tip": "בדלתון שני זוגות של צלעות סמוכות שוות. רק במעוין כל ארבע הצלעות שוות.", + "back": null + }, + "kite_parallelogram": { + "name": "בלבול בין דלתון למקבילית", + "tip": "צלעות נגדיות שוות הן תכונה של מקבילית. בדלתון הצלעות השוות סמוכות.", + "back": null + }, + "kite_diag_equal": { + "name": "אלכסוני הדלתון אינם שווים", + "tip": "בדלתון האלכסונים מאונכים זה לזה, אך אורכיהם בדרך כלל שונים.", + "back": null + }, + "kite_wrong_pair": { + "name": "הזוויות השוות בדלתון", + "tip": "בדלתון הזוויות השוות הן אלה שבין הצלעות השונות: $∢B = ∢D$.", + "back": "k_def" + }, + "forgot_half": { + "name": "שכחתם לחלק ל־2", + "tip": "שתי הזוויות שוות, ולכן מחלקים את הסכום שלהן ב־2.", + "back": null + }, + "angle_sum_180": { + "name": "סכום הזוויות במרובע", + "tip": "סכום הזוויות במרובע הוא $360°$, לא $180°$.", + "back": null + }, + "kite_diag_bisect": { + "name": "האלכסון הראשי חוצה את המשני", + "tip": "האלכסון הראשי $AC$ הוא אנך אמצעי לאלכסון $BD$, ולכן $BE = BD : 2$.", + "back": null + }, + "reflect_axis": { + "name": "שיקוף ביחס לציר הלא נכון", + "tip": "שיקוף ביחס לציר $y$: $(x, y) → (−x, y)$. שיקוף ביחס לציר $x$: $(x, y) → (x, −y)$.", + "back": null + }, + "swapped_pair": { + "name": "החלפת סדר השיעורים", + "tip": "בנקודה $(x, y)$ השיעור הראשון הוא $x$ והשני $y$.", + "back": null + }, + "iso_wrong_angle": { + "name": "זוויות הבסיס", + "tip": "במשולש שווה שוקיים הזוויות השוות הן זוויות הבסיס, שמול השוקיים: $∢B = ∢C$.", + "back": "i_props" + }, + "forgot_half_angle": { + "name": "שכחתם לחלק בין שתי זוויות הבסיס", + "tip": "$∢B + ∢C = 180° − ∢A$, ושתי הזוויות שוות.", + "back": null + }, + "iso_converse": { + "name": "המשפט ההפוך", + "tip": "אם במשולש שתי זוויות שוות, הצלעות שמולן שוות.", + "back": null + }, + "iso_wrong_side": { + "name": "צלע מול זווית", + "tip": "הצלעות השוות הן אלה שמול הזוויות השוות: $AB$ מול $∢C$ ו־$AC$ מול $∢B$.", + "back": null + }, + "iso_equilateral": { + "name": "מסקנה חזקה מדי", + "tip": "המשפט ההפוך מראה רק ש־$AB = AC$. אין סיבה ש־$BC$ תהיה שווה להן.", + "back": null + }, + "iso_right": { + "name": "גובה אינו זווית ישרה במשולש", + "tip": "הגובה מאונך לצלע, אבל זה לא אומר שאחת מזוויות המשולש ישרה.", + "back": null + }, + "iso_median_bisects": { + "name": "התיכון לבסיס חוצה את זווית הראש", + "tip": "במשולש שווה שוקיים התיכון לבסיס, הגובה לבסיס וחוצה זווית הראש מתלכדים.", + "back": "i_props" + }, + "iso_median_height": { + "name": "התיכון לבסיס הוא גם גובה", + "tip": "במשולש שווה שוקיים התיכון לבסיס מאונך לבסיס, ולכן הזווית $90°$.", + "back": "i_props" + }, + "height_from_axis": { + "name": "גובה נמדד עד הבסיס", + "tip": "הגובה הוא המרחק בין הישרים: הפרש שיעורי ה־$y$, לא שיעור ה־$y$ עצמו.", + "back": null + }, + "iso_half_base": { + "name": "בלבול בין הגובה לחצי הבסיס", + "tip": "חצי הבסיס והגובה הם קטעים שונים. הגובה הוא המרחק מהקודקוד לבסיס.", + "back": null + }, + "opening_sign": { + "name": "סימן $a$ קובע את כיוון הפרבולה", + "tip": "כאשר $a > 0$ הפרבולה פתוחה כלפי מעלה ויש לה מינימום; כאשר $a < 0$ יש לה מקסימום.", + "back": "q_parabola" + }, + "dir_confusion": { + "name": "עלייה וירידה", + "tip": "פונקציה עולה כאשר $y$ גדל ככל ש־$x$ גדל, כלומר כשהגרף מטפס משמאל לימין.", + "back": null + }, + "x_vs_y_interval": { + "name": "תחום נכתב בערכי $x$", + "tip": "תחומים (עלייה, ירידה, חיוביות) מתארים ערכי $x$, לא ערכי $y$.", + "back": null + }, + "vshift_as_h": { + "name": "הזזה אנכית כאופקית", + "tip": "מספר שמחובר מחוץ לפונקציה מזיז את הגרף למעלה או למטה.", + "back": null + }, + "k_sign": { + "name": "סימן ההזזה האנכית", + "tip": "$+k$ מזיז את הגרף למעלה ו־$−k$ למטה.", + "back": null + }, + "hshift_sign": { + "name": "סימן ההזזה האופקית", + "tip": "$f(x − b)$ מזיזה את הגרף $b$ יחידות ימינה, ו־$f(x + b)$ שמאלה.", + "back": null + }, + "h_as_v": { + "name": "הזזה אופקית כאנכית", + "tip": "מספר שבתוך הסוגריים עם $x$ מזיז את הגרף ימינה או שמאלה, לא למעלה או למטה.", + "back": null + }, + "plug_zero": { + "name": "הצבת $x = 0$", + "tip": "הצבת $x = 0$ נותנת את נקודת החיתוך עם ציר $y$, לא את הקודקוד.", + "back": null + }, + "missing_neg_root": { + "name": "שכחתם את הפתרון השלילי", + "tip": "גם למספר שלילי יש ריבוע חיובי: אם $u² = 9$ אז $u = 3$ או $u = −3$.", + "back": null + }, + "vertex_as_root": { + "name": "הקודקוד אינו נקודת חיתוך", + "tip": "החיתוך עם ציר $x$ הוא היכן ש־$f(x) = 0$. הקודקוד הוא נקודת הקיצון.", + "back": null + }, + "axes_mixed": { + "name": "בלבול בין הצירים", + "tip": "בחיתוך עם ציר $x$ מתקיים $y = 0$; בחיתוך עם ציר $y$ מתקיים $x = 0$.", + "back": null + }, + "zero_root_sign": { + "name": "סימן הפתרון", + "tip": "$x − 1 = 0$ כאשר $x = 1$, ו־$x + 3 = 0$ כאשר $x = −3$: הפתרון בסימן הפוך למספר שבסוגריים.", + "back": null + }, + "a_as_zero": { + "name": "המקדם $a$ אינו שורש", + "tip": "המקדם שלפני הסוגריים אינו מתאפס; רק הסוגריים מתאפסים.", + "back": null + }, + "forgot_y": { + "name": "חסר שיעור $y$", + "tip": "אחרי שמוצאים את $x$ מציבים אותו כדי למצוא את $y$. התשובה היא נקודה $(x, y)$.", + "back": null + }, + "axis_sign": { + "name": "סימן ציר הסימטריה", + "tip": "ציר הסימטריה באמצע בין השורשים: ממוצע שני השורשים.", + "back": null + }, + "forgot_half_axis": { + "name": "שכחתם לחלק ב־2", + "tip": "ציר הסימטריה הוא ממוצע השורשים: $(1 + 5) : 2 = 3$.", + "back": null + }, + "minus_b": { + "name": "שכחתם את המינוס", + "tip": "בנוסחה $x = −b : 2a$ (ובנוסחת השורשים) מופיע $−b$.", + "back": null + }, + "forgot_2a_axis": { + "name": "שכחתם לחלק ב־$2a$", + "tip": "שיעור $x$ של הקודקוד הוא $−b : 2a$, לא $−b$.", + "back": null + }, + "c_as_vertex": { + "name": "$c$ אינו הקודקוד", + "tip": "$c$ הוא נקודת החיתוך עם ציר $y$: $(0, c)$.", + "back": null + }, + "forgot_root": { + "name": "שכחתם להוציא שורש", + "tip": "אחרי שמבודדים את הריבוע מוציאים שורש: $x² = 16 ⇒ x = ±4$.", + "back": null + }, + "divide_wrong": { + "name": "שכחתם לחלק במקדם", + "tip": "$2x + 1 = 0 ⇒ 2x = −1 ⇒ x = −0.5$.", + "back": null + }, + "divide_by_x": { + "name": "חילוק ב־$x$ מאבד פתרון", + "tip": "אסור לחלק ב־$x$, כי הוא עלול להיות $0$. מעבירים אגף ומפרקים: $x(x − 5) = 0$.", + "back": null + }, + "forgot_2a": { + "name": "חילוק ב־$2a$", + "tip": "בנוסחת השורשים מחלקים ב־$2a$, לא ב־$2$.", + "back": null + }, + "disc_sign": { + "name": "סימן ב־$b² − 4ac$", + "tip": "$b² − 4ac = 9 − 4·2·(−2) = 9 + 16 = 25$: מינוס כפול מינוס הוא פלוס.", + "back": null + }, + "disc_meaning": { + "name": "משמעות הדיסקרימיננטה", + "tip": "אם $b² − 4ac > 0$ יש שני פתרונות, אם $b² − 4ac = 0$ פתרון אחד, ואם $b² − 4ac < 0$ אין פתרון.", + "back": null + }, + "lost_shift": { + "name": "שכחתם את ההזזה", + "tip": "$x − 1 = ±4$, ולכן $x = 1 ± 4$.", + "back": null + }, + "inadmissible": { + "name": "פתרון שאינו מתאים לשאלה", + "tip": "פתרון שלילי של המשוואה אינו יכול להיות אורך, מהירות או מספר טבעי.", + "back": null + }, + "other_quantity": { + "name": "עניתם על כמות אחרת", + "tip": "קראו שוב: על איזו כמות השאלה שואלת?", + "back": null + }, + "half_product": { + "name": "חלוקה ב־2 במקום משוואה", + "tip": "בנו משוואה: $n(n + 1) = 56$, ופתרו אותה.", + "back": null + }, + "sign_regions": { + "name": "איפה הפרבולה חיובית", + "tip": "פרבולה פתוחה כלפי מעלה שלילית בין השורשים; פרבולה פתוחה כלפי מטה חיובית בין השורשים.", + "back": "v_graph" + }, + "partial_intervals": { + "name": "חסר חלק מהתנאי", + "tip": "התחום נקבע על ידי שני השורשים, ולכן יש לו שני קצוות.", + "back": null + }, + "strict_vs_weak": { + "name": "אי־שוויון חלש", + "tip": "ב־$≥$ ו־$≤$ גם השורשים עצמם נכללים בפתרון, כי שם הביטוי שווה ל־$0$.", + "back": null + }, + "opposite_angle": { + "name": "הזווית שמול הצלע", + "tip": "הזווית שמול צלע היא הזווית בקודקוד שאינו על הצלע: מול $AC$ נמצאת $∢B$.", + "back": null + }, + "side_angle_rule": { + "name": "יחסי צלעות וזוויות", + "tip": "במשולש, מול הצלע הגדולה נמצאת הזווית הגדולה, ולהפך.", + "back": "a_side_angle" + }, + "reversed_order": { + "name": "סדר הפוך", + "tip": "מול הזווית הקטנה נמצאת הצלע הקטנה, ומול הזווית הגדולה נמצאת הצלע הגדולה.", + "back": null + }, + "half_double": { + "name": "חצי ולא כפליים", + "tip": "הניצב שמול זווית של $30°$ הוא חצי מהיתר, לא שווה לו או כפול ממנו.", + "back": "l_30_side" + }, + "a30_rule": { + "name": "הניצב שמול $30°$", + "tip": "במשולש ישר זווית, הניצב שמול זווית של $30°$ שווה למחצית היתר, ולהפך.", + "back": "l_30_side" + }, + "eq_split": { + "name": "הגובה יוצר זווית ישרה", + "tip": "הגובה מאונך לבסיס, ולכן נוצרים שני משולשים ישרי זווית עם זוויות $30°$ ו־$60°$.", + "back": null + }, + "median_hyp_rule": { + "name": "התיכון ליתר", + "tip": "במשולש ישר זווית התיכון ליתר שווה למחצית היתר.", + "back": "o_median" + }, + "median_converse": { + "name": "המשפט ההפוך לתיכון ליתר", + "tip": "אם התיכון שווה למחצית הצלע שאליה הוא יורד, הזווית שמול הצלע ישרה.", + "back": null + }, + "median_iso": { + "name": "משולש שווה שוקיים שנוצר", + "tip": "$CM = AM$, ולכן במשולש $AMC$ הזוויות שמול הצלעות השוות שוות: $∢ACM = ∢A$.", + "back": null + }, + "whole_diag": { + "name": "היתר הוא האלכסון כולו", + "tip": "במשולש $ABC$ היתר הוא האלכסון $AC$ כולו, ולכן $BC = AC : 2$.", + "back": null + }, + "alt_vs_cointerior": { + "name": "מתחלפות או חד־צדדיות", + "tip": "זוויות מתחלפות בין ישרים מקבילים שוות; זוויות חד־צדדיות משלימות ל־$180°$.", + "back": "z_parallel" + }, + "complement90": { + "name": "השלמה ל־$90°$", + "tip": "זוויות בין ישרים מקבילים שוות או משלימות ל־$180°$, לא ל־$90°$.", + "back": null + }, + "parallel_converse": { + "name": "משפט הפוך לישרים מקבילים", + "tip": "אם זוויות חד־צדדיות משלימות ל־$180°$, הישרים מקבילים.", + "back": null + }, + "trap_iso_angles": { + "name": "זוויות בטרפז שווה שוקיים", + "tip": "בטרפז שווה שוקיים הזוויות שליד אותו בסיס שוות, וזוויות שליד אותה שוק משלימות ל־$180°$.", + "back": null + }, + "trap_vs_par": { + "name": "טרפז או מקבילית", + "tip": "במקבילית יש שני זוגות של צלעות מקבילות. אם רק זוג אחד מקביל, זה טרפז.", + "back": null + }, + "wrong_pair_parallel": { + "name": "איזה זוג מקביל", + "tip": "$∢A$ ו־$∢D$ הן זוויות חד־צדדיות על החותך $AD$, ולכן $AB ∥ DC$.", + "back": null + }, + "forgot_half_area": { + "name": "שכחתם לחלק ב־2", + "tip": "בשטח טרפז, בשטח מעוין (מכפלת אלכסונים) ובשטח משולש מחלקים ב־2.", + "back": null + }, + "mult_all": { + "name": "כפל כל הנתונים", + "tip": "בשטח טרפז מחברים את הבסיסים: $(a + b) · h : 2$.", + "back": null + }, + "trap_one_base": { + "name": "השתמשתם בבסיס אחד", + "tip": "בשטח טרפז מחברים את שני הבסיסים: $(a + b) · h : 2$.", + "back": null + }, + "par_opposite": { + "name": "זוויות נגדיות במקבילית", + "tip": "במקבילית $∢C = ∢A$ ו־$∢D = ∢B$.", + "back": "g_def" + }, + "par_adjacent": { + "name": "זוויות סמוכות במקבילית", + "tip": "זוויות סמוכות במקבילית משלימות ל־$180°$: $∢A + ∢B = 180°$.", + "back": "g_def" + }, + "par_diag": { + "name": "האלכסונים חוצים זה את זה", + "tip": "אלכסוני המקבילית חוצים זה את זה: כל חלק הוא חצי מהאלכסון שלו.", + "back": "g_diag" + }, + "par_trap_iso": { + "name": "גם טרפז שווה שוקיים כזה", + "tip": "גם בטרפז שווה שוקיים זוג אחד מקביל וזוג שני שווה, ולכן זה לא מספיק.", + "back": null + }, + "kite_par": { + "name": "גם דלתון כזה", + "tip": "גם בדלתון האלכסונים מאונכים, ולכן זה לא מספיק כדי לקבוע שהמרובע מקבילית.", + "back": null + }, + "domain_sign": { + "name": "סימן בתחום ההצבה", + "tip": "המכנה מתאפס כאשר $x − 4 = 0$, כלומר כאשר $x = 4$.", + "back": null + }, + "numerator_domain": { + "name": "המונה אינו מגביל", + "tip": "רק מכנה ששווה לאפס אסור. המונה יכול להיות כל מספר.", + "back": null + }, + "domain_zero": { + "name": "לא כל מכנה פוסל את $0$", + "tip": "פוסלים את הערכים שבהם המכנה כולו שווה לאפס.", + "back": null + }, + "mult_instead": { + "name": "כפל במקום חילוק", + "tip": "$12 = 3x$, ולכן $x = 12 : 3$.", + "back": null + }, + "inverse": { + "name": "התשובה ההפוכה", + "tip": "כופלים את שני האגפים במכנה ורק אז מבודדים את $x$.", + "back": null + }, + "lost_sign_move": { + "name": "סימן אבד בדרך", + "tip": "שימו לב לסימן כשפותחים סוגריים וכשמעבירים אגף.", + "back": null + }, + "partial_dist": { + "name": "פילוג חלקי", + "tip": "כופלים את כל הסוגריים: $2(x − 1) = 2x − 2$, לא $2x − 1$.", + "back": null + }, + "add_denoms": { + "name": "חיבור מכנים", + "tip": "לא מחברים מכנים: מביאים למכנה משותף, $1/x + 1/(2x) = 2/(2x) + 1/(2x) = 3/(2x)$.", + "back": null + }, + "excluded_root": { + "name": "פתרון מחוץ לתחום ההצבה", + "tip": "פתרון שמאפס את המכנה אינו פתרון. בודקים כל פתרון מול תחום ההצבה.", + "back": "r_domain" + }, + "valid_root_dropped": { + "name": "פתרון קביל נפסל", + "tip": "$x = −2$ אינו מאפס את המכנה ומקיים את המשוואה.", + "back": null + }, + "mult_only_one": { + "name": "כפל של איבר אחד בלבד", + "tip": "כופלים ב־$x$ את כל האיברים בשני האגפים: $x² + 6 = 5x$.", + "back": null + }, + "part_vs_whole": { + "name": "חלק מתוך השלם", + "tip": "מחלקים בכל האפשרויות (כל התוצאות או כל השטח), לא רק במה שנשאר.", + "back": null + }, + "guess_cases": { + "name": "התוצאות אינן שוות הסתברות", + "tip": "מנו את כל האפשרויות השקולות, בעזרת טבלה או דיאגרמת עץ.", + "back": null + }, + "complement": { + "name": "מאורע משלים", + "tip": "ההסתברות של המאורע המשלים היא $1 − P(A)$.", + "back": "h_complement" + }, + "relfreq_vs_prob": { + "name": "שכיחות יחסית לעומת הסתברות", + "tip": "שכיחות יחסית מחושבת מתוצאות הניסוי; $1/6$ היא ההסתברות התאורטית.", + "back": null + }, + "freq_abs": { + "name": "שכיחות לעומת שכיחות יחסית", + "tip": "השכיחות היחסית היא השכיחות חלקי מספר הניסויים.", + "back": null + }, + "ratio_flipped": { + "name": "חילוק הפוך", + "tip": "מחלקים את מספר ההופעות במספר הניסויים, לא להפך.", + "back": null + }, + "decimal_error": { + "name": "טעות במקום העשרוני", + "tip": "$0.02 = 2/100$, ולכן $1500 · 0.02 = 30$.", + "back": null + }, + "prob_as_count": { + "name": "הסתברות אינה מספר פריטים", + "tip": "ההסתברות היא לפריט אחד. כופלים אותה במספר הפריטים.", + "back": null + }, + "one_stage": { + "name": "התעלמות מהשלב השני", + "tip": "יש שני שלבים: כופלים את ההסתברויות לאורך הענף.", + "back": "h_two_stage" + }, + "prob_add": { + "name": "חיבור במקום כפל", + "tip": "לאורך ענף בעץ כופלים הסתברויות; מחברים רק ענפים נפרדים.", + "back": "h_two_stage" + }, + "with_replace": { + "name": "עם החזרה", + "tip": "הכדור מוחזר, ולכן בשלב השני ההסתברות זהה לשלב הראשון.", + "back": null + }, + "no_replace": { + "name": "בלי החזרה משתנה השלב השני", + "tip": "אחרי שהוצאנו כדור בלי להחזיר, נשארו פחות כדורים, ופחות כדורים מהצבע שהוצא.", + "back": null + }, + "count_one": { + "name": "ספרתם צירוף אחד בלבד", + "tip": "יש $6$ צירופים שסכומם $7$: $(1, 6), (2, 5), …, (6, 1)$, מתוך $36$.", + "back": null + }, + "length_vs_area": { + "name": "יחס אורכים במקום יחס שטחים", + "tip": "ההסתברות היא יחס השטחים: $5² : 10² = 25 : 100$.", + "back": null + }, + "double_count": { + "name": "ספירה כפולה", + "tip": "$1/6 + 1/6$ סופר פעמיים את $(6, 6)$. נוח יותר: $1 − (5/6)²$.", + "back": null + }, + "both_vs_atleast": { + "name": "„לפחות פעם אחת“ אינו „פעמיים“", + "tip": "„לפחות פעם אחת“ כולל גם תוצאות עם $6$ אחד בלבד.", + "back": null + }, + "check_both": { + "name": "בדיקה בשתי המשוואות", + "tip": "נקודת חיתוך מקיימת את שתי המשוואות: מציבים בכל אחת מהן.", + "back": null + }, + "one_solution": { + "name": "שכחתם פתרון", + "tip": "למשוואה הריבועית יש שני פתרונות, ולכל אחד יש נקודת חיתוך.", + "back": null + }, + "y_sign": { + "name": "שיעור $y$ שגוי", + "tip": "מציבים כל $x$ בנפרד: $(−2)² − 2 = 2$. ריבוע של מספר שלילי הוא חיובי.", + "back": null + }, + "sys_meaning": { + "name": "פתרון וחיתוך גרפים", + "tip": "כל פתרון של המערכת הוא נקודה משותפת לשני הגרפים.", + "back": null + }, + "vertex_height": { + "name": "ישר אופקי וקודקוד", + "tip": "ישר אופקי פוגש פרבולה בנקודה אחת בלבד רק בגובה הקודקוד.", + "back": null + }, + "product_check": { + "name": "בדקו את שני התנאים", + "tip": "המספרים צריכים לקיים גם את הסכום וגם את המכפלה.", + "back": null + }, + "rect_diag_equal": { + "name": "אלכסוני המלבן שווים", + "tip": "במלבן האלכסונים שווים וחוצים זה את זה.", + "back": "m_diag" + }, + "rect_iso": { + "name": "המשולש $AOB$ שווה שוקיים", + "tip": "$OA = OB$ (חצאי אלכסונים שווים), ולכן $∢OBA = ∢OAB$.", + "back": null + }, + "rect_vs_rhombus": { + "name": "בלבול בין מלבן למעוין", + "tip": "מקבילית עם אלכסונים שווים או עם זווית ישרה היא מלבן. מקבילית עם אלכסונים מאונכים או עם צלעות סמוכות שוות היא מעוין.", + "back": null + }, + "half_perimeter": { + "name": "חצי היקף", + "tip": "$2(a + b) = 26 ⇒ a + b = 13$, ולכן הרוחב $13 − 8 = 5$.", + "back": null + }, + "add_lengths": { + "name": "חיבור אורכים במקום פיתגורס", + "tip": "חצאי האלכסונים מאונכים, ולכן הצלע היא יתר: $√(8² + 6²)$.", + "back": null + }, + "diag_half": { + "name": "חצאי האלכסונים", + "tip": "אלכסוני המעוין חוצים זה את זה, ולכן משתמשים בחצאי האלכסונים: $8$ ו־$6$.", + "back": null + }, + "rh_bisect": { + "name": "האלכסון חוצה את הזווית", + "tip": "במעוין האלכסונים חוצים את הזוויות: $∢ABD = ∢ABC : 2$.", + "back": "b_angles" + }, + "rh_perp": { + "name": "מאונך אינו הזווית עם הצלע", + "tip": "האלכסונים מאונכים זה לזה, אבל הזווית בין צלע לאלכסון היא חצי מזווית המעוין.", + "back": null + }, + "area_add": { + "name": "חיבור במקום כפל", + "tip": "שטח מעוין הוא מכפלת האלכסונים חלקי 2.", + "back": null + }, + "square_hierarchy": { + "name": "יחסי הכלה בין מרובעים", + "tip": "ריבוע הוא מלבן עם צלעות סמוכות שוות, וגם מעוין עם זווית ישרה. לא כל מלבן או מעוין הוא ריבוע.", + "back": null + }, + "square_diag": { + "name": "תכונות אלכסוני הריבוע", + "tip": "בריבוע האלכסונים מאונכים ($∢AOB = 90°$) וחוצים את הזוויות הישרות ($∢OAB = 45°$).", + "back": null + }, + "pos_neg_swap": { + "name": "חיובית היא מעל ציר $x$", + "tip": "פונקציה חיובית היכן שהגרף מעל ציר $x$, ושלילית היכן שהוא מתחתיו.", + "back": null + }, + "neg_x": { + "name": "חיוביות אינה $x > 0$", + "tip": "„פונקציה חיובית“ פירושה $f(x) > 0$ (ערכי $y$ חיוביים), לא $x > 0$.", + "back": null + }, + "local_as_abs": { + "name": "קיצון מקומי אינו בהכרח מוחלט", + "tip": "מינימום מוחלט הוא הנקודה הנמוכה ביותר בכל הגרף.", + "back": "n_extremum" + }, + "max_vs_min": { + "name": "מקסימום לעומת מינימום", + "tip": "בנקודת מקסימום הגרף עולה לפניה ויורד אחריה; במינימום להפך.", + "back": null + }, + "value_vs_point": { + "name": "ערך לעומת נקודה", + "tip": "נקודת קיצון היא זוג $(x, y)$; ערך המקסימום או המינימום הוא שיעור ה־$y$ שלה.", + "back": null + }, + "x_as_value": { + "name": "שיעור $x$ במקום ערך", + "tip": "הערך המקסימלי הוא שיעור ה־$y$ של נקודת המקסימום, לא שיעור ה־$x$.", + "back": null + }, + "count_all": { + "name": "חיתוכים עם ציר $x$", + "tip": "חיתוכים עם ציר $x$ פותרים $f(x) = 0$, לא $f(x) = 2$.", + "back": null + }, + "x_equals_m": { + "name": "ישר אנכי במקום אופקי", + "tip": "פתרונות $f(x) = m$ הם ערכי $x$ שבהם הגרף פוגש את הישר האופקי $y = m$.", + "back": "n_eq_graph" + }, + "vshift_dir": { + "name": "כיוון ההזזה האנכית", + "tip": "$f(x) + 5$ מזיזה את הגרף $5$ יחידות למעלה, ו־$f(x) − 5$ למטה.", + "back": null + }, + "reflect_type": { + "name": "שיקוף הופך את סוג הקיצון", + "tip": "שיקוף ביחס לציר $x$ הופך את הגרף, ולכן מקסימום הופך למינימום.", + "back": null + }, + "shift_keeps": { + "name": "הזזה אופקית מזיזה תחומים", + "tip": "בהזזה אופקית תחומי העלייה והירידה זזים יחד עם הגרף; בהזזה אנכית הם נשמרים.", + "back": null + }, + "mult_exponents": { + "name": "כפל המעריכים", + "tip": "בכפל חזקות עם אותו בסיס מחברים מעריכים: $a³ · a⁵ = a⁸$.", + "back": "p_mult_div" + }, + "coef_doubled": { + "name": "מקדם שאינו קיים", + "tip": "$a³ · a⁵$ היא חזקה אחת, בלי מקדם 2.", + "back": null + }, + "div_exponents": { + "name": "חילוק המעריכים", + "tip": "בחילוק חזקות עם אותו בסיס מחסרים מעריכים: $x¹² : x⁴ = x⁸$.", + "back": "p_mult_div" + }, + "pow_pow_add": { + "name": "חיבור במקום כפל", + "tip": "בחזקה של חזקה כופלים מעריכים: $(y⁴)³ = y¹²$.", + "back": "p_power_product" + }, + "pow_tower": { + "name": "העלאה בחזקה של המעריך", + "tip": "$(y⁴)³ = y⁴ · y⁴ · y⁴ = y¹²$.", + "back": null + }, + "coef_mult": { + "name": "המקדם הוכפל במקום שהועלה בחזקה", + "tip": "$2⁴ = 2 · 2 · 2 · 2 = 16$, לא $2 · 4$.", + "back": null + }, + "denom_not_raised": { + "name": "גם המכנה מועלה בחזקה", + "tip": "$(a/b)ⁿ = aⁿ / bⁿ$: $3³ = 27$.", + "back": null + }, + "zero_power": { + "name": "חזקת אפס", + "tip": "כל מספר (שאינו $0$) בחזקת $0$ שווה $1$: $7⁰ = 1$.", + "back": null + }, + "bigger_base": { + "name": "בסיס גדול אינו מספיק", + "tip": "כדי להשוות, כותבים את החזקות באותו בסיס: $4¹⁴ = (2²)¹⁴ = 2²⁸$.", + "back": null + }, + "div_as_mult": { + "name": "חיבור מעריכים בחילוק", + "tip": "בחילוק מחסרים מעריכים: $x⁷ : x⁴ = x³$.", + "back": "p_mult_div" + }, + "sqrt_add": { + "name": "פעולה שגויה תחת השורש", + "tip": "$√a · √b = √(a · b)$, ולכן $√12 · √3 = √36$.", + "back": null + }, + "sqrt_forgot": { + "name": "שכחתם להוציא שורש", + "tip": "$√36 = 6$.", + "back": null + }, + "sqrt_split": { + "name": "שורש של סכום", + "tip": "שורש אינו מתפרק על סכום: $√9 + √16 = 3 + 4 = 7$, אבל $√25 = 5$.", + "back": null + }, + "frame_one_side": { + "name": "המסגרת משני הצדדים", + "tip": "מסגרת או שביל מוסיפים $x$ בכל צד, ולכן האורך החדש הוא $a + 2x$.", + "back": null + }, + "speed_diff": { + "name": "בנסיעה זו לקראת זו מחברים מהירויות", + "tip": "המרחק ביניהן קטן בכל שעה ב־$70 + 80 = 150$ ק״מ.", + "back": null + }, + "one_speed": { + "name": "השתמשתם במהירות אחת", + "tip": "שתי המכוניות מתקרבות זו לזו: מחברים את המהירויות.", + "back": null + }, + "percent_add": { + "name": "אחוזים אינם מתקזזים", + "tip": "ההנחה מחושבת מהמחיר החדש: $1.2 · 0.8 = 0.96$.", + "back": null + }, + "square_total": { + "name": "גידול כולל לעומת גידול בכל פעם", + "tip": "$(1 + p/100)² = 1.21 ⇒ 1 + p/100 = 1.1$.", + "back": null + }, + "percent_split": { + "name": "אחוזים מצטברים בכפל", + "tip": "לא מחלקים את הגידול הכולל ב־2: $(1 + p/100)² = 1.21$.", + "back": null + }, + "wall_side": { + "name": "הקיר חוסך צלע", + "tip": "הגדר מקיפה רק שלוש צלעות: $2x + y = 40$.", + "back": null + }, + "percent_of_new": { + "name": "האחוז מחושב מהמחיר המקורי", + "tip": "$0.85 · x = 68 ⇒ x = 68 : 0.85$.", + "back": null + }, + "percent_as_shekel": { + "name": "אחוזים אינם שקלים", + "tip": "$15%$ הם חלק מהמחיר, לא $15$ ₪.", + "back": null + }, + "add_vs_ratio": { + "name": "חיבור במקום יחס", + "tip": "בדמיון הצלעות פרופורציוניות: כופלים ביחס הדמיון, לא מוסיפים מספר קבוע.", + "back": null + }, + "ratio_inverted": { + "name": "יחס הפוך", + "tip": "התאימו כל צלע לצלע המתאימה לה, וכפלו ביחס מהמשולש הנתון אל המבוקש.", + "back": null + }, + "angle_scale": { + "name": "זוויות אינן מוכפלות", + "tip": "במשולשים דומים הזוויות המתאימות שוות; רק הצלעות מוכפלות ביחס.", + "back": null + }, + "perim_square": { + "name": "היקף ביחס הדמיון", + "tip": "יחס ההיקפים שווה ליחס הדמיון, לא לריבועו.", + "back": null + }, + "area_ratio": { + "name": "יחס השטחים הוא ריבוע יחס הדמיון", + "tip": "אם יחס הדמיון $k$, יחס השטחים $k²$.", + "back": "d_area" + }, + "wrong_segment": { + "name": "הצלע המתאימה", + "tip": "$△ADE ∼ △ABC$, ולכן $DE : BC = AD : AB$.", + "back": null + }, + "unit_conv": { + "name": "המרת יחידות שטח", + "tip": "$1$ מ״ר $= 100 · 100 = 10,000$ סמ״ר.", + "back": null + }, + "const_added": { + "name": "חיבור במקום כפל באיבר החופשי", + "tip": "האיבר החופשי הוא מכפלת המספרים: ב־$(x + 4)(x + 2)$ הוא $4 · 2 = 8$. הסכום $4 + 2 = 6$ הוא המקדם של $x$.", + "back": null + }, + "neg_times_neg": { + "name": "מינוס כפול מינוס", + "tip": "מכפלה של שני מספרים שליליים היא חיובית: $(−7) · (−2) = 14$.", + "back": null + }, + "minus_paren": { + "name": "מינוס לפני סוגריים", + "tip": "כשמחסרים מכפלה, פותחים אותה בתוך סוגריים ואז מחליפים את הסימן של כל איבר: $−(x² + 4x) = −x² − 4x$.", + "back": null + }, + "double_both": { + "name": "כפל בשני הסוגריים", + "tip": "המספר שלפני המכפלה כופל אותה פעם אחת: $2(x + 3)(x − 1) = 2(x² + 2x − 3)$.", + "back": null + }, + "neg_divide": { + "name": "סימן בחילוק", + "tip": "מחלקים גם את הסימן: $−8x = −16 ⇒ x = 2$.", + "back": null + }, + "shift_balance": { + "name": "הגדלה והקטנה אינן מתקזזות", + "tip": "הגדלה והקטנה באותו מספר משנות את השטח: $(x + 3)(x − 3) = x² − 9$.", + "back": null + }, + "sq_as_double": { + "name": "ריבוע אינו כפל ב־2", + "tip": "ריבוע הוא כפל של מספר בעצמו: $6² = 6 · 6 = 36$, ולא $6 · 2$.", + "back": null + }, + "diffsq_order": { + "name": "סדר האיברים בהפרש ריבועים", + "tip": "$(a − b)(a + b) = a² − b²$: מחסרים את ריבוע האיבר שמשנה סימן. $(7 − x)(7 + x) = 49 − x²$.", + "back": null + }, + "diffsq_missed": { + "name": "הפרש ריבועים מתפרק", + "tip": "$a² − b² = (a − b)(a + b)$. רק סכום ריבועים, כמו $x² + 49$, אינו מתפרק.", + "back": "t_formulas" + }, + "lost_one": { + "name": "במקום האיבר נשאר $1$", + "tip": "כשאיבר שווה לגורם המשותף, נשאר במקומו $1$: $8x³ − 4x² = 4x²(2x − 1)$.", + "back": null + }, + "common_bracket": { + "name": "סוגריים כגורם משותף", + "tip": "גם סוגריים שלמים יכולים להיות גורם משותף: $x(x + 2) + 3(x + 2) = (x + 2)(x + 3)$.", + "back": null + }, + "expanded_not_factored": { + "name": "פתחתם סוגריים במקום לפרק", + "tip": "פירוק לגורמים הוא כתיבה כמכפלה. פתיחת סוגריים מחזירה לסכום.", + "back": null + }, + "sum_only": { + "name": "בדקתם רק את הסכום", + "tip": "שני המספרים צריכים לתת גם את הסכום $b$ וגם את המכפלה $c$.", + "back": "t_trinomial" + }, + "t_one_factor": { + "name": "שני הגורמים יכולים להתאפס", + "tip": "מכפלה שווה לאפס כאשר אחד הגורמים שווה לאפס: $(x − 2)(x + 5) = 0 ⇒ x = 2$ או $x = −5$.", + "back": null + }, + "factor_nonzero": { + "name": "האגף השני אינו אפס", + "tip": "פירוק עוזר רק כשבאגף השני יש $0$. מעבירים קודם הכול לאגף אחד: $x² + 3x − 10 = 0$.", + "back": null + }, + "opposite_factor": { + "name": "גורמים נגדיים", + "tip": "$5 − x = −(x − 5)$, ולכן $(x − 5) / (5 − x) = −1$.", + "back": null + }, + "reduce_flip": { + "name": "צמצום הפוך", + "tip": "מה שבמונה נשאר במונה: $3x² / 6x = (3x · x) / (3x · 2) = x / 2$.", + "back": null + }, + "a_as_k": { + "name": "$a$ אינו הזזה", + "tip": "ב־$y = ax²$ הקודקוד תמיד $(0, 0)$. המקדם $a$ קובע רק את סוג הקיצון.", + "back": null + }, + "neg_square": { + "name": "ריבוע של מספר שלילי", + "tip": "ריבוע של מספר שלילי הוא חיובי: $(−2)² = 4$.", + "back": null + }, + "squared_coef": { + "name": "המקדם הועלה בריבוע", + "tip": "ב־$ax²$ מעלים בריבוע רק את $x$: $3 · (−2)² = 3 · 4 = 12$.", + "back": null + }, + "minus_outside": { + "name": "המינוס מחוץ לריבוע", + "tip": "ב־$−x²$ מעלים בריבוע את $x$ ורק אחר כך כופלים ב־$−1$: עבור $x = 3$ מקבלים $−9$.", + "back": null + }, + "a_from_point": { + "name": "מציאת $a$ מנקודה", + "tip": "מציבים את הנקודה: $8 = a · 2²$, ולכן $a = 8 : 4 = 2$.", + "back": null + }, + "no_extremum_parabola": { + "name": "לכל פרבולה יש קיצון", + "tip": "הקודקוד של כל פרבולה הוא נקודת קיצון: מינימום כאשר $a > 0$, מקסימום כאשר $a < 0$.", + "back": null + }, + "touch_point": { + "name": "נקודת השקה", + "tip": "כשהקודקוד על ציר $x$, הגרף נוגע בציר רק בקודקוד. בכל שאר הנקודות הוא באותו צד של הציר.", + "back": null + }, + "vertex_side": { + "name": "קודקוד מעל הציר או מתחתיו", + "tip": "אם הקודקוד מעל ציר $x$ והפרבולה פתוחה כלפי מעלה, הגרף לא מגיע לציר. כך גם כשהקודקוד מתחת והפרבולה פתוחה כלפי מטה.", + "back": null + }, + "k_as_yint": { + "name": "$k$ אינו החיתוך עם ציר $y$", + "tip": "$k$ הוא שיעור ה־$y$ של הקודקוד. את החיתוך עם ציר $y$ מוצאים בהצבת $x = 0$.", + "back": null + }, + "axis_diff": { + "name": "ממוצע ולא חצי ההפרש", + "tip": "ציר הסימטריה הוא ממוצע השורשים: $(1 + 5) : 2 = 3$, ולא $(5 − 1) : 2$.", + "back": null + }, + "coef_sign": { + "name": "הסימן שייך למקדם", + "tip": "המקדם כולל את הסימן שלפניו: ב־$2x² − 3x + 7$ המקדם $b = −3$.", + "back": null + }, + "abc_order": { + "name": "מי הם $a$, $b$ ו־$c$", + "tip": "ב־$ax² + bx + c$: $a$ הוא מקדם $x²$, $b$ מקדם $x$, ו־$c$ האיבר החופשי, שהוא גם החיתוך עם ציר $y$.", + "back": null + }, + "perim_all_sides": { + "name": "היקף הוא סכום כל הצלעות", + "tip": "ההיקף הוא סכום ארבע הצלעות. בדלתון: $2a + 2b$, כי יש שני זוגות של צלעות שוות.", + "back": null + }, + "bisect_half": { + "name": "חוצה זווית", + "tip": "חוצה זווית מחלק אותה לשתי זוויות שוות, כל אחת חצי מהזווית.", + "back": null + }, + "kite_perp": { + "name": "אלכסוני הדלתון מאונכים", + "tip": "בדלתון האלכסונים מאונכים זה לזה: הזווית ביניהם $90°$.", + "back": "k_diag" + }, + "pyth": { + "name": "משפט פיתגורס", + "tip": "במשולש ישר זווית: ניצב² + ניצב² = יתר². מחסרים כשמחפשים ניצב: $10² − 6² = 64$.", + "back": null + }, + "dist_add": { + "name": "מרחק בין נקודות", + "tip": "המרחק בין שתי נקודות הוא $√(Δx² + Δy²)$, ולא $Δx + Δy$.", + "back": null + }, + "height_is_median": { + "name": "הגובה לבסיס הוא גם תיכון", + "tip": "במשולש שווה שוקיים הגובה לבסיס חוצה את הבסיס, ולכן $BD = BC : 2$.", + "back": "i_props" + }, + "all_60": { + "name": "שתי זוויות של $60°$", + "tip": "אם שתי זוויות במשולש הן $60°$, גם השלישית $60°$, ולכן כל הצלעות שוות: המשולש שווה צלעות.", + "back": null + }, + "one_role": { + "name": "קטע אחד, שני תפקידים", + "tip": "כדי להוכיח שהמשולש שווה שוקיים צריך קטע אחד שממלא שני תפקידים: גובה ותיכון, גובה וחוצה זווית, או תיכון וחוצה זווית.", + "back": null + }, + "trap_iso_diag": { + "name": "אלכסוני טרפז שווה שוקיים", + "tip": "בטרפז שווה שוקיים האלכסונים שווים, אבל הם לא חוצים זה את זה ולא בהכרח מאונכים.", + "back": null + }, + "leg_as_height": { + "name": "השוק אינה הגובה", + "tip": "הגובה מאונך לבסיסים. השוק משופעת, ולכן היא ארוכה מהגובה (אלא אם הטרפז ישר זווית).", + "back": null + }, + "par_not_rect": { + "name": "תכונה של מלבן", + "tip": "אלכסונים שווים וזוויות ישרות הם תכונות של מלבן, לא של כל מקבילית.", + "back": null + }, + "par_not_rhombus": { + "name": "תכונה של מעוין", + "tip": "אלכסונים מאונכים וצלעות שוות הם תכונות של מעוין, לא של כל מקבילית.", + "back": null + }, + "par_tests": { + "name": "איך מוכיחים שמרובע הוא מקבילית", + "tip": "מספיק אחד מאלה: שני זוגות צלעות נגדיות מקבילים, או שווים; זוג צלעות נגדיות מקביל ושווה; האלכסונים חוצים זה את זה; זוגות הזוויות הנגדיות שוות.", + "back": null + }, + "par_area": { + "name": "שטח מקבילית", + "tip": "שטח מקבילית (וגם מעוין) הוא צלע כפול הגובה אליה, בלי חילוק ב־$2$.", + "back": null + }, + "vertex_order": { + "name": "סדר הקודקודים", + "tip": "במקבילית $ABCD$ הקודקודים מסודרים לפי הסדר, ו־$D = A + C − B$ (בכל שיעור בנפרד).", + "back": null + }, + "three_right": { + "name": "שלוש זוויות ישרות", + "tip": "אם במרובע שלוש זוויות ישרות, גם הרביעית ישרה: $360° − 270° = 90°$.", + "back": null + }, + "way_choice": { + "name": "בחירת דרך הפתרון", + "tip": "כש־$(ביטוי)² = מספר$ מוציאים שורש; כשאין איבר חופשי מוציאים גורם משותף; כשקל לפרק טרינום מפרקים; ואחרת משתמשים בנוסחת השורשים.", + "back": null + }, + "both_solutions": { + "name": "יש פתרון נוסף", + "tip": "למשוואה ריבועית יש לרוב שני פתרונות. בדקו כל אחד מהם מול תנאי השאלה, ופסלו רק פתרון שאינו מתאים לה.", + "back": null + }, + "domain_all": { + "name": "כל המכנים", + "tip": "בודקים כל מכנה בנפרד: כל ערך שמאפס אחד מהם נפסל.", + "back": null + }, + "domain_before_reduce": { + "name": "תחום ההצבה לפני הצמצום", + "tip": "את תחום ההצבה קובעים לפי השבר המקורי, לפני הצמצום: גם ערך שמאפס גורם שצומצם נפסל.", + "back": null + }, + "neg_base_power": { + "name": "חזקה של מספר שלילי", + "tip": "$(−2)⁴ = 16$, אבל $−2⁴ = −16$: בלי סוגריים החזקה חלה רק על $2$.", + "back": null + }, + "sqrt_of_square": { + "name": "שורש של ריבוע", + "tip": "$√(a²b) = a√b$ כאשר $a ≥ 0$: למשל $√50 = √(25 · 2) = 5√2$.", + "back": null + }, + "relative_speed": { + "name": "מהירות בנסיעה באותו כיוון", + "tip": "כשנוסעים באותו כיוון, המרחק ביניהם משתנה בהפרש המהירויות.", + "back": null + }, + "time_units": { + "name": "יחידות זמן", + "tip": "מרחק = מהירות × זמן, ואת הזמן כותבים בשעות: $30$ דקות הן $0.5$ שעה.", + "back": null + }, + "percent_base": { + "name": "אחוז מאיזה מספר", + "tip": "אחוז נחשב תמיד מהכמות שלפני השינוי: עלייה של $25%$ מ־$80$ היא $80 · 1.25 = 100$.", + "back": null + }, + "read_table": { + "name": "קריאת הנתונים", + "tip": "קראו שוב את הטבלה או את התרשים, ובדקו שהשתמשתם בשורה ובעמודה הנכונות.", + "back": null + }, + "abs_vs_local": { + "name": "קיצון מוחלט", + "tip": "נקודת קיצון מקומית היא הגבוהה (או הנמוכה) ביותר רק בסביבתה; קיצון מוחלט הוא הגבוה (או הנמוך) ביותר בכל הגרף.", + "back": null + }, + "no_extremum": { + "name": "פונקציה בלי קיצון", + "tip": "פונקציה שעולה (או יורדת) לכל אורכה אינה מחליפה כיוון, ולכן אין לה נקודת קיצון.", + "back": null + }, + "hshift_keeps_x": { + "name": "הזזה אופקית משנה את שיעור $x$", + "tip": "$f(x − 2)$ מזיזה את הגרף $2$ ימינה: כל נקודה $(a, b)$ עוברת ל־$(a + 2, b)$.", + "back": null + }, + "vshift_keeps_y": { + "name": "הזזה אנכית משנה את שיעור $y$", + "tip": "$f(x) + 2$ מזיזה את הגרף $2$ למעלה: כל נקודה $(a, b)$ עוברת ל־$(a, b + 2)$.", + "back": null + }, + "reflect_zeros": { + "name": "שיקוף ונקודות האפס", + "tip": "בשיקוף ביחס לציר $x$, $(a, b)$ עוברת ל־$(a, −b)$. נקודות על ציר $x$ נשארות במקומן.", + "back": null + }, + "similar_order": { + "name": "התאמת הקודקודים", + "tip": "ב־$△ABC ∼ △DEF$ הסדר קובע את ההתאמה: $A ↔ D$, $B ↔ E$, $C ↔ F$, ולכן $AB ↔ DE$.", + "back": null + } + } +} diff --git a/mathly2/main.py b/mathly2/main.py new file mode 100644 index 0000000000000000000000000000000000000000..58a93bb40c2d57986ea4add90873157c8faf3960 --- /dev/null +++ b/mathly2/main.py @@ -0,0 +1,72 @@ +"""FastAPI app: uvicorn mathly2.main:app""" +from __future__ import annotations + +import json +from pathlib import Path + +from fastapi import Depends, FastAPI, HTTPException +from fastapi.responses import HTMLResponse +from fastapi.staticfiles import StaticFiles + +from .auth import DevAuthenticator, SupabaseAuthenticator, current_user +from .bank import Bank, load_bank +from . import classes +from .config import Settings, load_settings +from .store import InMemoryStore, SupabaseStore + +STATIC = Path(__file__).parent / "static" + + +def create_app(settings: Settings | None = None, bank: Bank | None = None, store=None, authenticator=None) -> FastAPI: + app = FastAPI(title="Mathly 2") + app.state.settings = settings = (settings or load_settings()).check() + app.state.bank = bank or load_bank() # a broken bank stops the server from starting + if settings.supabase_on: + app.state.store = store or SupabaseStore(settings.supabase_url, settings.supabase_secret) + app.state.authenticator = authenticator or SupabaseAuthenticator(settings.supabase_url, settings.supabase_key) + else: + app.state.store = store or InMemoryStore() + app.state.authenticator = authenticator or DevAuthenticator() + + app.include_router(classes.router) + + @app.get("/api/health") + def health() -> dict: + return {"ok": True} + + def my_class(user: dict) -> dict | None: + """The student's class. The first time they sign in, their account is linked to the entry the teacher made.""" + if user["role"] != "student": + return None + membership = app.state.store.membership(user["email"]) + if membership and not membership["user_id"]: + app.state.store.link_user(user["email"], user["id"]) + return {"id": membership["class_id"], "name": membership["class_name"]} if membership else None + + @app.get("/api/me") + def me(user: dict = Depends(current_user)) -> dict: + return {"email": user["email"], "role": user["role"], "class": my_class(user)} + + def in_class_or_teacher(user: dict = Depends(current_user)) -> dict: + if user["role"] == "student" and not app.state.store.membership(user["email"]): + raise HTTPException(403, "ask your teacher to add you to a class") + return user + + @app.get("/api/lessons") + def lessons(user: dict = Depends(in_class_or_teacher)) -> list[dict]: + return app.state.bank.lessons_with_skills() + + @app.get("/", include_in_schema=False) + def index() -> HTMLResponse: + # The browser needs only the public values: the Supabase URL and the publishable key. Never the secret key. + config = {"supabaseUrl": settings.supabase_url, "supabaseKey": settings.supabase_key, + "devSignIn": not settings.supabase_on} + text = json.dumps(config).replace("<", "\\u003c") + html = (STATIC / "index.html").read_text(encoding="utf-8").replace("__CONFIG__", text) + return HTMLResponse(html, headers={"Cache-Control": "no-cache"}) + + app.mount("/static", StaticFiles(directory=STATIC), name="static") + return app + + +app = create_app() diff --git a/mathly2/requirements-dev.txt b/mathly2/requirements-dev.txt new file mode 100644 index 0000000000000000000000000000000000000000..cca85defac1af680eae2b87984c9b88b77b7deab --- /dev/null +++ b/mathly2/requirements-dev.txt @@ -0,0 +1,7 @@ +-r requirements.txt +httpx>=0.27 +pytest>=8 +playwright==1.64.1 +# Optional local PostgreSQL check of the migrations (bundled server; no Docker or project credentials). +pgserver==0.1.4; sys_platform == 'linux' +psycopg[binary]==3.3.6 diff --git a/mathly2/requirements.txt b/mathly2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..759911558e4a5b80a4ac5de1b652be5865412912 --- /dev/null +++ b/mathly2/requirements.txt @@ -0,0 +1,5 @@ +fastapi>=0.110 +uvicorn[standard]>=0.29 +anyio>=4.10,<4.11 # Python 3.10: newer releases can hang Starlette's worker-thread bridge +python-dotenv>=1.0 +tzdata>=2024.1 diff --git a/mathly2/scripts/__init__.py b/mathly2/scripts/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/mathly2/scripts/content_gaps.py b/mathly2/scripts/content_gaps.py new file mode 100644 index 0000000000000000000000000000000000000000..025be83d62613838aef78d8f36b32deff8e25ca5 --- /dev/null +++ b/mathly2/scripts/content_gaps.py @@ -0,0 +1,65 @@ +"""List the content the bank still lacks. venv/bin/python -m mathly2.scripts.content_gaps [--min-questions N] + +A skill needs: a worked example whose every step has "why this step?" choices, and faded examples +(field names below; build-skill-learning fixes the exact shape of their contents). +A lesson needs a quiz. A skill needs enough questions for similar questions and for retakes. +Mistakes should say which skill to go back to.""" +from __future__ import annotations + +import argparse +import sys + +from mathly2.bank import load_bank + +MIN_QUESTIONS = 10 + + +def find_gaps(data: dict, min_questions: int = MIN_QUESTIONS) -> dict[str, list[str]]: + gaps: dict[str, list[str]] = { + "skills without a worked example": [], + "worked-example steps without 'why this step?' choices": [], + "skills without faded examples": [], + "lessons without a quiz": [], + "skills without questions": [], + f"skills with fewer than {min_questions} questions": [], + "mistakes without a skill to go back to": [], + } + for skill in data["skills"]: + sid = skill["id"] + example = skill.get("worked_example") + if not example: + gaps["skills without a worked example"].append(sid) + else: + for number, step in enumerate(example.get("steps", []), 1): + if not step.get("why"): + gaps["worked-example steps without 'why this step?' choices"].append(f"{sid} step {number}") + if not skill.get("faded_examples"): + gaps["skills without faded examples"].append(sid) + count = len(skill.get("questions", [])) + if count == 0: + gaps["skills without questions"].append(sid) + elif count < min_questions: + gaps[f"skills with fewer than {min_questions} questions"].append(f"{sid} ({count})") + for lesson in data["units"]: + if not lesson.get("quiz"): + gaps["lessons without a quiz"].append(lesson["id"]) + for mid, mistake in data["mistakes"].items(): + if not mistake.get("back"): + gaps["mistakes without a skill to go back to"].append(mid) + return gaps + + +def main(argv: list[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument("--min-questions", type=int, default=MIN_QUESTIONS) + args = parser.parse_args(argv) + gaps = find_gaps(load_bank().data, args.min_questions) + for title, items in gaps.items(): + print(f"{title}: {len(items)}") + if 0 < len(items) <= 30: + print(" " + ", ".join(items)) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/mathly2/static/api.js b/mathly2/static/api.js new file mode 100644 index 0000000000000000000000000000000000000000..47c2defc02c501a2c5ef5ab4dcbc2b8bb1cb4825 --- /dev/null +++ b/mathly2/static/api.js @@ -0,0 +1,17 @@ +import { token } from "./session.js"; + +export class ApiError extends Error { + constructor(status, message) { super(message); this.status = status; } +} + +const MESSAGES = { 503: "שירות ההתחברות לא זמין כרגע, נסו שוב בעוד רגע", 403: "אין הרשאה לפעולה הזו" }; + +export async function api(path, { method = "GET", body } = {}) { + const headers = { Authorization: "Bearer " + await token() }; + if (body !== undefined) headers["Content-Type"] = "application/json"; + const response = await fetch(path, { method, headers, body: body === undefined ? undefined : JSON.stringify(body) }); + if (response.ok) return response.status === 204 ? null : response.json(); + let detail = ""; + try { detail = (await response.json()).detail; } catch { /* no body */ } + throw new ApiError(response.status, typeof detail === "string" && detail ? detail : (MESSAGES[response.status] || "משהו השתבש, נסו שוב")); +} diff --git a/mathly2/static/app.css b/mathly2/static/app.css new file mode 100644 index 0000000000000000000000000000000000000000..3e63d5b3b25c2c64b5fb30cd2594e87a4709884a --- /dev/null +++ b/mathly2/static/app.css @@ -0,0 +1,55 @@ +/* Phone first: the base styles fit 360px; wider layouts are added with min-width queries. */ +:root { + --bg: #f7f8fb; --surface: #ffffff; --text: #1b2433; --muted: #5b6678; + --line: #d9dee8; --accent: #2557d6; --accent-text: #ffffff; --danger: #b3261e; + --gutter: 16px; --radius: 12px; +} +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + --bg: #11151c; --surface: #1a212c; --text: #e8ecf3; --muted: #9aa5b8; + --line: #2d3748; --accent: #7aa2ff; --accent-text: #0b1220; --danger: #ff8a80; + } +} +:root[data-theme="dark"] { + --bg: #11151c; --surface: #1a212c; --text: #e8ecf3; --muted: #9aa5b8; + --line: #2d3748; --accent: #7aa2ff; --accent-text: #0b1220; --danger: #ff8a80; +} +* { box-sizing: border-box; } +html, body { margin: 0; } +body { + background: var(--bg); color: var(--text); + font: 16px/1.5 system-ui, "Segoe UI", Arial, "Noto Sans Hebrew", sans-serif; + overflow-x: hidden; +} +.top { + display: flex; align-items: center; justify-content: space-between; gap: 12px; + padding: 12px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); +} +.top h1 { margin: 0; font-size: 20px; } +main { padding: var(--gutter); max-width: 960px; margin: 0 auto; } +.card { + background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); + padding: var(--gutter); margin-block: 12px; +} +.card h2 { margin: 0 0 8px; font-size: 18px; } +.muted { color: var(--muted); } +.error { color: var(--danger); } +button, .button { + font: inherit; min-height: 44px; padding: 8px 16px; border-radius: 10px; cursor: pointer; + border: 1px solid var(--line); background: var(--surface); color: var(--text); +} +button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); } +input, textarea { + font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; + border: 1px solid var(--line); background: var(--bg); color: var(--text); +} +textarea { min-height: 120px; } +label { display: block; margin-block: 8px 4px; font-weight: 600; } +ul.plain { list-style: none; margin: 0; padding: 0; } +ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; justify-content: space-between; } +ul.plain li:last-child { border-bottom: 0; } +.formula { direction: ltr; unicode-bidi: isolate; } +@media (min-width: 720px) { main { padding: 24px; } } +.m { font-family: "STIX Two Math", "Cambria Math", serif; direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-size: 1.05em; } +.m.m-img { font-size: 1.12em; } +.m-img svg { display: inline-block; overflow: visible; max-width: none; } diff --git a/mathly2/static/app.js b/mathly2/static/app.js new file mode 100644 index 0000000000000000000000000000000000000000..c82017e18b1d4db19869fe616f9b4f276ceda4d5 --- /dev/null +++ b/mathly2/static/app.js @@ -0,0 +1,58 @@ +// App shell: sign-in, then the screen for the signed-in person's role. +import { api, ApiError } from "./api.js"; +import { esc } from "./math.js"; +import * as session from "./session.js"; + +const CFG = JSON.parse(document.getElementById("config").textContent); +const app = document.getElementById("app"); +const nav = document.getElementById("nav"); + +export const view = html => { app.innerHTML = html; }; + +function showSignIn(message = "") { + nav.innerHTML = ""; + view(`

כניסה

+ ${message ? `` : ""} + ${CFG.devSignIn + ? `

כניסת פיתוח (dev only): ללא Supabase, כל כתובת מייל מתקבלת.

+
+

` + : `

`}
`); + document.getElementById("google")?.addEventListener("click", () => session.signInWithGoogle()); + document.getElementById("dev")?.addEventListener("submit", event => { + event.preventDefault(); + session.signInDev(document.getElementById("email").value); + boot(); + }); +} + +async function signOutAndShow(message) { + await session.signOut(); + showSignIn(message); +} + +function header(me) { + nav.innerHTML = `${esc(me.email)} `; + document.getElementById("out").addEventListener("click", () => signOutAndShow()); +} + +async function boot() { + view(`

טוען…

`); + try { + await session.init(CFG); + } catch { + return showSignIn("לא הצלחנו לטעון את שירות ההתחברות. בדקו את החיבור לרשת ונסו שוב."); + } + if (!await session.token()) return showSignIn(); + try { + const me = await api("/api/me"); + header(me); + const screen = await import(me.role === "teacher" ? "./teacher.js" : "./student.js"); + await screen.show(me, view); + } catch (error) { + if (error instanceof ApiError && error.status === 401) return signOutAndShow("ההתחברות פגה, יש להיכנס שוב"); + view(`
`); + } +} + +boot(); diff --git a/mathly2/static/index.html b/mathly2/static/index.html new file mode 100644 index 0000000000000000000000000000000000000000..1d5633b083f766268eb785bea321c2c0ae6ecb57 --- /dev/null +++ b/mathly2/static/index.html @@ -0,0 +1,17 @@ + + + + + + +Mathly + + + + +

Mathly

+
+ + + + diff --git a/mathly2/static/math-tex.js b/mathly2/static/math-tex.js new file mode 100644 index 0000000000000000000000000000000000000000..fc077ec22fe6d5a188dfd10c012ff11da86dd869 --- /dev/null +++ b/mathly2/static/math-tex.js @@ -0,0 +1,116 @@ +/* Math as pictures. The content writes math as plain text between $…$ (math.js shows it as ), e.g. + "1/(2x) + x² ≥ √3". This file turns that text into TeX (a/b becomes a stacked fraction, √ a root, ² a raised + exponent) and MathJax draws it as an SVG image in place of the text. The text stays as the picture's label, and + whatever cannot be read (Hebrew words, unknown signs), or everything when MathJax does not load, keeps showing as text. */ +(()=>{ +const SUP={"⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","⁻":"-","⁺":"+","ⁿ":"n","ᵐ":"m"}; +const SUB={"₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9"}; +const OPS={"−":"-","–":"-","·":"\\cdot ","×":"\\times ","÷":"\\div ","≠":"\\neq ","≥":"\\geq ","≤":"\\leq ","±":"\\pm ", + "⇒":"\\Rightarrow ","→":"\\to ","↔":"\\leftrightarrow ","∥":"\\parallel ","⊥":"\\perp ","△":"\\triangle ", + "∢":"\\measuredangle ","∼":"\\sim ","…":"\\ldots ","%":"\\%","π":"\\pi ","α":"\\alpha ","β":"\\beta ","∞":"\\infty ", + "+":"+","-":"-","=":"=","<":"<",">":">",",":",",":":":","?":"?","!":"!","|":"|","'":"'",".":"."}; +const TOKEN=/\d+(?:\.\d+)?|[A-Za-z]|[⁰¹²³⁴⁵⁶⁷⁸⁹⁻⁺ⁿᵐ]+|[₀₁₂₃₄₅₆₇₈₉]+|\s+|./gu; + +// plain math text to TeX, or null when it cannot be read +function toTex(src){ + const toks=String(src).match(TOKEN)||[]; + if(!toks.length) return null; + let i=0; + const fail=()=>{ throw new Error("unreadable"); }; + // one atom: a number, a letter, a (group) or a √atom; `inner` is a group's content, used inside a fraction or root + function atom(){ + const k=toks[i++]; + if(k===undefined) fail(); + if(/^[\d.]/.test(k)||/^[A-Za-zΔ]$/.test(k)) return {kind:"a",t:k==="Δ"?"\\Delta ":k}; + if(k==="("||k==="["){ + const c=k==="("?")":"]", inner=join(seq(c)), big=inner.includes("\\frac"); + return {kind:"a",t:big?`\\left${k}${inner}\\right${c}`:`${k}${inner}${c}`,inner}; + } + if(k==="√"){ const a=atom(); return {kind:"a",t:`\\sqrt{${a.inner??a.t}}`}; } + i--; return null; + } + function seq(close){ + const out=[]; + while(iSUP[c]).join(""); + prev.t=`${prev.t}^{${up}}`; prev.sup=true; delete prev.inner; + } + else if(SUB[k[0]]!==undefined){ + if(prev?.kind!=="a"||prev.sup||prev.sub) fail(); + prev.t=`${prev.t}_{${[...k].map(c=>SUB[c]).join("")}}`; prev.sub=true; delete prev.inner; + } + else if(k==="/") out.push({kind:"/"}); + else if(OPS[k]!==undefined) out.push({kind:"o",t:OPS[k]}); + else fail(); + } + if(close) fail(); + return out; + } + // atoms side by side make one term (2x, 3(x + 1)); a / between two terms is a fraction + function join(items){ + const terms=[]; + for(const it of items){ + const prev=terms[terms.length-1]; + if(it.kind==="a"&&prev?.kind==="a"){ prev.t+=it.t; delete prev.inner; prev.sup=it.sup; } + else terms.push({...it}); + } + const near=(j,step)=>{ while(terms[j]?.kind==="s") j+=step; return j; }; + for(let j=0;jx.kind==="s"?" ":x.kind==="/"?"/":x.t).join("").replace(/\s+/g," ").trim(); + } + try{ const tex=join(seq(null)); return tex||null; }catch{ return null; } +} + +/* drawing: each span.m once, the same picture reused for the same text */ +const cache=new Map(); +function picture(text){ + if(cache.has(text)) return cache.get(text); + const tex=toTex(text); + let svg=null; + if(tex) try{ + const out=window.MathJax.tex2svg(tex.includes("\\frac")?`\\displaystyle ${tex}`:tex,{display:false}).querySelector("svg"); + if(out&&!out.querySelector("[data-mml-node=merror]")){ out.setAttribute("aria-hidden","true"); out.removeAttribute("role"); svg=out; } + }catch{} + cache.set(text,svg); + return svg; +} +function render(scope=document.body){ + if(!window.MathJax?.tex2svg) return; + for(const el of scope.querySelectorAll("span.m:not([data-tex])")){ + const text=el.textContent, svg=picture(text); + el.dataset.tex=svg?"1":"0"; + if(!svg) continue; + el.replaceChildren(svg.cloneNode(true)); + el.setAttribute("role","img"); el.setAttribute("aria-label",text); el.classList.add("m-img"); + } +} +globalThis.MathlyTex={toTex,render}; +if(typeof document==="undefined") return; +let queued=false; +const watch=new MutationObserver(()=>{ if(queued) return; queued=true; queueMicrotask(()=>{ queued=false; render(); }); }); +window.MathJax={tex:{packages:{"[+]":["ams"]}},svg:{fontCache:"none"},options:{enableMenu:false}, + startup:{typeset:false,ready(){ window.MathJax.startup.defaultReady(); render(); watch.observe(document.body,{childList:true,subtree:true}); }}}; +const s=document.createElement("script"); +s.src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-svg.js"; s.async=true; +document.head.append(s); +})(); diff --git a/mathly2/static/math.js b/mathly2/static/math.js new file mode 100644 index 0000000000000000000000000000000000000000..587adbfef46e387084e490b264346fd260e191bd --- /dev/null +++ b/mathly2/static/math.js @@ -0,0 +1,4 @@ +// Shared text helpers. The bank writes math as plain text between $…$ (for example "$x² − 2x − 15$"). +// fmt() escapes the text and wraps each $…$ in , which math-tex.js draws as a formula. +export const esc = s => String(s ?? "").replace(/[&<>"']/g, c => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c])); +export const fmt = s => esc(s).replace(/\$([^$]+)\$/g, '$1'); diff --git a/mathly2/static/session.js b/mathly2/static/session.js new file mode 100644 index 0000000000000000000000000000000000000000..d31dcd7737fed6e9e7dccbe8719d66ea7407e7c3 --- /dev/null +++ b/mathly2/static/session.js @@ -0,0 +1,36 @@ +// Sign-in state. With Supabase settings: Google sign-in through supabase-js. Without them (local development only): +// a "dev only" sign-in that takes an email address; the server trusts "dev:" tokens only in that mode. +const DEV_KEY = "mathly2.dev-email"; +let client = null; + +const load = src => new Promise((ok, fail) => { + const s = document.createElement("script"); + s.src = src; s.onload = ok; s.onerror = () => fail(new Error("script " + src)); + document.head.append(s); +}); + +export async function init(cfg) { + if (!cfg.supabaseUrl) return; + await load("https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2.45.4/dist/umd/supabase.js"); + client = window.supabase.createClient(cfg.supabaseUrl, cfg.supabaseKey); +} + +export async function token() { + if (client) { + const { data } = await client.auth.getSession(); // supabase-js refreshes an expired token here + return data.session?.access_token || ""; + } + try { const email = localStorage.getItem(DEV_KEY); return email ? "dev:" + email : ""; } catch { return ""; } +} + +export const signInWithGoogle = () => + client.auth.signInWithOAuth({ provider: "google", options: { redirectTo: location.origin + location.pathname } }); + +export function signInDev(email) { + try { localStorage.setItem(DEV_KEY, email.trim().toLowerCase()); } catch { /* private window: stays signed out */ } +} + +export async function signOut() { + if (client) await client.auth.signOut(); + try { localStorage.removeItem(DEV_KEY); } catch { /* nothing stored */ } +} diff --git a/mathly2/static/student.js b/mathly2/static/student.js new file mode 100644 index 0000000000000000000000000000000000000000..3dfd1f894e9000fa5f31eee8999fbe162ba66cfd --- /dev/null +++ b/mathly2/static/student.js @@ -0,0 +1,14 @@ +import { api } from "./api.js"; +import { esc } from "./math.js"; + +export async function show(me, view) { + if (!me.class) { + view(`

עוד לא בכיתה

+

המורה עוד לא הוסיפה אותך לכיתה. בקשו מהמורה להוסיף את כתובת המייל שבה נכנסתם:

+

${esc(me.email)}

`); + return; + } + const lessons = await api("/api/lessons"); + view(`

שלום

הכיתה: ${esc(me.class.name)}. השיעורים (${lessons.length}) יפתחו כאן בהמשך.

+
    ${lessons.map(l => `
  • ${esc(l.name)}${l.skills.length} מיומנויות
  • `).join("")}
`); +} diff --git a/mathly2/static/teacher.js b/mathly2/static/teacher.js new file mode 100644 index 0000000000000000000000000000000000000000..f98200df6f1cb780c475e9b05f60de409650c0b2 --- /dev/null +++ b/mathly2/static/teacher.js @@ -0,0 +1,78 @@ +// Teacher screens: my classes, and one class with its students. +import { api } from "./api.js"; +import { esc } from "./math.js"; + +let draw; // the app's view() function + +const note = (text, kind = "muted") => text ? `

${text}

` : ""; + +async function showClasses(message = "", error = "") { + const classes = await api("/api/classes"); + draw(`

הכיתות שלי

+ ${classes.length ? `
    ${classes.map(c => + `
  • ${esc(c.name)}${c.students} תלמידים
  • `).join("")}
` + : `

עוד אין כיתות. אפשר ליצור את הראשונה כאן.

`}
+

כיתה חדשה

${note(esc(error), "error")}${note(esc(message))} +
+ +

`); + document.getElementById("new-class").addEventListener("submit", async event => { + event.preventDefault(); + try { + const created = await api("/api/classes", { method: "POST", body: { name: document.getElementById("class-name").value } }); + await showClasses(`הכיתה "${created.name}" נוצרה`); + } catch (e) { await showClasses("", e.message); } + }); +} + +function report(result) { + const lines = []; + if (result.added.length) lines.push(`נוספו ${result.added.length} תלמידים.`); + if (result.already_here.length) lines.push(`${result.already_here.length} כבר היו בכיתה.`); + for (const x of result.elsewhere) + lines.push(`${esc(x.email)} כבר שייך/ת לכיתה "${esc(x.class_name)}" ולא נוסף/ה. תלמיד יכול להיות רק בכיתה אחת.`); + if (result.invalid.length) lines.push(`לא נראה כמו מייל: ${result.invalid.map(esc).join(", ")}`); + return lines; +} + +async function showClass(id, lines = [], error = "") { + const cls = await api(`/api/classes/${id}`); + draw(`

← הכיתות שלי

+

${esc(cls.name)}

+ ${cls.students.length ? `
    ${cls.students.map(s => + `
  • ${esc(s.email)}${s.signed_in ? "נכנס/ה" : "עוד לא נכנס/ה"} +
  • `).join("")}
` + : `

עוד אין תלמידים בכיתה.

`}
+

הוספת תלמידים

${note(esc(error), "error")} +
${lines.map(l => `

${l}

`).join("")}
+
+ +

`); + document.getElementById("add").addEventListener("submit", async event => { + event.preventDefault(); + try { + const result = await api(`/api/classes/${id}/students`, { method: "POST", body: { emails: document.getElementById("emails").value } }); + await showClass(id, report(result)); + } catch (e) { await showClass(id, [], e.message); } + }); + document.getElementById("students")?.addEventListener("click", async event => { + const email = event.target.closest("[data-remove]")?.dataset.remove; + if (!email) return; + try { + await api(`/api/classes/${id}/students/${encodeURIComponent(email)}`, { method: "DELETE" }); + await showClass(id, [`${esc(email)} הוסר/ה מהכיתה.`]); + } catch (e) { await showClass(id, [], e.message); } + }); +} + +async function route() { + const match = location.hash.match(/^#class\/(\d+)$/); + try { await (match ? showClass(Number(match[1])) : showClasses()); } + catch (e) { draw(`

← הכיתות שלי

`); } +} + +export async function show(me, view) { + draw = view; + addEventListener("hashchange", route); + await route(); +} diff --git a/mathly2/store.py b/mathly2/store.py new file mode 100644 index 0000000000000000000000000000000000000000..6bc68a5c8bdf4bda32651673957b679b5a3b3331 --- /dev/null +++ b/mathly2/store.py @@ -0,0 +1,161 @@ +"""Where classes and students are kept. Two stores with the same methods: +InMemoryStore (tests and local development, lost on restart) and SupabaseStore (PostgREST with the secret key).""" +from __future__ import annotations + +import itertools +import json +import threading +import urllib.error +import urllib.parse +import urllib.request +from datetime import datetime, timezone + +TIMEOUT = 10 + + +class StoreUnavailable(RuntimeError): + """The database could not be reached or refused the request.""" + + +class ClassExists(ValueError): + """The teacher already has a class with this name.""" + + +class MemberExists(ValueError): + """The email already belongs to a class.""" + + +def _now() -> str: + return datetime.now(timezone.utc).isoformat() + + +class InMemoryStore: + def __init__(self) -> None: + self._lock = threading.Lock() + self._ids = itertools.count(1) + self._classes: dict[int, dict] = {} + self._members: dict[str, dict] = {} # email -> row + + def create_class(self, teacher_email: str, name: str) -> dict: + with self._lock: + if any(c["teacher_email"] == teacher_email and c["name"].lower() == name.lower() for c in self._classes.values()): + raise ClassExists(name) + row = {"id": next(self._ids), "name": name, "teacher_email": teacher_email, "created_at": _now()} + self._classes[row["id"]] = row + return dict(row) + + def classes_of(self, teacher_email: str) -> list[dict]: + with self._lock: + rows = [c for c in self._classes.values() if c["teacher_email"] == teacher_email] + return [{**c, "students": sum(1 for m in self._members.values() if m["class_id"] == c["id"])} for c in rows] + + def get_class(self, class_id: int) -> dict | None: + with self._lock: + row = self._classes.get(class_id) + return dict(row) if row else None + + def members(self, class_id: int) -> list[dict]: + with self._lock: + rows = [m for m in self._members.values() if m["class_id"] == class_id] + return [{"email": m["email"], "user_id": m["user_id"], "added_at": m["added_at"]} + for m in sorted(rows, key=lambda m: m["added_at"])] + + def membership(self, email: str) -> dict | None: + with self._lock: + row = self._members.get(email) + if not row: + return None + return {**row, "class_name": self._classes[row["class_id"]]["name"]} + + def add_member(self, class_id: int, email: str) -> None: + with self._lock: + if email in self._members: + raise MemberExists(email) + self._members[email] = {"class_id": class_id, "email": email, "user_id": None, "added_at": _now()} + + def remove_member(self, class_id: int, email: str) -> bool: + with self._lock: + row = self._members.get(email) + if not row or row["class_id"] != class_id: + return False + del self._members[email] + return True + + def link_user(self, email: str, user_id: str) -> None: + with self._lock: + row = self._members.get(email) + if row and not row["user_id"]: + row["user_id"] = user_id + + +class SupabaseStore: + def __init__(self, url: str, secret: str) -> None: + self.url, self.secret = url.rstrip("/"), secret + + def _request(self, method: str, table: str, params: dict[str, str] | None = None, body: dict | None = None, + returning: bool = False): + query = "&".join(f"{k}={urllib.parse.quote(v, safe='(),.*:')}" for k, v in (params or {}).items()) + headers = {"apikey": self.secret, "Authorization": f"Bearer {self.secret}", "User-Agent": "mathly2/1.0", + "Content-Type": "application/json"} + if returning: + headers["Prefer"] = "return=representation" + data = json.dumps(body).encode() if body is not None else None + request = urllib.request.Request(f"{self.url}/rest/v1/{table}" + (f"?{query}" if query else ""), + data=data, method=method, headers=headers) + try: + with urllib.request.urlopen(request, timeout=TIMEOUT) as response: + raw = response.read() + except urllib.error.HTTPError as exc: + if exc.code == 409: + raise + raise StoreUnavailable(f"supabase answered {exc.code} for {method} {table}") from exc + except (urllib.error.URLError, TimeoutError) as exc: + raise StoreUnavailable(str(exc)) from exc + return json.loads(raw) if raw else None + + @staticmethod + def _eq(value) -> str: + return f"eq.{value}" + + def create_class(self, teacher_email: str, name: str) -> dict: + try: + rows = self._request("POST", "m2_classes", body={"teacher_email": teacher_email, "name": name}, returning=True) + except urllib.error.HTTPError as exc: + raise ClassExists(name) from exc + return rows[0] + + def classes_of(self, teacher_email: str) -> list[dict]: + rows = self._request("GET", "m2_classes", {"teacher_email": self._eq(teacher_email), + "select": "id,name,teacher_email,created_at,m2_class_members(count)", "order": "created_at"}) + return [{**{k: r[k] for k in ("id", "name", "teacher_email", "created_at")}, + "students": (r.get("m2_class_members") or [{"count": 0}])[0]["count"]} for r in rows] + + def get_class(self, class_id: int) -> dict | None: + rows = self._request("GET", "m2_classes", {"id": self._eq(class_id), "select": "id,name,teacher_email,created_at"}) + return rows[0] if rows else None + + def members(self, class_id: int) -> list[dict]: + return self._request("GET", "m2_class_members", {"class_id": self._eq(class_id), + "select": "email,user_id,added_at", "order": "added_at"}) + + def membership(self, email: str) -> dict | None: + rows = self._request("GET", "m2_class_members", {"email": self._eq(email), + "select": "class_id,email,user_id,added_at,m2_classes(name)"}) + if not rows: + return None + row = rows[0] + return {**{k: row[k] for k in ("class_id", "email", "user_id", "added_at")}, "class_name": row["m2_classes"]["name"]} + + def add_member(self, class_id: int, email: str) -> None: + try: + self._request("POST", "m2_class_members", body={"class_id": class_id, "email": email}) + except urllib.error.HTTPError as exc: + raise MemberExists(email) from exc + + def remove_member(self, class_id: int, email: str) -> bool: + rows = self._request("DELETE", "m2_class_members", {"class_id": self._eq(class_id), "email": self._eq(email)}, + returning=True) + return bool(rows) + + def link_user(self, email: str, user_id: str) -> None: + self._request("PATCH", "m2_class_members", {"email": self._eq(email), "user_id": "is.null"}, {"user_id": user_id}) diff --git a/mathly2/supabase/migrations/20261107090000_m2_classes.sql b/mathly2/supabase/migrations/20261107090000_m2_classes.sql new file mode 100644 index 0000000000000000000000000000000000000000..7a5fa6ea760f9b26c1bf15afdb2df1fbcafdd941 --- /dev/null +++ b/mathly2/supabase/migrations/20261107090000_m2_classes.sql @@ -0,0 +1,26 @@ +-- Mathly 2: classes and their students. Additive (new tables only). Read and written only by the server with +-- the secret key: row-level security is on, there are no policies, and the browser roles get no grants. +begin; +create table public.m2_classes ( + id bigint generated always as identity primary key, + name text not null check (char_length(name) between 1 and 60), + teacher_email text not null check (teacher_email = lower(teacher_email)), + created_at timestamptz not null default now() +); +create unique index m2_classes_teacher_name on public.m2_classes (teacher_email, lower(name)); + +-- A student belongs to one class at a time: the email is unique. user_id is filled at the student's first sign-in. +create table public.m2_class_members ( + class_id bigint not null references public.m2_classes(id) on delete cascade, + email text primary key check (email = lower(email) and char_length(email) between 3 and 254), + user_id uuid, + added_at timestamptz not null default now() +); +create index m2_class_members_class on public.m2_class_members (class_id); +create index m2_class_members_user on public.m2_class_members (user_id) where user_id is not null; + +alter table public.m2_classes enable row level security; +alter table public.m2_class_members enable row level security; +revoke all on public.m2_classes, public.m2_class_members from public, anon, authenticated; +grant all on public.m2_classes, public.m2_class_members to service_role; +commit; diff --git a/mathly2/tests/__init__.py b/mathly2/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/mathly2/tests/conftest.py b/mathly2/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..9f2a4d50fc6d7dcd46ed182c9a12026960218ccc --- /dev/null +++ b/mathly2/tests/conftest.py @@ -0,0 +1,5 @@ +"""Tests run without Supabase regardless of the developer's local environment.""" +import os + +for name in ("SUPABASE_URL", "SUPABASE_PUBLISHABLE_KEY", "SUPABASE_SECRET_KEY", "TEACHER_EMAILS"): + os.environ[name] = "" diff --git a/mathly2/tests/serve.py b/mathly2/tests/serve.py new file mode 100644 index 0000000000000000000000000000000000000000..4cfe13831159f0a5df474c9b3a521fffa9ae2496 --- /dev/null +++ b/mathly2/tests/serve.py @@ -0,0 +1,28 @@ +"""Run the app on a free port in a background thread, for browser tests.""" +from __future__ import annotations + +import socket +import threading +import time +from contextlib import contextmanager + +import uvicorn + + +@contextmanager +def running(app): + with socket.socket() as probe: + probe.bind(("127.0.0.1", 0)) + port = probe.getsockname()[1] + server = uvicorn.Server(uvicorn.Config(app, host="127.0.0.1", port=port, log_level="warning")) + thread = threading.Thread(target=server.run, daemon=True) + thread.start() + for _ in range(100): + if server.started: + break + time.sleep(0.05) + try: + yield f"http://127.0.0.1:{port}" + finally: + server.should_exit = True + thread.join(timeout=5) diff --git a/mathly2/tests/test_auth.py b/mathly2/tests/test_auth.py new file mode 100644 index 0000000000000000000000000000000000000000..5418aabf2976162bd03018da93b088b45a71af8e --- /dev/null +++ b/mathly2/tests/test_auth.py @@ -0,0 +1,100 @@ +import io +import json +import urllib.error + +import pytest +from fastapi.testclient import TestClient + +from mathly2 import auth +from mathly2.auth import AuthUnavailable, DevAuthenticator, SupabaseAuthenticator +from mathly2.config import Settings +from mathly2.main import create_app + +TEACHER = "teacher@school.test" + + +@pytest.fixture +def client(): + return TestClient(create_app(Settings(teachers=frozenset({TEACHER})))) + + +def sign(email): + return {"Authorization": f"Bearer dev:{email}"} + + +def test_no_token_is_refused(client): + assert client.get("/api/me").status_code == 401 + assert client.get("/api/me", headers={"Authorization": "Bearer nonsense"}).status_code == 401 + assert client.get("/api/me", headers={"Authorization": "Bearer dev:not-an-email"}).status_code == 401 + + +def test_a_listed_teacher_is_a_teacher(client): + assert client.get("/api/me", headers=sign(TEACHER)).json() == {"email": TEACHER, "role": "teacher", "class": None} + assert client.get("/api/me", headers=sign("Teacher@School.test")).json()["role"] == "teacher" # case does not matter + + +def test_everyone_else_is_a_student(client): + assert client.get("/api/me", headers=sign("kid@school.test")).json() == {"email": "kid@school.test", "role": "student", "class": None} + + +def test_page_carries_only_public_settings(): + page = TestClient(create_app(Settings())).get("/").text + assert '"devSignIn": true' in page and "__CONFIG__" not in page + page = TestClient(create_app(Settings(supabase_url="https://p.test", supabase_key="pub", supabase_secret="SECRET-VALUE"))).get("/").text + assert '"supabaseKey": "pub"' in page and '"devSignIn": false' in page and "SECRET-VALUE" not in page + + +def test_half_configured_supabase_does_not_fall_back_to_dev_sign_in(): + with pytest.raises(ValueError, match="all of SUPABASE_URL"): + create_app(Settings(supabase_url="https://p.test")) + + +def test_dev_sign_in_is_off_when_supabase_is_on(): + app = create_app(Settings(supabase_url="https://p.test", supabase_key="pub", supabase_secret="sec")) + assert isinstance(app.state.authenticator, SupabaseAuthenticator) + assert TestClient(app).get("/api/me", headers=sign("kid@school.test")).status_code in (401, 503) + + +class Reply(io.BytesIO): + def __enter__(self): return self + def __exit__(self, *a): return False + + +def supabase_returns(monkeypatch, payload=None, error=None): + calls = [] + + def fake(request, timeout=0): + calls.append(request) + if error: + raise error + return Reply(json.dumps(payload).encode()) + monkeypatch.setattr(auth.urllib.request, "urlopen", fake) + return calls + + +def test_supabase_user_is_checked_with_the_token_and_cached(monkeypatch): + calls = supabase_returns(monkeypatch, {"id": "u1", "email": "Kid@School.test", "email_confirmed_at": "2026-01-01"}) + a = SupabaseAuthenticator("https://p.test", "pub") + assert a.user("tok") == {"id": "u1", "email": "kid@school.test"} + assert a.user("tok")["id"] == "u1" + assert len(calls) == 1 and calls[0].headers["Authorization"] == "Bearer tok" + + +def test_an_unconfirmed_email_is_not_trusted(monkeypatch): + supabase_returns(monkeypatch, {"id": "u1", "email": TEACHER}) + assert SupabaseAuthenticator("https://p.test", "pub").user("tok") is None + + +def test_rejected_token_and_outage(monkeypatch): + supabase_returns(monkeypatch, error=urllib.error.HTTPError("u", 401, "no", {}, None)) + assert SupabaseAuthenticator("https://p.test", "pub").user("bad") is None + supabase_returns(monkeypatch, error=urllib.error.URLError("down")) + with pytest.raises(AuthUnavailable): + SupabaseAuthenticator("https://p.test", "pub").user("tok") + + +def test_outage_gives_503(monkeypatch): + class Down: + def user(self, token): raise AuthUnavailable("down") + app = create_app(Settings(), authenticator=Down()) + assert TestClient(app).get("/api/me", headers={"Authorization": "Bearer x"}).status_code == 503 diff --git a/mathly2/tests/test_bank.py b/mathly2/tests/test_bank.py new file mode 100644 index 0000000000000000000000000000000000000000..55fb64e5ae8e64c62530462fc57d55f04ca341b2 --- /dev/null +++ b/mathly2/tests/test_bank.py @@ -0,0 +1,76 @@ +import copy +import json + +import pytest + +from mathly2.bank import BANK_PATH, BankError, check_bank, load_bank + + +@pytest.fixture(scope="module") +def raw(): + return json.loads(BANK_PATH.read_text(encoding="utf-8")) + + +def test_real_bank_is_sound_and_has_the_expected_size(): + bank = load_bank() + assert (len(bank.lessons), len(bank.skills), len(bank.mistakes)) == (24, 96, 244) + assert sum(len(s.get("questions", [])) for s in bank.skills) == 1050 + + +def broken(raw, change): + data = copy.deepcopy(raw) + change(data) + return check_bank(data) + + +def test_duplicate_skill_id(raw): + problems = broken(raw, lambda d: d["skills"][1].update(id=d["skills"][0]["id"])) + assert any("duplicate skill id" in p for p in problems) + + +def test_question_with_two_correct_choices(raw): + def change(d): + d["skills"][0]["questions"][0]["choices"][1]["correct"] = True + assert any("2 correct choices" in p for p in broken(raw, change)) + + +def test_question_with_no_correct_choice(raw): + def change(d): + for c in d["skills"][0]["questions"][0]["choices"]: + c.pop("correct", None) + assert any("0 correct choices" in p for p in broken(raw, change)) + + +def test_unknown_mistake_on_a_choice(raw): + def change(d): + d["skills"][0]["questions"][0]["choices"][1]["mistake"] = "nope" + assert any("unknown mistake 'nope'" in p for p in broken(raw, change)) + + +def test_mistake_pointing_back_to_a_missing_skill(raw): + def change(d): + d["mistakes"][next(iter(d["mistakes"]))]["back"] = "missing_skill" + assert any("missing_skill" in p for p in broken(raw, change)) + + +def test_empty_back_is_allowed_but_a_wrong_one_is_not(raw): + def change(d): + d["mistakes"][next(iter(d["mistakes"]))]["back"] = "" + assert broken(raw, change) == [] + + +def test_skill_in_a_missing_lesson(raw): + assert any("unknown lesson" in p for p in broken(raw, lambda d: d["skills"][0].update(unit="zz"))) + + +def test_missing_section_is_reported(raw): + assert check_bank({"units": []}) == ["missing 'skills'"] + + +def test_broken_bank_stops_loading(tmp_path, raw): + raw = copy.deepcopy(raw) + raw["skills"][0]["unit"] = "zz" + path = tmp_path / "bank.json" + path.write_text(json.dumps(raw), encoding="utf-8") + with pytest.raises(BankError, match="unknown lesson"): + load_bank(path) diff --git a/mathly2/tests/test_classes.py b/mathly2/tests/test_classes.py new file mode 100644 index 0000000000000000000000000000000000000000..2fb2b0c19f2d5ca4efbd52d9ed0af3c5f70e1b41 --- /dev/null +++ b/mathly2/tests/test_classes.py @@ -0,0 +1,88 @@ +import pytest +from fastapi.testclient import TestClient + +from mathly2.classes import parse_emails +from mathly2.config import Settings +from mathly2.main import create_app + +T1, T2 = "t1@school.test", "t2@school.test" + + +@pytest.fixture +def client(): + return TestClient(create_app(Settings(teachers=frozenset({T1, T2})))) + + +def auth(email): + return {"Authorization": f"Bearer dev:{email}"} + + +def make_class(client, teacher=T1, name="ט'3"): + return client.post("/api/classes", json={"name": name}, headers=auth(teacher)) + + +def test_parse_emails_handles_pasted_lists(): + valid, invalid = parse_emails(" A@x.test, b@x.test;\nc@x.test a@x.test not-an-email ") + assert valid == ["a@x.test", "b@x.test", "c@x.test"] and invalid == ["not-an-email"] + + +def test_teacher_creates_and_lists_classes(client): + created = make_class(client) + assert created.status_code == 201 and created.json()["name"] == "ט'3" + assert client.get("/api/classes", headers=auth(T1)).json() == [{"id": created.json()["id"], "name": "ט'3", "students": 0}] + assert client.get("/api/classes", headers=auth(T2)).json() == [] + + +def test_class_name_is_trimmed_checked_and_unique(client): + assert make_class(client, name=" ח' 1 ").json()["name"] == "ח' 1" + assert make_class(client, name="ח' 1").status_code == 409 + assert make_class(client, name=" ").status_code == 422 + assert make_class(client, name="x" * 61).status_code == 422 + + +def test_students_cannot_use_class_endpoints(client): + kid = auth("kid@school.test") + assert client.get("/api/classes", headers=kid).status_code == 403 + assert client.post("/api/classes", json={"name": "A"}, headers=kid).status_code == 403 + assert client.get("/api/classes").status_code == 401 + + +def test_add_a_list_of_students(client): + cid = make_class(client).json()["id"] + emails = "\n".join(f"s{i}@school.test" for i in range(25)) + result = client.post(f"/api/classes/{cid}/students", json={"emails": emails}, headers=auth(T1)).json() + assert len(result["added"]) == 25 and not result["elsewhere"] and not result["invalid"] + shown = client.get(f"/api/classes/{cid}", headers=auth(T1)).json() + assert len(shown["students"]) == 25 and shown["students"][0] == {"email": "s0@school.test", "signed_in": False} + assert client.get("/api/classes", headers=auth(T1)).json()[0]["students"] == 25 + + +def test_student_in_another_class_is_reported_not_added_twice(client): + a = make_class(client, name="A").json()["id"] + b = make_class(client, T2, "B").json()["id"] + client.post(f"/api/classes/{a}/students", json={"emails": "s@school.test"}, headers=auth(T1)) + result = client.post(f"/api/classes/{b}/students", json={"emails": "s@school.test new@school.test"}, headers=auth(T2)).json() + assert result["elsewhere"] == [{"email": "s@school.test", "class_name": "A"}] and result["added"] == ["new@school.test"] + again = client.post(f"/api/classes/{a}/students", json={"emails": "s@school.test"}, headers=auth(T1)).json() + assert again["already_here"] == ["s@school.test"] and not again["added"] + + +def test_a_teacher_cannot_touch_another_teachers_class(client): + cid = make_class(client).json()["id"] + assert client.get(f"/api/classes/{cid}", headers=auth(T2)).status_code == 404 + assert client.post(f"/api/classes/{cid}/students", json={"emails": "s@school.test"}, headers=auth(T2)).status_code == 404 + assert client.delete(f"/api/classes/{cid}/students/s@school.test", headers=auth(T2)).status_code == 404 + + +def test_remove_a_student(client): + cid = make_class(client).json()["id"] + client.post(f"/api/classes/{cid}/students", json={"emails": "s@school.test"}, headers=auth(T1)) + assert client.delete(f"/api/classes/{cid}/students/S@school.test", headers=auth(T1)).status_code == 204 + assert client.delete(f"/api/classes/{cid}/students/s@school.test", headers=auth(T1)).status_code == 404 + assert client.get(f"/api/classes/{cid}", headers=auth(T1)).json()["students"] == [] + + +def test_too_many_emails_in_one_go(client): + cid = make_class(client).json()["id"] + emails = " ".join(f"s{i}@school.test" for i in range(201)) + assert client.post(f"/api/classes/{cid}/students", json={"emails": emails}, headers=auth(T1)).status_code == 422 diff --git a/mathly2/tests/test_clock.py b/mathly2/tests/test_clock.py new file mode 100644 index 0000000000000000000000000000000000000000..22a808edf0945d94efc13b7cd96626e3441babd6 --- /dev/null +++ b/mathly2/tests/test_clock.py @@ -0,0 +1,34 @@ +from datetime import date, datetime, timezone + +import pytest + +from mathly2 import clock + + +def utc(*args): + return datetime(*args, tzinfo=timezone.utc) + + +def test_just_before_midnight_in_israel_is_still_today(): + # 2026-11-10 21:59 UTC = 23:59 in Israel (UTC+2 in winter) + assert clock.school_day(utc(2026, 11, 10, 21, 59)) == date(2026, 11, 10) + + +def test_just_after_midnight_in_israel_is_tomorrow(): + # 2026-11-10 22:01 UTC = 00:01 on the 11th in Israel + assert clock.school_day(utc(2026, 11, 10, 22, 1)) == date(2026, 11, 11) + + +def test_summer_time_shifts_the_boundary(): + # UTC+3 in summer: 21:00 UTC is already the next day + assert clock.school_day(utc(2026, 7, 10, 20, 59)) == date(2026, 7, 10) + assert clock.school_day(utc(2026, 7, 10, 21, 0)) == date(2026, 7, 11) + + +def test_naive_time_is_refused(): + with pytest.raises(ValueError): + clock.school_day(datetime(2026, 11, 10, 12, 0)) + + +def test_now_has_a_timezone(): + assert clock.now().tzinfo is not None diff --git a/mathly2/tests/test_content_gaps.py b/mathly2/tests/test_content_gaps.py new file mode 100644 index 0000000000000000000000000000000000000000..e8916ff1b4e85416e2db0425750f79756f4cd34f --- /dev/null +++ b/mathly2/tests/test_content_gaps.py @@ -0,0 +1,25 @@ +from mathly2.bank import load_bank +from mathly2.scripts.content_gaps import find_gaps + + +def test_real_bank_gaps(): + gaps = find_gaps(load_bank().data) + assert len(gaps["skills without a worked example"]) == 96 + assert len(gaps["skills without faded examples"]) == 96 + assert len(gaps["lessons without a quiz"]) == 20 + assert len(gaps["skills without questions"]) == 1 + assert len(gaps["mistakes without a skill to go back to"]) == 204 + + +def test_a_skill_with_an_example_and_all_steps_explained_is_not_listed(): + data = {"units": [{"id": "u", "quiz": {"questions": []}}], + "skills": [{"id": "s", "unit": "u", "questions": [{}] * 10, + "worked_example": {"steps": [{"why": ["a", "b"]}]}, "faded_examples": [{}]}], + "mistakes": {}} + assert all(not items for items in find_gaps(data).values()) + + +def test_step_without_why_is_listed(): + data = {"units": [], "skills": [{"id": "s", "unit": "u", "worked_example": {"steps": [{"why": ["a"]}, {}]}}], + "mistakes": {}} + assert find_gaps(data)["worked-example steps without 'why this step?' choices"] == ["s step 2"] diff --git a/mathly2/tests/test_health.py b/mathly2/tests/test_health.py new file mode 100644 index 0000000000000000000000000000000000000000..cacb580062da041334a95ff05b4e4794c36c7830 --- /dev/null +++ b/mathly2/tests/test_health.py @@ -0,0 +1,9 @@ +from fastapi.testclient import TestClient + +from mathly2.main import create_app + + +def test_health(): + response = TestClient(create_app()).get("/api/health") + assert response.status_code == 200 + assert response.json() == {"ok": True} diff --git a/mathly2/tests/test_lessons.py b/mathly2/tests/test_lessons.py new file mode 100644 index 0000000000000000000000000000000000000000..fcd288e947ab5c17410f8e2158a2cbf03b5f4af4 --- /dev/null +++ b/mathly2/tests/test_lessons.py @@ -0,0 +1,17 @@ +from fastapi.testclient import TestClient + +from mathly2.config import Settings +from mathly2.main import create_app + + +def test_lessons_list_has_every_lesson_and_skill_but_no_questions(): + lessons = TestClient(create_app(Settings(teachers=frozenset({"t@school.test"})))).get("/api/lessons", headers={"Authorization": "Bearer dev:t@school.test"}).json() + assert len(lessons) == 24 + assert sum(len(lesson["skills"]) for lesson in lessons) == 96 + assert "questions" not in lessons[0]["skills"][0] + assert lessons[0]["name"] == "טכניקה אלגברית 1" + assert sum(l["has_quiz"] for l in lessons) == 4 + + +def test_lessons_need_sign_in(): + assert TestClient(create_app()).get("/api/lessons").status_code == 401 diff --git a/mathly2/tests/test_migrations.py b/mathly2/tests/test_migrations.py new file mode 100644 index 0000000000000000000000000000000000000000..d3c25e19097c70e9f2cb1be6ac8ac87c0ebbcb4d --- /dev/null +++ b/mathly2/tests/test_migrations.py @@ -0,0 +1,60 @@ +"""Apply the migrations to a real local PostgreSQL and check the browser roles cannot touch the tables.""" +from pathlib import Path + +import pytest + +psycopg = pytest.importorskip("psycopg") +pgserver = pytest.importorskip("pgserver") + +MIGRATIONS = sorted((Path(__file__).parent.parent / "supabase" / "migrations").glob("*.sql")) + + +@pytest.fixture(scope="module") +def db(tmp_path_factory): + server = pgserver.get_server(tmp_path_factory.mktemp("postgres") / "data", cleanup_mode="delete") + with psycopg.connect(server.get_uri(), autocommit=True) as c: + c.execute("create role anon; create role authenticated; create role service_role bypassrls;") + c.execute("grant usage on schema public to anon, authenticated, service_role;") + for path in MIGRATIONS: + c.execute(path.read_text(encoding="utf-8")) + yield server.get_uri() + server.cleanup() + + +def as_role(uri, role, sql, *params): + with psycopg.connect(uri, autocommit=True) as c: + c.execute(f"set role {role}") + return c.execute(sql, params).fetchall() if sql.lstrip().lower().startswith("select") else c.execute(sql, params) + + +def test_server_role_can_use_the_tables(db): + as_role(db, "service_role", "insert into public.m2_classes(name, teacher_email) values ('ט''3', 't@school.test')") + rows = as_role(db, "service_role", "select name from public.m2_classes") + assert rows == [("ט'3",)] + + +@pytest.mark.parametrize("role", ["authenticated", "anon"]) +def test_browser_roles_are_refused(db, role): + with pytest.raises(psycopg.errors.InsufficientPrivilege): + as_role(db, role, "insert into public.m2_classes(name, teacher_email) values ('x', 'a@b.test')") + with pytest.raises(psycopg.errors.InsufficientPrivilege): + as_role(db, role, "select * from public.m2_class_members") + + +def test_row_level_security_is_on_and_has_no_policies(db): + with psycopg.connect(db, autocommit=True) as c: + on = dict(c.execute("select relname, relrowsecurity from pg_class where relname in ('m2_classes','m2_class_members')").fetchall()) + policies = c.execute("select count(*) from pg_policies where tablename like 'm2_%'").fetchone()[0] + assert on == {"m2_classes": True, "m2_class_members": True} + assert policies == 0 + + +def test_a_student_email_can_belong_to_only_one_class(db): + with psycopg.connect(db, autocommit=True) as c: + c.execute("insert into public.m2_classes(name, teacher_email) values ('ח''1', 't@school.test')") + ids = [r[0] for r in c.execute("select id from public.m2_classes order by id").fetchall()] + c.execute("insert into public.m2_class_members(class_id, email) values (%s, 's@school.test')", (ids[0],)) + with pytest.raises(psycopg.errors.UniqueViolation): + c.execute("insert into public.m2_class_members(class_id, email) values (%s, 's@school.test')", (ids[1],)) + with pytest.raises(psycopg.errors.CheckViolation): + c.execute("insert into public.m2_class_members(class_id, email) values (%s, 'UPPER@school.test')", (ids[0],)) diff --git a/mathly2/tests/test_no_content_before_sign_in.py b/mathly2/tests/test_no_content_before_sign_in.py new file mode 100644 index 0000000000000000000000000000000000000000..1f387b8100f9431983498aaf2d065070fbf5194d --- /dev/null +++ b/mathly2/tests/test_no_content_before_sign_in.py @@ -0,0 +1,49 @@ +"""Every /api route except health refuses a caller without a valid token. The routes are read from the app itself, +so an endpoint added later is covered without touching this test.""" +import re + +import pytest +from fastapi.testclient import TestClient + +from mathly2.config import Settings +from mathly2.main import create_app + +PUBLIC = {"/api/health"} + + +def api_routes(app): + # Read from the OpenAPI schema: app.routes does not list routes added with include_router. + for path, methods in app.openapi()["paths"].items(): + if path.startswith("/api"): + for method in sorted(methods): + yield method.upper(), path + + +@pytest.fixture(scope="module") +def app(): + return create_app(Settings(teachers=frozenset({"t@school.test"}))) + + +def test_there_are_routes_to_check(app): + assert len(list(api_routes(app))) >= 8 + assert ('DELETE', '/api/classes/{class_id}/students/{email}') in set(api_routes(app)) + + +@pytest.mark.parametrize("headers", [{}, {"Authorization": "Bearer "}, {"Authorization": "Bearer dev:nobody"}, {"Authorization": "Basic abc"}]) +def test_every_api_route_refuses_a_caller_without_a_valid_token(app, headers): + client = TestClient(app) + for method, path in api_routes(app): + if path in PUBLIC: + continue + url = re.sub(r"\{[^}]*\}", "1", path) + response = client.request(method, url, headers=headers, json={} if method in ("POST", "PUT", "PATCH") else None) + assert response.status_code == 401, f"{method} {path} answered {response.status_code} without a token" + + +def test_health_stays_public(app): + assert TestClient(app).get("/api/health").status_code == 200 + + +def test_no_secret_in_the_page(): + page = TestClient(create_app(Settings(supabase_url="https://p.test", supabase_key="pub", supabase_secret="SECRET-VALUE"))).get("/") + assert "SECRET-VALUE" not in page.text diff --git a/mathly2/tests/test_shell_browser.py b/mathly2/tests/test_shell_browser.py new file mode 100644 index 0000000000000000000000000000000000000000..b6f61ccee81ebf3e412fe7342d3a9a2966efff25 --- /dev/null +++ b/mathly2/tests/test_shell_browser.py @@ -0,0 +1,97 @@ +import pytest + +playwright = pytest.importorskip("playwright.sync_api") + +from mathly2.main import create_app +from mathly2.tests.serve import running + + +def test_phone_shell_is_rtl_hebrew_and_does_not_scroll_sideways(): + with running(create_app()) as url, playwright.sync_playwright() as p: + browser = p.chromium.launch() + page = browser.new_page(viewport={"width": 390, "height": 844}) + page.goto(url) + assert page.get_attribute("html", "dir") == "rtl" + assert page.get_attribute("html", "lang") == "he" + page.wait_for_selector("#app .card") + assert page.evaluate("document.documentElement.scrollWidth <= window.innerWidth") + browser.close() + + +def test_dollar_math_is_drawn_as_a_formula(): + with running(create_app()) as url, playwright.sync_playwright() as p: + browser = p.chromium.launch() + page = browser.new_page(viewport={"width": 390, "height": 844}) + page.goto(url) + page.wait_for_function("typeof (window.MathJax && window.MathJax.tex2svg) === 'function'", timeout=30000) + page.evaluate("""async () => { + const { fmt } = await import('/static/math.js'); + const box = document.createElement('p'); + box.id = 'probe'; + box.innerHTML = fmt('פתחו: $x² − 2x − 15$ ו־$(x + 3)(x − 5)$'); + document.body.append(box); + }""") + page.wait_for_selector("#probe span.m.m-img svg", timeout=10000) + assert page.locator("#probe span.m.m-img").count() == 2 + assert page.get_attribute("#probe span.m.m-img >> nth=0", "aria-label") == "x² − 2x − 15" + browser.close() + + +def test_dev_sign_in_then_sign_out(): + app = create_app(__import__("mathly2.config", fromlist=["Settings"]).Settings(teachers=frozenset({"t@school.test"}))) + with running(app) as url, playwright.sync_playwright() as p: + browser = p.chromium.launch() + page = browser.new_page(viewport={"width": 390, "height": 844}) + page.goto(url) + page.wait_for_selector("#signin form#dev") # signed out: only the sign-in screen + assert "מיומנויות" not in page.inner_text("body") + page.fill("#email", "kid@school.test") + page.click("#dev button") + page.wait_for_selector("#nav #out") + assert page.inner_text("#nav").startswith("kid@school.test") + page.click("#out") + page.wait_for_selector("#signin") + browser.close() + + +def test_teacher_creates_a_class_and_adds_three_students(): + from mathly2.config import Settings + app = create_app(Settings(teachers=frozenset({"t@school.test"}))) + with running(app) as url, playwright.sync_playwright() as p: + browser = p.chromium.launch() + page = browser.new_page(viewport={"width": 390, "height": 844}) + page.goto(url) + page.fill("#email", "t@school.test") + page.click("#dev button") + page.wait_for_selector("#new-class") + page.fill("#class-name", "ט'3") + page.click("#new-class button") + page.wait_for_selector("#classes li") + page.click("#classes a") + page.wait_for_selector("#add") + page.fill("#emails", "a@school.test, b@school.test\nc@school.test") + page.click("#add button") + page.wait_for_selector("#students li") + assert page.locator("#students li").count() == 3 + assert "נוספו 3 תלמידים" in page.inner_text("#report") + assert page.evaluate("document.documentElement.scrollWidth <= window.innerWidth") + page.fill("#emails", "a@school.test d@school.test") + page.click("#add button") + page.wait_for_selector("#students li >> nth=3") + assert "כבר היו בכיתה" in page.inner_text("#report") + page.click("[data-remove='a@school.test']") + page.wait_for_function("document.querySelectorAll('#students li').length === 3") + browser.close() + + +def test_student_not_in_a_class_sees_the_ask_your_teacher_message_with_their_email(): + with running(create_app()) as url, playwright.sync_playwright() as p: + browser = p.chromium.launch() + page = browser.new_page(viewport={"width": 390, "height": 844}) + page.goto(url) + page.fill("#email", "new.kid@school.test") + page.click("#dev button") + page.wait_for_selector("#no-class") + assert "new.kid@school.test" in page.inner_text("#no-class") + assert "מיומנויות" not in page.inner_text("body") + browser.close() diff --git a/mathly2/tests/test_store.py b/mathly2/tests/test_store.py new file mode 100644 index 0000000000000000000000000000000000000000..4fb51a3a9ad2530d46847da7d390b60c22eced19 --- /dev/null +++ b/mathly2/tests/test_store.py @@ -0,0 +1,96 @@ +import urllib.error + +import pytest + +from mathly2.store import ClassExists, InMemoryStore, MemberExists, SupabaseStore + + +@pytest.fixture +def store(): + return InMemoryStore() + + +def test_classes_belong_to_their_teacher(store): + a = store.create_class("t1@x.test", "ט'3") + store.create_class("t2@x.test", "ח'1") + assert [c["name"] for c in store.classes_of("t1@x.test")] == ["ט'3"] + assert store.get_class(a["id"])["teacher_email"] == "t1@x.test" + assert store.get_class(999) is None + + +def test_class_names_are_unique_per_teacher_ignoring_case(store): + store.create_class("t@x.test", "Alef") + with pytest.raises(ClassExists): + store.create_class("t@x.test", "alef") + store.create_class("other@x.test", "Alef") + + +def test_a_student_belongs_to_one_class(store): + a, b = store.create_class("t@x.test", "A")["id"], store.create_class("t@x.test", "B")["id"] + store.add_member(a, "s@x.test") + with pytest.raises(MemberExists): + store.add_member(b, "s@x.test") + assert store.membership("s@x.test")["class_name"] == "A" + assert store.classes_of("t@x.test")[0]["students"] == 1 + + +def test_remove_member_only_from_its_own_class(store): + a, b = store.create_class("t@x.test", "A")["id"], store.create_class("t@x.test", "B")["id"] + store.add_member(a, "s@x.test") + assert store.remove_member(b, "s@x.test") is False + assert store.remove_member(a, "s@x.test") is True + assert store.membership("s@x.test") is None + + +def test_link_user_sets_it_once(store): + a = store.create_class("t@x.test", "A")["id"] + store.add_member(a, "s@x.test") + store.link_user("s@x.test", "u1") + store.link_user("s@x.test", "u2") + assert store.membership("s@x.test")["user_id"] == "u1" + store.link_user("nobody@x.test", "u3") # no such member: ignored + + +class Recorder(SupabaseStore): + """SupabaseStore with the network replaced by canned answers; records what it would have sent.""" + def __init__(self, answers): + super().__init__("https://p.supabase.test", "secret") + self.answers, self.calls = list(answers), [] + + def _request(self, method, table, params=None, body=None, returning=False): + self.calls.append((method, table, params, body, returning)) + answer = self.answers.pop(0) + if isinstance(answer, Exception): + raise answer + return answer + + +def conflict(): + return urllib.error.HTTPError("u", 409, "conflict", {}, None) + + +def test_supabase_store_requests(): + s = Recorder([[{"id": 1, "name": "A", "teacher_email": "t@x.test", "created_at": "z"}], + [{"id": 1, "name": "A", "teacher_email": "t@x.test", "created_at": "z", "m2_class_members": [{"count": 3}]}], + [{"class_id": 1, "email": "s@x.test", "user_id": None, "added_at": "z", "m2_classes": {"name": "A"}}], + [{"email": "s@x.test"}], []]) + assert s.create_class("t@x.test", "A")["id"] == 1 + assert s.classes_of("t@x.test")[0]["students"] == 3 + assert s.membership("s@x.test")["class_name"] == "A" + assert s.remove_member(1, "s@x.test") is True + assert s.remove_member(1, "s@x.test") is False + assert s.calls[0][:2] == ("POST", "m2_classes") and s.calls[0][3] == {"teacher_email": "t@x.test", "name": "A"} + assert s.calls[3][2] == {"class_id": "eq.1", "email": "eq.s@x.test"} + + +def test_supabase_store_turns_conflicts_into_domain_errors(): + with pytest.raises(ClassExists): + Recorder([conflict()]).create_class("t@x.test", "A") + with pytest.raises(MemberExists): + Recorder([conflict()]).add_member(1, "s@x.test") + + +def test_supabase_link_only_fills_an_empty_user_id(): + s = Recorder([None]) + s.link_user("s@x.test", "u1") + assert s.calls[0][2] == {"email": "eq.s@x.test", "user_id": "is.null"} diff --git a/mathly2/tests/test_student_class.py b/mathly2/tests/test_student_class.py new file mode 100644 index 0000000000000000000000000000000000000000..b09f79edd43cf32b2fff38b269cd29c69d2f14c7 --- /dev/null +++ b/mathly2/tests/test_student_class.py @@ -0,0 +1,53 @@ +import pytest +from fastapi.testclient import TestClient + +from mathly2.config import Settings +from mathly2.main import create_app +from mathly2.store import InMemoryStore + +TEACHER, KID = "t@school.test", "kid@school.test" + + +def auth(email): + return {"Authorization": f"Bearer dev:{email}"} + + +@pytest.fixture +def setup(): + store = InMemoryStore() + client = TestClient(create_app(Settings(teachers=frozenset({TEACHER})), store=store)) + return client, store + + +def test_student_in_no_class_gets_no_class_and_no_lessons(setup): + client, _ = setup + me = client.get("/api/me", headers=auth(KID)).json() + assert me == {"email": KID, "role": "student", "class": None} + assert client.get("/api/lessons", headers=auth(KID)).status_code == 403 + + +def test_first_sign_in_links_the_account_to_the_class_entry(setup): + client, store = setup + cid = client.post("/api/classes", json={"name": "ט'3"}, headers=auth(TEACHER)).json()["id"] + client.post(f"/api/classes/{cid}/students", json={"emails": KID}, headers=auth(TEACHER)) + assert client.get(f"/api/classes/{cid}", headers=auth(TEACHER)).json()["students"][0]["signed_in"] is False + me = client.get("/api/me", headers=auth(KID)).json() + assert me["class"] == {"id": cid, "name": "ט'3"} + assert store.membership(KID)["user_id"] + assert client.get(f"/api/classes/{cid}", headers=auth(TEACHER)).json()["students"][0]["signed_in"] is True + assert len(client.get("/api/lessons", headers=auth(KID)).json()) == 24 + + +def test_a_removed_student_loses_the_lessons(setup): + client, _ = setup + cid = client.post("/api/classes", json={"name": "A"}, headers=auth(TEACHER)).json()["id"] + client.post(f"/api/classes/{cid}/students", json={"emails": KID}, headers=auth(TEACHER)) + assert client.get("/api/lessons", headers=auth(KID)).status_code == 200 + client.delete(f"/api/classes/{cid}/students/{KID}", headers=auth(TEACHER)) + assert client.get("/api/lessons", headers=auth(KID)).status_code == 403 + + +def test_teacher_has_no_class_and_still_sees_lessons(setup): + client, _ = setup + assert client.get("/api/me", headers=auth(TEACHER)).json()["class"] is None + assert client.get("/api/lessons", headers=auth(TEACHER)).status_code == 200 diff --git a/openspec/changes/add-assignment-worksheets/design.md b/openspec/changes/add-assignment-worksheets/design.md deleted file mode 100644 index 869c56b0fec362e4cb86da8d2fcfdcd531c43674..0000000000000000000000000000000000000000 --- a/openspec/changes/add-assignment-worksheets/design.md +++ /dev/null @@ -1,71 +0,0 @@ -# Design - -## Context - -- Assignments live in `math_assignments` (`app/assignments.py`): `items` is a jsonb array validated by `clean_assignment` against the class's units, 1 to 20 items. The class teacher or a manager writes them (`class_row`); students read them through `GET /api/math/assignments`. -- Completion is not stored. `assignmentState(a, P, sittings, now)` in `static/math-sky.js` works it out from the progress and the unit-quiz sittings. It is called on the student's home, in the report tab, and in the "needs attention" signal. -- Images already have a safe path: `clean_image` in `app/answer_scans.py` checks type, size and pixel count, re-encodes to JPEG and drops metadata. `app/unit_resources.py` keeps teacher photos in a private Supabase bucket, read and written only with the service key, with a restrictive storage policy. -- Unreferenced answer images are removed by the hourly `python -m app.answer_cleanup`. -- There is no PDF handling in the project today. - -## Goals / Non-Goals - -**Goals:** -- A worksheet is just another assignment item, so the card, the report, the "needs attention" signal and the late rule all work for it without special cases. -- Every file goes through the server: no public URLs and no storage paths in the browser. -- The feature switches off cleanly when the migration is missing. - -**Non-Goals:** -- AI checking of worksheets. -- Writing on the worksheet in the app (annotating the PDF). Students solve on paper and photograph. -- Teacher annotations on the submission photos. The teacher gives a score and a comment only. -- Returning a checked submission for another try. A later change can add "return for correction". -- Push notifications for new worksheets or checks. -- Reusing a worksheet across classes or assignments. Each upload belongs to one class. - -## Decisions - -**Item format: `{kind: "worksheet", id}`.** The id points to a row of `math_worksheets`. `clean_assignment` gets the class's worksheet ids and accepts a worksheet item only when its id belongs to the same class. At most 5 worksheet items per assignment, within the existing 20-item limit. An assignment can be only a worksheet. Alternative considered: a separate `worksheets` list next to `items`. Rejected because then every consumer of `items` (the card, the report, the continue button, the attention signal) would need a second path. - -**Upload first, then save the assignment.** `POST /api/classes/{class_id}/worksheets` (multipart: title, files) stores the worksheet with `class_id` and returns `{id, title, pages}`. The form then saves the assignment with the item. A worksheet that no assignment uses for 24 hours is deleted by the hourly cleanup, the same idea as orphan answer images. Alternative considered: upload into an existing assignment (`/assignments/{aid}/worksheets`). Rejected because a new assignment has no id until it is saved, and the form would need two saves. - -**Removing a worksheet.** When an assignment update drops a worksheet item, or the assignment is deleted, the server deletes the worksheet row, its submissions (cascade) and their files. The form shows the number of submissions in its confirmation, from the report data it already has. - -**Tables (migration `_math_worksheets.sql`).** -- `math_worksheets(id uuid, class_id bigint references classes on delete cascade, title text ≤80, source text check in ('pdf','images'), pages int 1..10, original_key text null, page_keys text[], byte_size int, created_by_email, created_at)`. -- `math_worksheet_submissions(id uuid, worksheet_id uuid references math_worksheets on delete cascade, student_id uuid, student_email text, page_keys text[] 1..10, submitted_at timestamptz, checked_at timestamptz null, score int null check 0..100, comment text ≤1000 default '', checked_by_email text default '', unique(worksheet_id, student_id))`. -- Both service-only (RLS on, all grants revoked from anon/authenticated), like `math_assignments`. -- Bucket `mathly-worksheets`: private, `image/jpeg` and `application/pdf`, 10 MB limit, with a restrictive policy like `mathly-resources`. Keys: `w//.jpg`, `w//original.pdf`, `s////.jpg`. - -**PDF pages rendered on the server with `pypdfium2`.** Phones do not show PDFs inline the same way: Android Chrome downloads them. The server checks the file (starts with `%PDF-`, ≤10 MB, opens, ≤10 pages), renders each page to JPEG at about 1600 px wide, and stores the pages and the original. Rendering runs in the thread pool, with a time limit per page. `pypdfium2` ships a self-contained PDFium wheel, so no system packages are needed on the Space. Alternatives considered: `pdf.js` in the browser (a large vendored library and more work per phone), or PDF only through download (poor on phones). - -**Photos reuse `clean_image`.** Teacher photos and student submissions go through `clean_image` (5 MB, JPEG/PNG/WebP, re-encoded, metadata dropped). The student's phone sends the photos as they are. The hand-in sheet reuses the camera/file picker of the open-answer flow (`static/answer-scans.js`), without its AI step. - -**Routes (`app/worksheets.py`).** -- Teacher (class teacher or manager, same `class_row` rule): `POST /api/classes/{cid}/worksheets`; `GET /api/classes/{cid}/worksheets/{wid}/submissions/{sid}/pages/{n}`; `PUT /api/classes/{cid}/worksheets/{wid}/submissions/{sid}` with `{score, comment}` (sets `checked_at` the first time, keeps it after that). -- Class members and the class teacher: `GET /api/math/worksheets/{wid}/pages/{n}` (JPEG) and `GET /api/math/worksheets/{wid}/original` (PDF worksheets only; for a photo worksheet the download button saves the page images one by one). The worksheet's class must be one of the account's classes, or the account its teacher or a manager; otherwise 404. -- Student: `PUT /api/math/worksheets/{wid}/submission` (multipart files) creates or replaces their submission, refused with 409 `already_checked` after a check; `GET /api/math/worksheets/{wid}/submission/pages/{n}` reads their own pages. -- Pages are served with `Cache-Control: private, max-age=3600`. - -**Data for the page.** `GET /api/math/assignments` adds `worksheets` (`{id, title, pages, source}` for the worksheets in the returned assignments) and `submissions` (the student's own: `{worksheet_id, pages, submitted_at, checked_at, score, comment}`). The report adds the same per student (`worksheet_submissions`) and the worksheets of the class. - -**Completion.** `assignmentState(a, P, server, now)`: the third argument becomes `{sittings, submissions}`. A bare array is still read as `sittings`, so a caller that was not updated keeps working. A worksheet item is done at its submission's `submitted_at`; `known` is false when `submissions` is null (the server could not read them), as for unit quizzes. The three callers pass the new object. - -**Actions log.** `worksheet_added`, `worksheet_submitted`, `worksheet_checked` go to the monitoring feed (`app/monitoring.py` `MON_ACTIONS`), like the assignment actions. - -**Unavailable.** If the tables or bucket are missing, worksheet routes answer 503 `worksheets_unavailable`. The class report and `/api/math/assignments` return `worksheets: null`; the form hides the worksheet option, and a worksheet item whose data is missing shows as "דף העבודה לא זמין" and counts as not known. - -## Risks / Trade-offs - -- [Parsing untrusted PDFs] → Only class teachers and managers can upload; size, page and time limits; PDFium is maintained and fuzzed. The rendered JPEGs are what students see; the original is only downloaded. -- [Storage and egress] → Up to 10 pages per submission, re-encoded to ≤2400 px JPEG (~300–600 KB). A class of 30 with 5 worksheets a month is in the low GB per year. If egress becomes a concern, submissions can move to the Hugging Face bucket used for answers (`MATHLY_ANSWER_BUCKET`) in a later change. -- [Large uploads on weak phone connections] → The hand-in sheet shows progress, keeps the chosen photos when sending fails, and lets the student try again. -- [Teacher removes a worksheet students already handed in] → Confirmation names the number of submissions. -- [Students cannot fix a checked submission] → Deliberate for now (see Non-Goals). The teacher can still change the score and comment. - -## Migration Plan - -1. Add `pypdfium2` to `requirements.txt`. -2. Apply the additive migration (two tables and the bucket). -3. Deploy. Without the migration, worksheets are switched off and assignments work as before. -4. Rollback: previous code. The tables and bucket can stay; old code never reads worksheet items, but it would reject saving an assignment that has one (unknown item kind), so teachers should not edit those assignments until the code is back. diff --git a/openspec/changes/add-assignment-worksheets/proposal.md b/openspec/changes/add-assignment-worksheets/proposal.md deleted file mode 100644 index 54d19852555a3dcc6c09edebce05321008fa214c..0000000000000000000000000000000000000000 --- a/openspec/changes/add-assignment-worksheets/proposal.md +++ /dev/null @@ -1,39 +0,0 @@ -# Proposal - -## Why - -Assignments (`add-class-assignments`) can only point at practice that already exists in the app: a skill, a unit quiz or a practice exam. Most homework is still a worksheet the teacher wrote or photocopied, handed out on paper or in a WhatsApp group, and collected in class. The teacher cannot give it through Mathly, and cannot see in the משימות tab who handed it in. Letting the teacher attach a worksheet to an assignment, and letting students hand in a photo of their solution, brings that homework into the same place. - -## What Changes - -- New assignment item kind: **worksheet (דף עבודה)**. In the assignment form the class teacher (or a manager) uploads a PDF (up to 10 pages) or 1 to 10 photos, with a short title. An assignment can have up to 5 worksheets next to its other items. -- A PDF is turned into page images on the server, so every phone shows it the same way. The original PDF is kept so it can be downloaded and printed. -- Students open the worksheet from the **"משימות מהמורה"** card: its pages are shown one under the other, with a button to download the original. -- Students **hand in** their solution as 1 to 10 photos. Until the teacher checks it, the student can replace the submission. After the due date, a submission is still accepted and marked late. -- A worksheet item is **done** when the student has handed in. It is late when handed in after the Jerusalem end of the due date (same rule as the other items). -- In the class report's **"משימות"** tab, the teacher sees for each worksheet who handed in, who is late and who is missing, and how many submissions are waiting to be checked. The teacher opens a submission, sees its pages, and marks it **checked**, with an optional score (0–100) and an optional comment. -- The student sees the check on the assignment card: "נבדק", the score and the comment. A checked submission can no longer be replaced. -- No AI check of worksheets. -- The user guide (both tabs) and README describe the feature. - -## Capabilities - -### New Capabilities - -- `assignment-worksheets`: worksheets a class teacher attaches to an assignment, how students open them and hand in a solution, and how the teacher checks submissions. - -### Modified Capabilities - -(none: there are no main specs yet. `class-assignments` is still an open change. The new item kind and its completion rule are specified in this capability.) - -## Impact - -- New migration `_math_worksheets.sql`: tables `math_worksheets` and `math_worksheet_submissions` (service-only, deleted with their class), and a private storage bucket `mathly-worksheets`. -- New module `app/worksheets.py`: upload, read and delete routes for the teacher, read and hand-in routes for students, the check route, and cleanup of worksheets that no assignment uses. -- `app/assignments.py`: `clean_assignment` accepts `{kind: "worksheet", id}` items that belong to the class. Deleting an assignment, or removing a worksheet from it, removes the worksheet and its submissions. -- `app/class_report.py` and `GET /api/math/assignments`: return worksheet submissions (status, times, score, comment), but not storage paths. -- `static/math-sky.js` `assignmentState`: the worksheet item. `static/math.js`: upload in the assignment form, worksheet viewer, hand-in sheet, submission review in the report. `static/math.css`, `static/guide.js`, `README.md`. -- New dependency `pypdfium2` (PDF to page images, self-contained wheel). -- `app/answer_cleanup.py` (hourly job): also removes worksheets that no assignment uses after 24 hours. -- Tests: new `tests/test_worksheets.py`, browser tests for the teacher and student flows, `tests/test_sky_browser.py` for the completion rule. -- Depends on `add-class-assignments` (in place). diff --git a/openspec/changes/add-assignment-worksheets/specs/assignment-worksheets/spec.md b/openspec/changes/add-assignment-worksheets/specs/assignment-worksheets/spec.md deleted file mode 100644 index 7e4516965f4a696fcc9560e74b67608c09cd65e7..0000000000000000000000000000000000000000 --- a/openspec/changes/add-assignment-worksheets/specs/assignment-worksheets/spec.md +++ /dev/null @@ -1,122 +0,0 @@ -# Spec Delta - -## Purpose - -Lets a class teacher hand out a worksheet (a PDF or photos) as part of an assignment, lets students open it and hand in a photographed solution, and lets the teacher check each submission. - -## ADDED Requirements - -### Requirement: Class teacher attaches a worksheet to an assignment -The class teacher of a class, or a manager, SHALL be able to add a worksheet item to an assignment of that class. The worksheet has a title of up to 80 characters and is one PDF of up to 10 pages and 10 MB, or 1 to 10 photos (JPEG, PNG or WebP, up to 5 MB each). An assignment SHALL have at most 5 worksheet items. Any other account MUST be refused. - -#### Scenario: Teacher attaches a PDF -- **WHEN** the teacher of 9א uploads a 3-page PDF titled "דף עבודה – פיתגורס" and saves the assignment with it -- **THEN** the assignment has a worksheet item with that title and 3 pages - -#### Scenario: Teacher attaches photos -- **WHEN** the teacher uploads 2 photos as one worksheet -- **THEN** the worksheet has 2 pages, in the order they were chosen - -#### Scenario: File refused -- **WHEN** the teacher uploads a PDF of 11 pages, a file over the size limit, or a file that is not a PDF or an image -- **THEN** the server refuses it with an error naming the limit, and nothing is stored - -#### Scenario: Not the class teacher -- **WHEN** a student or a teacher of another class tries to upload a worksheet for 9א -- **THEN** the server refuses with a forbidden error - -#### Scenario: Worksheet of another class -- **WHEN** an assignment of 9א is saved with a worksheet item uploaded for 9ב -- **THEN** the server rejects the assignment - -### Requirement: Worksheet files stay private -Worksheet files and submission photos SHALL be readable only through the server, by the class's students (worksheets), the student who handed in (their own submission), and the class teacher or a manager. Responses to the browser MUST NOT contain storage paths. Uploaded images SHALL be stored without their metadata (such as location). - -#### Scenario: Student of another class -- **WHEN** a student who is not in 9א asks for a page of a 9א worksheet -- **THEN** the server answers not found - -#### Scenario: Another student's submission -- **WHEN** a student asks for a page of a classmate's submission -- **THEN** the server answers not found - -### Requirement: Students open the worksheet -A student SHALL be able to open each worksheet of their classes' assignments from the assignment card, see its pages one under the other, and download the original file (the PDF, or the photos). - -#### Scenario: Student opens a PDF worksheet -- **WHEN** a student of 9א opens "דף עבודה – פיתגורס" from "משימות מהמורה" -- **THEN** the 3 pages are shown as images, with a button to download the PDF - -### Requirement: Students hand in a solution -A student SHALL be able to hand in a solution to a worksheet as 1 to 10 photos. Until the teacher checks the submission, the student SHALL be able to replace it with a new set of photos; the new set replaces the old one. A submission after the due date SHALL be accepted. - -#### Scenario: Hand in -- **WHEN** a student photographs 2 pages of their solution and sends them -- **THEN** the submission is stored with 2 pages and the time it was handed in - -#### Scenario: Replace before the check -- **WHEN** a student who handed in sends a new set of photos before the teacher checked -- **THEN** only the new set is kept, with the new time - -#### Scenario: Replace after the check -- **WHEN** a student tries to hand in again after the teacher checked the submission -- **THEN** the server refuses, and the checked submission stays as it was - -#### Scenario: Not in the class -- **WHEN** a student who is not in 9א tries to hand in a 9א worksheet -- **THEN** the server answers not found - -### Requirement: Worksheet item completion -A worksheet item SHALL be done for a student when the student has a submission for it. It SHALL be late when it was handed in after the end of the due date, Jerusalem time. The same rule SHALL be used on the student's card and in the teacher's report. - -#### Scenario: Handed in on time -- **WHEN** the due date is 12/11 and the student handed in on 12/11 at 22:00 Jerusalem time -- **THEN** the item is done and not late - -#### Scenario: Handed in late -- **WHEN** the student handed in on 13/11 -- **THEN** the item is done late - -#### Scenario: Not handed in -- **WHEN** the student opened the worksheet but did not hand in -- **THEN** the item is not done - -### Requirement: Teacher follows and checks submissions -In the class report's assignments tab, the teacher SHALL see for each worksheet which students handed in (on time or late), which are missing, and how many submissions wait for a check. The teacher SHALL be able to open a submission, see its pages, and mark it checked with an optional score from 0 to 100 and an optional comment of up to 1000 characters. The teacher SHALL be able to change the score and comment later. - -#### Scenario: Waiting for a check -- **WHEN** 3 of 20 students handed in and none was checked -- **THEN** the worksheet shows 3 handed in, 17 missing and 3 waiting for a check - -#### Scenario: Teacher checks a submission -- **WHEN** the teacher opens Dana's submission, gives 85 and writes "יפה, שימי לב ליחידות" -- **THEN** the submission is checked, with that score and comment, and is no longer counted as waiting - -#### Scenario: Score out of range -- **WHEN** the teacher sends a score of 120 -- **THEN** the server rejects it - -### Requirement: Student sees the check -After the teacher checks a submission, the student SHALL see on the assignment card that it was checked, with the score and the comment when given. - -#### Scenario: Checked with a comment -- **WHEN** the teacher checked Dana's submission with 85 and a comment -- **THEN** Dana's card shows "נבדק", 85 and the comment - -### Requirement: Removing a worksheet removes its submissions -When an assignment is deleted, or a worksheet item is removed from it, the worksheet, its files, and its submissions SHALL be deleted. The form SHALL ask for confirmation, naming how many students handed in. A worksheet uploaded but never saved into an assignment SHALL be deleted after 24 hours. - -#### Scenario: Worksheet removed from an assignment -- **WHEN** the teacher removes a worksheet that 4 students handed in, and confirms -- **THEN** the worksheet and the 4 submissions are gone, and the students no longer see the item - -#### Scenario: Upload never saved -- **WHEN** the teacher uploads a worksheet and closes the form without saving -- **THEN** the worksheet is deleted within a day - -### Requirement: Works without the migration -When the worksheet storage is not set up, the server SHALL answer worksheet routes with an "unavailable" error, the assignment form SHALL not offer worksheets, and the rest of assignments SHALL keep working. - -#### Scenario: Tables missing -- **WHEN** the worksheet migration was not applied and a teacher opens the assignment form -- **THEN** the form has no worksheet option, and assignments without worksheets save as before diff --git a/openspec/changes/add-assignment-worksheets/tasks.md b/openspec/changes/add-assignment-worksheets/tasks.md deleted file mode 100644 index 6acb7345b372421a1632974d36bb092a774f0ba5..0000000000000000000000000000000000000000 --- a/openspec/changes/add-assignment-worksheets/tasks.md +++ /dev/null @@ -1,38 +0,0 @@ -# Tasks - -## 1. Storage - -- [x] 1.1 Add migration `_math_worksheets.sql`: `math_worksheets`, `math_worksheet_submissions` (cascade from class and worksheet, unique per worksheet and student, score 0–100, comment ≤1000), service-only grants, private bucket `mathly-worksheets` (JPEG and PDF, 10 MB) with a restrictive policy. Verify it applies on the local test database (pgserver) and that deleting a class removes its worksheets and submissions. -- [x] 1.2 Add `pypdfium2` to `requirements.txt`. Verify `pip install -r requirements.txt` works and a 2-page test PDF renders to 2 JPEGs. - -## 2. Server - -- [x] 2.1 Add `app/worksheets.py` with the storage adapter (rows and bucket through the service key, 503 `worksheets_unavailable` when missing) and file checks: PDF (header, ≤10 MB, ≤10 pages, render with time limit) and photos through `clean_image`. Verify in `tests/test_worksheets.py`: valid PDF, 11-page PDF, oversized file, non-PDF with a .pdf name, 1 and 11 photos. -- [x] 2.2 Add the teacher upload route `POST /api/classes/{cid}/worksheets` with the class-teacher-or-manager rule. Verify: class teacher 201, other teacher 403, student 403, response has no storage paths. -- [x] 2.3 Accept `{kind: "worksheet", id}` in `clean_assignment` (same class, at most 5), and delete worksheets (rows, submissions, files) dropped by an assignment update or delete. Verify in `tests/test_assignments.py`: worksheet of another class rejected, 6 worksheets rejected, worksheet-only assignment accepted, removing the item deletes the worksheet and its submissions. -- [x] 2.4 Add the page and original routes for class members and the class teacher. Verify: a class student reads pages and the PDF, a student of another class gets 404, the original of a photo worksheet is 404. -- [x] 2.5 Add the student hand-in route (create or replace, 409 `already_checked` after a check) and the route to read their own pages. Verify: hand in, replace before check keeps only the new pages and removes the old files, replace after check refused, another student's pages 404, student outside the class 404. -- [x] 2.6 Add the teacher's submission page route and the check route (`score` 0–100 or empty, `comment` ≤1000, `checked_at` set once). Verify: check, change later keeps the first `checked_at`, score 120 rejected, other teacher 403. -- [x] 2.7 Add `worksheets` and the student's `submissions` to `GET /api/math/assignments`, and the class's worksheets and each student's `worksheet_submissions` to the class report. Verify both answers in tests, with `null` when the tables are missing and no storage paths ever. -- [x] 2.8 Record `worksheet_added`, `worksheet_submitted`, `worksheet_checked` in the actions log. Verify in `tests/test_monitoring.py`. -- [x] 2.9 Extend the hourly cleanup (`app/answer_cleanup.py`) to delete worksheets that no assignment uses after 24 hours, with their files. Verify with a test that an unused 25-hour-old worksheet is removed and a used one or a 1-hour-old one is kept. - -## 3. Completion - -- [x] 3.1 Extend `assignmentState` in `static/math-sky.js` to take `{sittings, submissions}` (a bare array still read as sittings) and handle worksheet items (done at `submitted_at`, late after the Jerusalem end of the due date, not known when submissions are null). Update the three callers. Verify in `tests/test_sky_browser.py` with the spec's scenarios (on time at 22:00 on the due date, late, not handed in) and that existing assignment tests still pass. - -## 4. Teacher UI - -- [x] 4.1 Add the worksheet option to the assignment form: title, choose a PDF or photos, upload progress, page count, remove; hidden when worksheets are unavailable. Removing a worksheet, or deleting the assignment, confirms with the number of students who handed in. Verify with a browser test that uploads a PDF, saves, and removes it with the confirmation. -- [x] 4.2 In the report's "משימות" tab, show per worksheet: handed in, late, missing, waiting for a check; and per student a button that opens the submission (pages, score field, comment, save). Verify with a browser test on a 3-student fixture: open, check with a score and comment, counts update. - -## 5. Student UI - -- [x] 5.1 Show worksheet items on the "משימות מהמורה" card, with a viewer (pages one under the other, download button). The continue button opens the viewer for a worksheet item. Verify with a browser test. -- [x] 5.2 Add the hand-in sheet (take or choose 1–10 photos, reorder or remove, send with progress, keep photos on failure, replace before check) and show "הוגש", "נבדק", the score and the comment on the card. Verify with a browser test: hand in, replace, and see a check from a fixture. -- [x] 5.3 Styles in `static/math.css` for the form, viewer, hand-in sheet and report, in light and dark and at phone width. Verify by screenshot in the browser tests at 390 px. - -## 6. Docs and integration - -- [x] 6.1 Update `static/guide.js` (student: opening a worksheet and handing in; teacher: attaching a worksheet and checking) and `README.md` (feature, limits, migration, `pypdfium2`). Verify `tests/test_guide_browser.py` passes. -- [x] 6.2 Run the full `pytest` suite and check locally end to end: the teacher attaches a PDF to an assignment, a student opens it and hands in 2 photos, the teacher checks with a score and comment, and the student sees it. diff --git a/openspec/changes/add-class-assignments/design.md b/openspec/changes/add-class-assignments/design.md deleted file mode 100644 index a7b3a7aaa5cbfa3cac7fcb13e486de5b4dbd1c6c..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-assignments/design.md +++ /dev/null @@ -1,44 +0,0 @@ -# Design - -## Context - -- Classes live in Supabase `classes` (`emails`, `teachers`, `lessons`, `exams` jsonb, `nicknames`), loaded and cached by `app/auth.py` `classes()`. The class exam board is a jsonb column edited by managers. -- Skill completion is in the student's progress (`P.done`), practice exams in `P.quizzes[] {at, n, right, ms, units}`, and unit-quiz sittings on the server after `add-server-quiz-grades`. -- The class report already loads every student's progress, so it can compute completion for each student in the page. - -## Goals / Non-Goals - -**Goals:** -- Assignments stored on the server per class, editable by the class teacher. -- Completion computed from data that already exists, with no new student-side writes. - -**Non-Goals:** -- Push notifications for new assignments (the existing push in `app/push.py` is scoped to scan requests; a later change can generalize it). -- Assigning to individual students or groups (whole class only for now). -- Grades for assignments. - -## Decisions - -**Own table, not a jsonb column on `classes`.** `math_assignments(id uuid, class_id int references classes on delete cascade, title, note, due_on date, items jsonb, created_by_email, created_at, updated_at)`. A table keeps edits by the class teacher separate from the manager-owned class row (`save_class` rewrites the whole row) and allows per-assignment timestamps. Alternative considered: `classes.assignments` jsonb like `exams`. Rejected because concurrent edits by the manager and the teacher would overwrite each other. - -**Items format.** `[{kind:"skill", id}, {kind:"unit_quiz", unit}, {kind:"exam", units:[...]}]`, validated on the server against `app/math_algebra9.json` and the class's `lessons`. At most 20 items. - -**Routes (`app/assignments.py`).** -- Teacher: `GET/POST /api/classes/{id}/assignments`, `PUT/DELETE /api/classes/{id}/assignments/{aid}`. The rule: the email is in the class's `teachers`, or the account has `management.access` (same as the class report). -- Student: `GET /api/math/assignments` returns the assignments of all the student's classes with `due_on` in the last 14 days or later, plus the student's unit-quiz sitting times (from `math_quiz_sittings`) so the page can decide unit-quiz completion without another call. - -**Completion computed in the page.** One pure function `assignmentState(assignment, progress, sittings, now)` is used on the student's home and in the report, so both always agree. Due date is the end of `due_on` in Asia/Jerusalem. "Done late" uses the item's completion time where one exists (`P.done[id]`, sitting `submitted_at`, exam `at`). - -**Report.** The report endpoint adds `assignments` for the class and each student's `quiz_sittings` (already added by `add-server-quiz-grades`). The "needs attention" signal list from `add-class-attention-view` gets one more signal fed by `assignmentState`. - -## Risks / Trade-offs - -- [Skill completion is device-reported] → Same trust level as the rest of the practice data, and labelled as such in the report. -- [A teacher deletes an assignment students were working on] → The form asks for confirmation and states how many students already started it. -- [Time zone at the due-date boundary] → Due dates are dates, and late means after 23:59 Jerusalem time on that date. - -## Migration Plan - -1. Apply the additive migration. -2. Deploy. Without the table, the routes return 503 `assignments_unavailable`, the student card is hidden and the report tab says assignments are unavailable. -3. Rollback: previous code. The table can stay. diff --git a/openspec/changes/add-class-assignments/proposal.md b/openspec/changes/add-class-assignments/proposal.md deleted file mode 100644 index 82a239f1557676c39bc24f12c329748b1afcbe31..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-assignments/proposal.md +++ /dev/null @@ -1,39 +0,0 @@ -# Proposal - -## Why - -The teacher can watch the class but cannot ask it to do anything in the app. Homework still happens outside Mathly, so the path's skills, the unit quizzes and the practice exams are disconnected from what the teacher planned for the week. Students decide alone what to practise, and the teacher has no way to check that "practise Pythagoras before Thursday" happened. Assignments make the teacher's plan part of the student's path and give the teacher a reason to open the report. - -## What Changes - -- The class teacher (or a manager) can create an **assignment (משימה)** for a class: a title, an optional note, a due date, and one or more items: - - **skills** to finish (from the class's units), - - a **unit quiz** to submit, - - a **practice exam** to take over chosen units. -- The teacher can edit or delete an assignment. Students see changes the next time they load. -- Students see **"משימות מהמורה"** on their home screen above the path: each open assignment with its due date, the items, how many are done, and a button that opens the next unfinished item. Overdue assignments are marked. Finished ones move to a "done" list for 14 days. -- Skills on the path that belong to an open assignment get a small marker. -- An item is done when: - - a skill: the skill is finished (at any time, including before the assignment), - - a unit quiz: a sitting for the unit was submitted after the assignment was created (server record from `add-server-quiz-grades`), - - a practice exam: a practice exam covering all the chosen units was taken after the assignment was created. -- The class report gets an **"משימות"** tab: each assignment with how many students finished it, and per student which items are done, late or missing. Students with an overdue unfinished assignment are added to the "needs attention" list (from `add-class-attention-view`). - -## Capabilities - -### New Capabilities - -- `class-assignments`: assignments a class teacher gives a class (items, due date), how students see and complete them, and how the teacher follows them. - -### Modified Capabilities - -(none: there are no main specs yet. The attention signal for overdue assignments is specified here, as a requirement on this capability.) - -## Impact - -- New migration `_math_assignments.sql`: table `math_assignments`, service-only. -- New module `app/assignments.py`: CRUD routes for the class teacher and managers, and a read route for students (assignments of their classes). -- `static/math.js`: the teacher's create/edit form, the "משימות" report tab, the student's home card and path markers, completion computed from progress and server sittings. -- `static/math.css`, `static/guide.js` both tabs, `README.md`. -- Tests: new `tests/test_assignments.py`, browser tests. -- Depends on `add-server-quiz-grades` (unit-quiz items) and `add-class-attention-view` (attention signal). Without the latter the signal is simply not shown. diff --git a/openspec/changes/add-class-assignments/specs/class-assignments/spec.md b/openspec/changes/add-class-assignments/specs/class-assignments/spec.md deleted file mode 100644 index e7ddb40a6b65165ea887d9cde8f3a12ed6ec6435..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-assignments/specs/class-assignments/spec.md +++ /dev/null @@ -1,88 +0,0 @@ -# Spec Delta - -## Purpose - -Lets a class teacher give their class practice to do in the app by a date, shows students what to do next, and shows the teacher who did it. - -## ADDED Requirements - -### Requirement: Class teacher creates assignments -The class teacher of a class, or a manager, SHALL be able to create an assignment for that class with a title of up to 80 characters, an optional note of up to 500 characters, a due date, and at least one item. An item is a skill, a unit quiz, or a practice exam over chosen units, and it MUST belong to the class's units. Any other account MUST be refused. - -#### Scenario: Teacher creates an assignment -- **WHEN** the teacher of 9א creates "חזרה לפני המבחן" due 12/11 with skills `g_pyth` and `g_pyth_word` and the unit quiz of unit `g` -- **THEN** the assignment is stored for 9א with its three items and its due date - -#### Scenario: Item outside the class's units -- **WHEN** the teacher adds a skill from a unit that is not open to the class -- **THEN** the server rejects the assignment - -#### Scenario: Not the class teacher -- **WHEN** a student or a teacher of another class tries to create an assignment for 9א -- **THEN** the server refuses with a forbidden error - -#### Scenario: No items -- **WHEN** the teacher saves an assignment with no items -- **THEN** the server rejects it - -### Requirement: Teacher edits and deletes assignments -The class teacher or a manager SHALL be able to change an assignment's title, note, due date and items, or delete it. Students SHALL see the change the next time their page loads assignments. - -#### Scenario: Due date moved -- **WHEN** the teacher moves the due date from 12/11 to 14/11 -- **THEN** students of the class see 14/11 after reloading - -#### Scenario: Assignment deleted -- **WHEN** the teacher deletes an assignment -- **THEN** it no longer appears to students or in the report - -### Requirement: Students see their open assignments -A student SHALL see on their home screen the assignments of their classes that are not finished, with title, note, due date, items, and how many items are done. An assignment past its due date and not finished SHALL be marked as late. Finished assignments SHALL appear in a separate done list for 14 days after their due date. - -#### Scenario: Open assignment -- **WHEN** a student has an assignment with 3 items, 1 done, due in 2 days -- **THEN** the home screen shows it with "1 מתוך 3" and the due date - -#### Scenario: Late assignment -- **WHEN** the due date has passed and an item is not done -- **THEN** the assignment is shown as late - -#### Scenario: Next item -- **WHEN** the student presses the assignment's continue button -- **THEN** the app opens the first unfinished item (the skill sheet, the unit quiz introduction or a practice exam set to the chosen units) - -### Requirement: Item completion rules -A skill item SHALL be done when the student has finished the skill, whenever that happened. A unit-quiz item SHALL be done when the server has a sitting of that unit's quiz from the student submitted after the assignment was created. A practice-exam item SHALL be done when the student took a practice exam after the assignment was created that included all the item's units. - -#### Scenario: Skill finished before the assignment -- **WHEN** a student finished `g_pyth` last week and an assignment with `g_pyth` is created today -- **THEN** that item is already done for the student - -#### Scenario: Old unit-quiz sitting -- **WHEN** the student's only sitting of unit `g` was submitted before the assignment was created -- **THEN** the unit-quiz item is not done - -#### Scenario: Practice exam missing a unit -- **WHEN** the item asks for a practice exam over units `t` and `g`, and the student took one over `t` only -- **THEN** the item is not done - -### Requirement: Assigned skills are marked on the path -Skills that are items of an open assignment SHALL carry a marker on the student's path, with an accessible label naming the assignment. - -#### Scenario: Marker -- **WHEN** `g_pyth` is in an open assignment that the student has not finished -- **THEN** its star on the path has the assignment marker - -### Requirement: Teacher follows assignment completion -The class report SHALL list the class's assignments with how many students finished each, and for each assignment the students with each item's state: done, not done, or done late (finished after the due date, for items with a completion time). - -#### Scenario: Teacher opens an assignment -- **WHEN** the teacher opens "חזרה לפני המבחן" in the report's assignments tab -- **THEN** they see "18 מתוך 27 סיימו" and a row per student showing which items are done - -### Requirement: Overdue assignments raise attention -A student with an assignment past its due date and not finished SHALL appear in the report's "needs attention" section, with a reason naming the assignment. - -#### Scenario: Overdue -- **WHEN** a student has not finished an assignment whose due date was yesterday -- **THEN** the student appears in "needs attention" with the reason naming that assignment diff --git a/openspec/changes/add-class-assignments/tasks.md b/openspec/changes/add-class-assignments/tasks.md deleted file mode 100644 index 3ea8985318962ad0eb8e32770400864c87197769..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-assignments/tasks.md +++ /dev/null @@ -1,27 +0,0 @@ -# Tasks - -## 1. Storage and routes - -- [x] 1.1 Add migration `_math_assignments.sql` (`math_assignments`, cascade on class delete, service-only). Verify it applies on the test database and deleting a class removes its assignments. -- [x] 1.2 Add `app/assignments.py` with teacher CRUD routes, item validation against the skills data and the class's units, and the class-teacher-or-manager rule. Verify in `tests/test_assignments.py`: create, foreign unit rejected, empty items rejected, other teacher 403, student 403, edit, delete. -- [x] 1.3 Add `GET /api/math/assignments` for students (their classes' assignments in range, plus their unit-quiz sitting times). Verify a student in two classes gets both classes' assignments and none from other classes. - -## 2. Completion - -- [x] 2.1 Add `assignmentState` in `static/math.js` implementing the completion rules (skill any time, unit quiz after creation, exam covering all units after creation, late after the Jerusalem end of the due date). Verify with a browser unit test on fixed fixtures for each scenario in the spec. - -## 3. Student UI - -- [x] 3.1 Add the "משימות מהמורה" home card (open, late, done list for 14 days, continue button to the next item). Verify with a browser test for open, late and next-item navigation. -- [x] 3.2 Mark assigned skills on the path with an accessible label. Verify in the browser test. - -## 4. Teacher UI - -- [x] 4.1 Add the create/edit form (title, note, due date, item pickers limited to class units) and delete with a confirmation that names how many students started. Verify with a browser test that creates and edits an assignment. -- [x] 4.2 Add the report's "משימות" tab with per-assignment counts and per-student item states. Verify with a browser test on a 3-student fixture. -- [x] 4.3 Add the overdue-assignment signal to the "needs attention" list (if `add-class-attention-view` is in place). Verify in the report browser test. -- [x] 4.4 Update `static/guide.js` (student: "משימות מהמורה"; teacher: creating and following assignments) and `README.md` (feature and migration). Verify `tests/test_guide_browser.py` passes. - -## 5. Integration - -- [x] 5.1 Run the full `pytest` suite and check locally end to end: the teacher assigns two skills and a unit quiz, a student completes them, and the report shows the student as done. diff --git a/openspec/changes/add-class-attention-view/design.md b/openspec/changes/add-class-attention-view/design.md deleted file mode 100644 index fa545817d778db7079abad6964f57b1b6c0f8cb1..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-attention-view/design.md +++ /dev/null @@ -1,39 +0,0 @@ -# Design - -## Context - -- `GET /api/classes/{id}/report` (`app/class_report.py`) returns, per student, a slice of the saved progress object (`report_part`: `done, gold, days, missed, slips, quizzes, uq, updated`). The page computes everything else with the same functions the student's own page uses (`reportOf` in `static/math.js`, `MathlySky.patterns`, `MathlySky.star`). -- `P.days` maps `YYYY-MM-DD` to correct answers that day. `P.slips` is a log of wrong answers with skill, question, misconception and time. `P.seen[id]` is the last time a skill was practised, and the fading rule (`MathlySky.fading`) uses it. -- Classes already store `nicknames` (email → name) set in the class editor (`app/auth.py`). - -## Goals / Non-Goals - -**Goals:** -- All signals and grid states computed in the browser from the data the report already loads, plus `seen`, `tries` and a name, with no new table. -- Use the student's own rules (fading, patterns) so the teacher and the student see the same state. - -**Non-Goals:** -- A server-side event log or long-term trends beyond two weeks (a later change can add one). -- Alerts or push notifications to the teacher. -- Teacher-configurable thresholds. They are constants for now, see below. - -## Decisions - -**Compute attention in the page, not on the server.** The report page already runs the patterns logic, and the signals are small functions over the same object. Keeping them next to `reportOf` avoids duplicating the rules in Python. Alternative considered: a server endpoint `GET /report/attention`. Rejected because it would duplicate `fading`/`patterns` logic in two languages. - -**Constants, in one place in `math.js`:** `INACTIVE_DAYS = 7`, `STUCK_SLIPS = 3` within `STUCK_WINDOW_DAYS = 14`, `DROP_RATIO = 0.5` with `DROP_MIN_LAST_WEEK = 10`, `LOW_GRADE = 55`, `CLASS_DIFFICULTY_SHARE = 1/3`. Weeks are Sunday–Saturday (the Israeli school week), using the device's local dates as `P.days` does. - -**"Practising" state.** A skill is practising when `tries[id] > 0` (or it has slips) and `done[id]` is unset. That is why `report_part` adds `tries` and `seen`. - -**Names.** `auth.user_ids` already pages through the Supabase admin user list. It will also return `user_metadata.full_name` (or `name`). The report puts `name` = class nickname, else full name, else null, and the page falls back to the email prefix. - -**Grid layout.** A table with a sticky first column (names) inside a sideways-scrolling container. Cells are 28 px coloured squares with text alternatives (`aria-label`). On a phone the grid scrolls inside its box, never the page. The tab choice (list / grid), chosen unit and sort order are kept in `localStorage` under `mathly.report.*`, wrapped in try/catch. - -**Low-grade signal.** It reads the server grades added by `add-server-quiz-grades`. If that change is not deployed (no `quiz_sittings` in the response), the signal is skipped instead of using device scores. - -## Risks / Trade-offs - -- [Signals use device-reported practice data] → Labelled as such (from `add-server-quiz-grades`). These are prompts for the teacher to look, not grades. -- [Clock and timezone differences between devices] → Day keys are already local dates. A one-day error at week boundaries is acceptable for these signals. -- [Large classes make the grid wide] → One unit at a time (10 skills) keeps it within about 400 px. -- [Admin user list paging cost for names] → Same call the report already makes; no extra request. diff --git a/openspec/changes/add-class-attention-view/proposal.md b/openspec/changes/add-class-attention-view/proposal.md deleted file mode 100644 index 5c64aeef30c694c8fc75d2606ddb972f70401011..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-attention-view/proposal.md +++ /dev/null @@ -1,40 +0,0 @@ -# Proposal - -## Why - -The class report ("הכיתה שלי") is a list of collapsed cards, one per student, ordered as the class roster. To find out who needs help, the teacher has to open every card and compare numbers in their head, and nothing in the report shows change over time. A teacher with 30 students needs to see in seconds who has stopped practising, who is stuck, and which skill the whole class is stuck on, and plan the next lesson from that. - -## What Changes - -- Add a **"needs attention" (דורשים תשומת לב)** section at the top of the report. It lists the students who match at least one signal, each with the reasons in plain words: - - no practice for 7 days or more, - - stuck on a skill: 3 or more wrong answers in it in the last 14 days without finishing it, - - practice this week less than half of last week (with at least 10 correct answers last week), - - latest unit-quiz grade below 55 (server grade, from `add-server-quiz-grades`), - - signed in but never practised. -- Add a **students × skills grid** tab for a chosen unit: one row per student and one column per skill, each cell showing the star state (gold, finished, fading, practising, not started). A column summary counts how many students finished each skill, and practising-but-not-finished columns with many students are highlighted as class-wide difficulties. -- Add a **units overview** in the grid: one column per unit of the class, each cell showing finished skills out of the unit's skills. -- Show **weekly activity** on each student's card: correct answers this week and last week, from the per-day counts already saved. -- Let the teacher **sort** the student list by attention, name, progress or last activity. -- Show students by the class's **nickname** for them, then their Google name, then the part of the email before the @ (today it is always the email part). -- The report needs two more fields from each student's progress (`seen`, `tries`) and each student's Google name. - -## Capabilities - -### New Capabilities - -- `class-report`: what the class teacher sees about their students: who needs attention and why, the students × skills grid, weekly activity, sorting and student names. - -### Modified Capabilities - -(none: there are no main specs yet) - -## Impact - -- `app/class_report.py`: `report_part` adds `seen` and `tries`; each student entry adds `name` (class nickname or Google full name). -- `app/auth.py`: `user_ids` (or a sibling) also returns each user's display name from the Supabase admin user list. -- `static/math.js` (class report section): attention computation, the grid tab, sort control, weekly activity, names. -- `static/math.css`: grid and attention styles, readable on a phone (the grid scrolls sideways inside its own box, never the page). -- `static/guide.js` teacher tab, `README.md` class-teacher section. -- Tests: `tests/test_class_report.py`, a new browser test for the report. -- Depends on `add-server-quiz-grades` for the low-grade signal. Without it, that signal is left out. diff --git a/openspec/changes/add-class-attention-view/specs/class-report/spec.md b/openspec/changes/add-class-attention-view/specs/class-report/spec.md deleted file mode 100644 index 7a88df46e05e377cc098a595da90b06099dbe494..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-attention-view/specs/class-report/spec.md +++ /dev/null @@ -1,88 +0,0 @@ -# Spec Delta - -## Purpose - -Gives the class teacher a view of their students that shows at a glance who needs help and why, where the class as a whole is stuck, and how each student's activity is changing. - -## ADDED Requirements - -### Requirement: Report lists students who need attention -The class report SHALL open with a "needs attention" section listing every student who matches at least one attention signal, with each matched signal stated in words. Students with a progress record and no signal MUST NOT appear in it. When no student matches, the section SHALL say so. - -#### Scenario: Inactive student -- **WHEN** a student's last practice day is 8 days ago -- **THEN** the student appears in the section with the reason "לא תרגל 8 ימים" - -#### Scenario: Stuck on a skill -- **WHEN** a student has 3 or more wrong answers in skill `t_ext` in the last 14 days and has not finished `t_ext` -- **THEN** the student appears with a reason naming that skill - -#### Scenario: Activity dropped -- **WHEN** a student had 20 correct answers last week and 6 this week -- **THEN** the student appears with a reason saying their practice dropped - -#### Scenario: Small numbers are not a drop -- **WHEN** a student had 8 correct answers last week and 2 this week -- **THEN** the drop signal does not apply to them - -#### Scenario: Low unit-quiz grade -- **WHEN** a student's latest server-graded unit-quiz grade in a class unit is below 55 -- **THEN** the student appears with a reason naming the unit and the grade - -#### Scenario: Never practised -- **WHEN** a student has signed in but has no saved progress -- **THEN** the student appears with the reason that they have not started practising - -#### Scenario: Nobody needs attention -- **WHEN** no student matches any signal -- **THEN** the section says that no student needs attention right now - -### Requirement: Students × skills grid -The report SHALL offer a grid for a unit the teacher chooses among the class's units: one row per student, one column per skill of the unit. Each cell SHALL show the skill's state for that student: gold, finished, fading, practising (tried but not finished) or not started. - -#### Scenario: Teacher opens the grid -- **WHEN** the teacher opens the grid and chooses unit `t` -- **THEN** each student row shows one cell per skill of `t`, coloured by state, with the state also given as text for screen readers - -#### Scenario: Fading cell -- **WHEN** a student finished a skill but has not practised it for longer than the fading period used on the student's own path -- **THEN** the cell shows the fading state, the same state the student sees on their own path - -### Requirement: Grid shows class-wide difficulties -Each skill column in the grid SHALL show how many students finished it. A column where at least a third of the students with progress are practising the skill without finishing it SHALL be marked as a class-wide difficulty. - -#### Scenario: Class stuck on a skill -- **WHEN** 12 of 27 students with progress have tried `g_pyth` without finishing it -- **THEN** the `g_pyth` column is marked as a class-wide difficulty and shows how many students finished it - -### Requirement: Units overview -The grid SHALL also offer an overview with one column per class unit, each cell showing how many of the unit's skills the student finished out of the unit's total. - -#### Scenario: Overview -- **WHEN** the teacher opens the units overview -- **THEN** each student row shows, for every class unit, finished skills out of total skills - -### Requirement: Weekly activity on a student's card -Each student's card SHALL show the correct answers of the current week and of the previous week, taken from the student's per-day practice counts. - -#### Scenario: Two weeks of practice -- **WHEN** a student answered 14 questions correctly this week and 22 last week -- **THEN** their card shows 14 for this week and 22 for last week - -### Requirement: Teacher can sort the student list -The teacher SHALL be able to sort the student list by attention (most signals first), name, progress (finished skills) or last activity. The chosen order SHALL be kept on that device when the report is opened again. - -#### Scenario: Sort by last activity -- **WHEN** the teacher chooses to sort by last activity -- **THEN** the students who practised longest ago come first - -### Requirement: Students are shown by name -The report SHALL show each student by the nickname set for them in the class, otherwise by their Google account name, otherwise by the part of their email before the @. The full email SHALL stay visible inside the student's card. - -#### Scenario: Class nickname set -- **WHEN** the class has the nickname "נועה ל." for a student -- **THEN** the report shows "נועה ל." for that student everywhere in the report - -#### Scenario: No nickname -- **WHEN** a student has no class nickname and their Google name is "Noa Levi" -- **THEN** the report shows "Noa Levi" diff --git a/openspec/changes/add-class-attention-view/tasks.md b/openspec/changes/add-class-attention-view/tasks.md deleted file mode 100644 index 49ffb3545a2317851510ed28f6f1df5aae3c58e2..0000000000000000000000000000000000000000 --- a/openspec/changes/add-class-attention-view/tasks.md +++ /dev/null @@ -1,25 +0,0 @@ -# Tasks - -## 1. Report data - -- [x] 1.1 In `app/class_report.py`, add `seen` and `tries` to `report_part`. Verify in `tests/test_class_report.py` that both are returned and non-object values are dropped. -- [x] 1.2 Return each student's display name (class nickname, else Google full name, else null) from the report, extending `app/auth.py` `user_ids` to collect `user_metadata` names. Verify with a test using a fake admin user list with and without names. - -## 2. Needs-attention section - -- [x] 2.1 Add the attention constants and a pure `attentionOf(student, units, now)` in `static/math.js` returning a list of reasons. Verify with a browser test (pattern of `tests/test_sky_browser.py`) feeding fixed progress objects for each signal, including the "small numbers are not a drop" case. -- [x] 2.2 Render the "דורשים תשומת לב" section at the top of the report, with the empty-state text, and each student's reasons linking to their card. Verify with a browser test of the report sheet. -- [x] 2.3 Show weekly activity (this week / last week) on each card. Verify in the same browser test with known `days`. - -## 3. Grid and sorting - -- [x] 3.1 Add list/grid tabs, the unit picker, the per-skill grid using `MathlySky.star` states, the column counts and the class-difficulty mark. Verify with a browser test on a 3-student fixture, checking cell states and the marked column. -- [x] 3.2 Add the units overview. Verify finished/total per unit in the browser test. -- [x] 3.3 Add the sort control (attention, name, progress, last activity), saved in `localStorage` with try/catch. Verify order changes in the browser test. -- [x] 3.4 Use display names everywhere in the report, with the full email kept in the card. Verify in the browser test. -- [x] 3.5 Add CSS for the grid with a sticky name column and sideways scrolling inside its box. Verify at 375 px width in Playwright that the page itself has no horizontal scroll. - -## 4. Docs and integration - -- [x] 4.1 Update the "דוח הכיתה" section of the teacher tab in `static/guide.js` and the class-teacher section of `README.md`. Verify `tests/test_guide_browser.py` passes. -- [ ] 4.2 Run the full `pytest` suite and open the report for a real class locally to check the attention list against the cards. diff --git a/openspec/changes/add-grok-library-mcp/.openspec.yaml b/openspec/changes/add-grok-library-mcp/.openspec.yaml deleted file mode 100644 index d58ba023278aa6f86a07634f36bfd9ad72f3f2b3..0000000000000000000000000000000000000000 --- a/openspec/changes/add-grok-library-mcp/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-26 diff --git a/openspec/changes/add-mcp-exercise-difficulty/.openspec.yaml b/openspec/changes/add-mcp-exercise-difficulty/.openspec.yaml deleted file mode 100644 index d58ba023278aa6f86a07634f36bfd9ad72f3f2b3..0000000000000000000000000000000000000000 --- a/openspec/changes/add-mcp-exercise-difficulty/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-26 diff --git a/openspec/changes/add-mcp-learning-analytics/.openspec.yaml b/openspec/changes/add-mcp-learning-analytics/.openspec.yaml deleted file mode 100644 index d58ba023278aa6f86a07634f36bfd9ad72f3f2b3..0000000000000000000000000000000000000000 --- a/openspec/changes/add-mcp-learning-analytics/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-26 diff --git a/openspec/changes/add-mcp-monitoring-tools/.openspec.yaml b/openspec/changes/add-mcp-monitoring-tools/.openspec.yaml deleted file mode 100644 index d58ba023278aa6f86a07634f36bfd9ad72f3f2b3..0000000000000000000000000000000000000000 --- a/openspec/changes/add-mcp-monitoring-tools/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-26 diff --git a/openspec/changes/add-misconception-patterns/.openspec.yaml b/openspec/changes/add-misconception-patterns/.openspec.yaml deleted file mode 100644 index ac359ee856ea9f318747548d79c5b762050496f4..0000000000000000000000000000000000000000 --- a/openspec/changes/add-misconception-patterns/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-11-03 diff --git a/openspec/changes/add-misconception-patterns/design.md b/openspec/changes/add-misconception-patterns/design.md deleted file mode 100644 index 358bde3fb305a3d95e8e9a02f79c11e1399dfdf6..0000000000000000000000000000000000000000 --- a/openspec/changes/add-misconception-patterns/design.md +++ /dev/null @@ -1,51 +0,0 @@ -# Design - -## Context - -Progress lives in one object `P` in localStorage (`mathly.progress.v1:`), saved by `save()` in `static/math.js`. The scoring rules live in `static/math-sky.js` (`window.MathlySky`), whose `ensure(P)` fills missing fields so older saved progress keeps loading. Wrong answers reach three places, each of which already knows the choice's mistake tag (`data-m` on the button, or `choice.mistake`): - -- `answer()`: skill practice. Calls `Sky.wrong(P,id)` and shows `G.mistakes[m]`. -- `reviewAnswer()`: mixed review. Calls `Sky.reviewed` and `Sky.wrong`. -- `quizSubmit()`: practice exam. Already builds a per-exam mistake tally, but doesn't keep it. - -`G.mistakes[tag]` has `name`, `tip` and `back` (a skill id or `null`). The home screen is assembled in the path view as `topBar() + daily() + reviewCard() + examSoon() + quizCard() + …`. - -## Goals / Non-Goals - -**Goals:** -- One place that writes a log entry, called from the three answer paths. -- Pure summary logic in `math-sky.js`, testable through the page without UI. -- The data shape is ready for a later personal path to read. - -**Non-Goals:** -- Syncing the log to the server or a teacher view. -- Changing what any activity shows or scores today. -- Open-ended or photographed answers (they have no tags). - -## Decisions - -**Log shape: an array `P.slips` of `{at, id, q, m, via}`.** `at` is an ISO time, `id` the skill, `q` the question index, `m` the tag, and `via` is `"practice" | "review" | "exam"`. The newest are kept last and the array is capped at 500. A flat append-only log is chosen over pre-aggregated counters per tag because the 30/14/60-day windows and the later personal path need the time of each event. 500 short entries are about 40 KB, well inside localStorage. `ensure()` creates `slips` as an array, as it already does for `comets`. - -**`Sky.slip(P, id, q, m, via, now)` writes; `Sky.patterns(P, mistakes, now)` reads.** `patterns` returns `{recurring:[…], stopped:[…]}`. Each item is `{m, n, skills:[ids by count], last, practise}`. `practise` is `mistakes[m].back`, or else the skill where `m` came up most, with ties going to the most recent. Ranking: number of distinct skills, then count, then most recent. Both lists are cut to 3. For "stopped", a sliding pass over the tag's sorted times checks whether any two entries are 30 days or less apart. Keeping this in `math-sky.js` next to `due`/`streak` follows the existing split: rules there, screens in `math.js`. - -**Practice exam logs on hand-in, in `quizSubmit`**, from the final `res` list, not when picks are made, because picks can change and a left exam is discarded. All entries share the hand-in time. - -**Questions are logged by index (`q`).** This matches `P.solved`/`P.missed`. If question lists change, an old index may point at a different question. The summary only uses `m` and `id`, so that doesn't matter. - -**UI: `patternsCard()` after `reviewCard()` on the home screen, and a `showPatterns()` sheet opened by `data-act="patterns"`.** These reuse the existing sheet markup (`mx-sheet`, `mx-shtop`, `mx-x`) and buttons with `data-id` that already open a skill's practice. Copy, in Hebrew and plural like the rest of the app: -- Card title: "דפוסים שחוזרים". Body: "‎ הופיעה ב־N מיומנויות לאחרונה. כדאי לחזק." With only stopped patterns: "‎ כבר לא חוזרת. כל הכבוד על התיקון." -- Each sheet entry: name, tip, "N פעמים ב־K מיומנויות · לאחרונה ", and a "לחזק: " button. -- The stopped section is headed "דפוסים שנעלמו". - -The card sits after review so that today's due review stays first: retrieval comes before targeted work. - -## Risks / Trade-offs - -- [A guess or a slip is counted as a misconception] → It needs two occurrences within 30 days before it shows, and only the top three are shown. -- [Showing mistakes may discourage some students] → The words are about the mistake, the card links straight to an action, and patterns that stopped are shown as a win. -- [The log exists on one device only] → Accepted for now, as with all progress; moving it to the server is a later change. -- [Tag names reused across topics with different meanings] → Tags are global in `math_algebra9.json` by design. Only the skill list reveals the spread. - -## Migration Plan - -No migration is needed. `ensure()` adds an empty `slips` to old progress. Rolling back leaves an unused `slips` array in storage, which is harmless. diff --git a/openspec/changes/add-misconception-patterns/proposal.md b/openspec/changes/add-misconception-patterns/proposal.md deleted file mode 100644 index 3307d2886c8542de21c82f9d63757925d35e48c1..0000000000000000000000000000000000000000 --- a/openspec/changes/add-misconception-patterns/proposal.md +++ /dev/null @@ -1,34 +0,0 @@ -# Proposal - -## Why - -Every wrong choice in the math path is already tagged with a named misconception (244 of them, e.g. `sign_mid`, `ext_partial`), but the tag is used only for the immediate tip and then forgotten: a wrong answer records nothing but a reset run. So the app cannot see that a student keeps making the same mistake across different skills, which is the weakness that actually blocks understanding. Remembering these tags is also the foundation for a later personal path that mixes weak and strong skills. - -## What Changes - -- Record every wrong answer's misconception, with its skill, question, date and where it happened (skill practice, mixed review, practice exam), in the student's progress on the device. -- Add a "patterns that come back" (דפוסים שחוזרים) card on the math home screen when a misconception has come up at least twice recently, naming the misconception and in how many skills it appears. -- Opening the card shows up to three recurring misconceptions, each with its tip, how often and how recently it came up, and buttons to practise the skill to strengthen. -- The patterns also show where the student already looks: the skill to strengthen is marked "לחזק" on the path, and a mistake that is now a pattern says so in its feedback, with the skill to strengthen. -- A pattern that has not come up again for a while leaves the list, and the card says when a pattern used to recur and has stopped ("נעלם"), so improvement is visible. -- Wording stays about the mistake, never about the student, matching the existing quiet-mistake tone. -- Unit-quiz (photographed, open-ended) answers have no misconception tags and are not included. -- Nothing is sent to the server; progress stays in localStorage as today. Existing progress without the new log keeps working. - -## Capabilities - -### New Capabilities - -- `misconception-patterns`: recording a student's tagged mistakes across all multiple-choice practice and showing them the misconceptions that recur across skills, with what to practise. - -### Modified Capabilities - -(none: there are no main specs yet; skill practice, review and the practice exam keep their current behaviour and only also record the mistake) - -## Impact - -- `static/math-sky.js`: progress shape gains a mistake log, and functions to add to it and to summarise it. -- `static/math.js`: wrong answers in practice (`answer`), review (`reviewAnswer`) and the practice exam (`quizSubmit`) log the mistake; new home card and sheet. -- `static/math.css`: styles for the card and sheet. -- `tests/test_sky_browser.py`: browser tests for logging and the card. -- No server, API or data-file changes. diff --git a/openspec/changes/add-misconception-patterns/specs/misconception-patterns/spec.md b/openspec/changes/add-misconception-patterns/specs/misconception-patterns/spec.md deleted file mode 100644 index 94a083a7bdd148cace3d3731ebd7b6cb22f61f1c..0000000000000000000000000000000000000000 --- a/openspec/changes/add-misconception-patterns/specs/misconception-patterns/spec.md +++ /dev/null @@ -1,111 +0,0 @@ -# Spec Delta - -## Purpose - -Remembers which named misconceptions a student's wrong answers show, across all multiple-choice practice, and shows the student the misconceptions that keep coming back across skills, with what to practise, so they work on the cause and not only on one skill. - -## ADDED Requirements - -### Requirement: Every tagged wrong answer is recorded -The system SHALL record each wrong multiple-choice answer whose choice names a misconception, with the misconception, the skill, the question, the time and the activity (skill practice, mixed review or practice exam). Practice-exam answers SHALL be recorded once, when the exam is handed in. Recording SHALL NOT change the feedback, scoring, mastery or review of the answer. - -#### Scenario: A wrong answer in skill practice is recorded -- **WHEN** a student picks a wrong choice tagged `sign_mid` in skill `t_ext` -- **THEN** the student's progress holds one record with misconception `sign_mid`, skill `t_ext`, that question, the time and activity "practice" - -#### Scenario: A wrong answer in mixed review is recorded -- **WHEN** a student picks a wrong choice in a mixed review -- **THEN** a record with activity "review" is added, and the skill's next review is scheduled exactly as before - -#### Scenario: A practice exam is recorded when handed in -- **WHEN** a student changes a wrong pick before handing in a practice exam, then hands it in with two wrong answers -- **THEN** exactly two records with activity "exam" are added, for the final picks only - -#### Scenario: A left practice exam records nothing -- **WHEN** a student leaves a practice exam without handing it in -- **THEN** no records are added - -#### Scenario: A right answer records nothing -- **WHEN** a student picks the right choice -- **THEN** no record is added - -### Requirement: The mistake log stays on the device and is bounded -The mistake log SHALL be kept with the rest of the student's progress on the device, per account, and SHALL keep only the newest 500 records. Progress saved before this change SHALL load and work with an empty log. - -#### Scenario: Old progress without a log -- **WHEN** a student whose saved progress has no mistake log opens the math path -- **THEN** the path works as before and the first wrong answer starts the log - -#### Scenario: The log is capped -- **WHEN** a 501st record is added -- **THEN** the oldest record is dropped and 500 remain - -### Requirement: Recurring misconceptions are identified -A misconception SHALL count as recurring when it was recorded at least twice in the last 30 days and at least once in the last 14 days. Recurring misconceptions SHALL be ordered by how many different skills they appeared in, then by count, then by most recent, and at most three SHALL be shown. - -#### Scenario: Two occurrences make a pattern -- **WHEN** `sign_mid` was recorded twice in the last 30 days, once of them in the last 14 days, and `ext_partial` once -- **THEN** `sign_mid` is a recurring misconception and `ext_partial` is not - -#### Scenario: Spread across skills comes first -- **WHEN** `sign_mid` was recorded 3 times in 3 different skills and `move_sign` 4 times in 1 skill -- **THEN** `sign_mid` is listed before `move_sign` - -#### Scenario: Old records do not count -- **WHEN** a misconception's only records are older than 30 days -- **THEN** it is not a recurring misconception - -### Requirement: The home screen shows a patterns card -The math home screen SHALL show a "patterns that come back" card when there is at least one recurring misconception, naming the top one and in how many skills it appeared. Without recurring or stopped patterns the card SHALL NOT be shown. The card's words SHALL describe the mistake, not the student. - -#### Scenario: Card appears -- **WHEN** a student has a recurring misconception -- **THEN** the home screen shows the card with that misconception's name and its number of skills - -#### Scenario: No card without a pattern -- **WHEN** a student has no recurring misconception and no pattern that has stopped -- **THEN** no patterns card is shown - -### Requirement: The patterns sheet says what to practise -Opening the card SHALL show each recurring misconception (at most three) with its name, its tip, how many times and in how many skills it came up in the last 30 days, and when it last came up. Each SHALL offer a button to practise the skill to strengthen: the misconception's own back-skill when it names one, otherwise the skill where it came up most. Each button SHALL open that skill's practice. - -#### Scenario: A misconception with a back-skill -- **WHEN** the recurring misconception `ext_partial` names `t_ext` as its back-skill -- **THEN** its entry offers a button that opens practice of `t_ext` - -#### Scenario: A misconception without a back-skill -- **WHEN** the recurring misconception `sign_mid` has no back-skill and came up most in `t_simplify` -- **THEN** its entry offers a button that opens practice of `t_simplify` - -### Requirement: Improvement is shown -The patterns sheet SHALL list, separately and at most three, misconceptions that were recorded at least twice within some 30-day span, last recorded between 14 and 60 days ago, as patterns that have stopped. When no misconception is recurring but one has stopped, the card SHALL be shown and say so. - -#### Scenario: A pattern stops -- **WHEN** `sign_mid` was recorded 3 times 20 days ago and not since -- **THEN** the sheet lists `sign_mid` among the patterns that have stopped, and not among the recurring ones - -#### Scenario: A long-stopped pattern is no longer listed -- **WHEN** a misconception was last recorded more than 60 days ago -- **THEN** it is listed neither as recurring nor as stopped - -### Requirement: The path marks the skills to strengthen -On the math path, every skill that a recurring misconception names as its skill to practise SHALL be marked as a skill to strengthen ("לחזק") on its star, so a student following the path meets it there. The "continue here" mark of the next skill SHALL take precedence over this tag. - -#### Scenario: A finished skill to strengthen is marked -- **WHEN** `ext_partial` is recurring, names `t_ext` as its back-skill, and `t_ext` is finished -- **THEN** the star of `t_ext` on the path is marked and tagged "לחזק" - -#### Scenario: No pattern, no mark -- **WHEN** the student has no recurring misconception -- **THEN** no star on the path is marked to strengthen - -### Requirement: A recurring mistake is named where it happens -When a wrong answer in skill practice or mixed review shows a misconception that is recurring (counting this answer), its feedback SHALL add a short note saying how many times and in how many skills it came up in the last 30 days, with a button to practise its skill to strengthen unless that skill is already offered in the same feedback. - -#### Scenario: The second time the same mistake comes up -- **WHEN** `ext_partial` was recorded once in `t_ext_eq` and the student now picks an `ext_partial` choice in `t_simplify` -- **THEN** the feedback says it came up 2 times in 2 skills and offers practice of `t_ext` once - -#### Scenario: A first mistake has no note -- **WHEN** a misconception is recorded for the first time -- **THEN** the feedback shows no pattern note diff --git a/openspec/changes/add-misconception-patterns/tasks.md b/openspec/changes/add-misconception-patterns/tasks.md deleted file mode 100644 index abeed624d20c13d3ea79dc4e26b19d0a9722d7de..0000000000000000000000000000000000000000 --- a/openspec/changes/add-misconception-patterns/tasks.md +++ /dev/null @@ -1,29 +0,0 @@ -# Tasks - -## 1. Mistake log and summary rules (static/math-sky.js) - -- [x] 1.1 Make `ensure(P)` create `P.slips` as an array when missing or invalid; verify with a browser test that progress saved without `slips` loads the path without errors -- [x] 1.2 Add `Sky.slip(P,id,q,m,via,now)` that appends `{at,id,q,m,via}` and keeps the newest 500; export it on `window.MathlySky`; verify with a page-evaluated test that 501 calls leave 500 entries with the oldest dropped -- [x] 1.3 Add `Sky.patterns(P,mistakes,now)` returning `{recurring,stopped}` per the spec (2+ in 30 days with 1 in the last 14 → recurring; 2 within some 30-day span, last seen 14–60 days ago → stopped; ranked by skills, count, recency; 3 each; `practise` = back-skill or most frequent skill); verify with page-evaluated tests covering each spec scenario under "Recurring misconceptions are identified" and "Improvement is shown" - -## 2. Logging wrong answers (static/math.js) - -- [x] 2.1 In `answer()` call `Sky.slip(...,"practice")` on a wrong tagged choice before `save()`; verify a browser test picks a wrong choice in `t_ext` and finds one entry with that tag and `via:"practice"`, and that the existing quiet-mistake test still passes -- [x] 2.2 In `reviewAnswer()` log wrong answers with `"review"`; verify the existing review test still passes and a wrong review answer adds one `review` entry -- [x] 2.3 In `quizSubmit()` log each final wrong pick with `"exam"`; verify a test that changes a pick and hands in logs only final picks, and that quitting an exam logs nothing - -## 3. Patterns card and sheet (static/math.js, static/math.css) - -- [x] 3.1 Add `patternsCard()` after `reviewCard()` in the home screen, shown only when `Sky.patterns` has a recurring or stopped pattern, with the copy from design.md; verify browser tests with seeded progress: no card when empty, card naming the top misconception and its skill count, card wording for stopped-only -- [x] 3.2 Add the `patterns` sheet (`data-act="patterns"`): up to three recurring entries with name, tip, count, skill count, last-seen day and a "לחזק" button opening the practise skill, then a "דפוסים שנעלמו" section; verify a browser test that the button for a tag with `back` opens that skill and for a tag without `back` opens its most frequent skill -- [x] 3.3 Style the card and sheet to match `mx-review`/`mx-quiz-card` in light and dark, at phone width; verify by screenshot at 375px and that no horizontal scroll appears -- [x] 3.4 Update the header comment of `static/math.js` (progress fields) to describe `slips`; verify by reading the comment - -## 4. Patterns where the student looks (path and feedback) - -- [x] 4.1 Mark the skills to strengthen on the path (gold ring and "לחזק" tag, "ממשיכים כאן" wins); verify `test_the_path_marks_the_skill_to_strengthen` and a 375px screenshot -- [x] 4.2 Add the pattern note to practice and review feedback, without repeating a button already offered; verify `test_a_mistake_that_is_a_pattern_says_so_where_it_happens` and `test_a_first_mistake_has_no_pattern_note` - -## 5. Integration check - -- [x] 5.1 Run `pytest tests/test_sky_browser.py tests/test_math_skills.py` and confirm all pass, including the existing practice, review and exam tests unchanged diff --git a/openspec/changes/add-open-question-phone-scan/.openspec.yaml b/openspec/changes/add-open-question-phone-scan/.openspec.yaml deleted file mode 100644 index aa079bc5ee9b7523e2ac478238c5713ccdfd347a..0000000000000000000000000000000000000000 --- a/openspec/changes/add-open-question-phone-scan/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-31 diff --git a/openspec/changes/add-open-question-phone-scan/design.md b/openspec/changes/add-open-question-phone-scan/design.md deleted file mode 100644 index 0182103f4780f3d82f40a2ebefa1a98ba60960bd..0000000000000000000000000000000000000000 --- a/openspec/changes/add-open-question-phone-scan/design.md +++ /dev/null @@ -1,63 +0,0 @@ -# Design - -## Context - -See proposal.md for motivation. `app/math_skills.py` requires sample choices; `static/math.js` rotates them unconditionally and keeps progress and try counts in localStorage. There is no persistent question-attempt model. `app/main.py` stores existing photo sessions in memory for 15 minutes; phone uploads authenticate through a bearer link, invoke the AI solver, and retain no image. That flow cannot provide account-only discovery or durable answer attachments. - -The repository contains a responsive web app with a PWA manifest, not a native mobile project. This design treats the signed-in mobile web/PWA as the Mathly phone app. Existing Supabase authentication exposes a stable user ID. The current database script is destructive and must not be reused for this addition. - -## Goals / Non-Goals - -**Goals:** Durable cross-device association; ownership enforced at every boundary; correct behavior under refresh, retry, concurrency, and lost responses; no AI dependency for capture. - -**Non-Goals:** Native iOS/Android clients, background push notifications, OCR, automatic grading, teacher review, multiple-page answers, and changing existing multiple-choice mastery behavior. One photograph is accepted per scan request. - -## Decisions - -### Explicit question type and stable attempts - -Add `sample.type: open-ended`; missing type continues to mean multiple-choice. Validate each variant separately. Open-ended samples have no choices and may retain a diagram. Use skill ID plus sample content version as question identity; persist a prompt snapshot/version on an attempt so later content edits cannot silently change what was answered. Add an original geometry sample exercising this variant. - -Create `math_question_attempts` with UUID ID, user ID, question ID/version, snapshot, submission status, and timestamps. Resume the owner's active attempt; an explicit new attempt produces a separate ID. Do not treat upload receipt as a correct answer or update mastery. Keeping only local try counts was rejected because another device cannot reliably associate them. - -### Additive Supabase persistence and private storage - -Add `math_answer_scans` (ID, immutable owner/attempt references, state, expiry, generation, upload lease, timestamps, safe error code) and `math_answer_attachments` (ID, owner, attempt, unique scan ID, private object key, validated media type/size, timestamps). Use composite ownership constraints or equivalent transactional checks to prevent owner/attempt mismatches. Enforce one active scan per attempt and one committed answer per attempt in this first version. Other attempts can have independent pending scans. - -Use a private answer-image bucket with server-generated object paths. Enable RLS on new exposed tables, owner-scoped SELECT policies using `auth.uid()`, and deny direct client writes to scan state and attachments. FastAPI validates user ownership and executes narrowly scoped server-side mutations; privileged credentials stay on the server. No user-editable metadata or email-based ownership checks. Serve image bytes through an authenticated owner-checking endpoint with `Cache-Control: no-store`; avoid public or reusable signed image links. Restrict Storage access to the trusted server path and explicit owner reads only if needed. - -This follows current [Supabase private bucket guidance](https://supabase.com/docs/guides/storage/buckets/fundamentals) and [Storage access controls](https://supabase.com/docs/guides/storage/security/access-control). In-memory state was rejected because restarts and multiple workers would lose or disagree about attachments. Reusing the existing bearer-link upload was rejected because possession of its token authorizes another phone. - -### Authenticated request API and state machine - -Add APIs for creating/resuming attempts; creating a scan under an owned attempt; listing the signed-in student's pending scans; reading and confirming a selected scan; beginning and submitting an upload; renewing an expired scan; and reading the attempt attachment. All routes require real authenticated identity even when the deployment otherwise permits guest practice. Unknown and foreign IDs return the same not-found response; unauthenticated access returns sign-in-required. Disabled storage returns a configuration error, never a local-memory substitute. - -Persist states `waiting`, `confirmed`, `uploading`, `received`, `failed`, `expired`, and `superseded`. Map waiting/confirmed to Waiting for phone. Requests expire 15 minutes after creation by server time. Discover pending requests on mobile app entry and foreground resume, with bounded polling while open. Show question text and attempt context in a chooser when several requests exist. Desktop polls the selected attempt every two seconds while visible, backs off on errors, and refreshes immediately on resume. Responses are private and uncached. Polling fits the current stack; Realtime and push add infrastructure without being necessary for foreground discovery. - -Confirmation is an authenticated transition. Camera access is invoked only from the subsequent student gesture using the phone's capture picker, requesting permission only as the browser requires. Reuse the existing image orientation, compression, and preview techniques without changing the solver endpoints. Retakes stay local until explicit submission. Permission denial or picker cancellation leaves the request resumable. Use HTTPS in deployment for camera support. - -### Observable upload, idempotency, and races - -Before transferring bytes, the phone begins an upload with an idempotency key; this persists `uploading` so the computer sees transfer status. A conditional database update grants a bounded upload lease to one submission. Use existing 5 MB JPEG/PNG/WebP limits, validate actual decoded image content and dimensions server-side, and strip metadata through re-encoding. Never trust a client-supplied object path, owner, question, or attempt during upload. - -Store the image privately, then atomically insert the attachment and transition the matching scan generation to `received` after rechecking ownership, lease, expiry, and active attempt. A database transaction/function must enforce these conditions across workers; Python check-then-write is insufficient. Where a privileged database function is necessary, keep it unexposed, revoke PUBLIC execution, pin its search path, and restrict execution to the backend role. It is not a public authorization bypass. - -Return success only after commit. Lost-response retries query the existing result and return the same attachment; another in-flight submission gets a conflict and refreshes status. A failed commit deletes the staged object when possible; periodic cleanup removes unreferenced objects. An abandoned upload lease becomes failed and retryable while its request is valid. Requests past expiry become expired, including stale uploads; finalization cannot accept them. - -Retry of an unexpired failed request uses the same attempt and a new lease. Renewal supersedes the prior request and creates a new 15-minute generation for that attempt. Reject late commits from older generations; serialize renewal and completion on the attempt so only one wins. Never replace a received answer through scan retry. The preview stays available in the phone page after transient failure; no offline image persistence is introduced. - -## Risks / Trade-offs - -- Storage and database commits are separate → stage objects, finalize transactionally, and clean orphans; report success only after finalization. -- Browser camera behavior varies → preserve capture picker fallback, test denial/cancellation on target devices, and document HTTPS requirements. -- Polling adds requests → pause when hidden and back off; status resumes on foreground entry. -- Guest mode lacks account ownership → keep guest practice available but require sign-in for answer scans. -- New persistent handwritten images change data retention → retain committed images with their attempts, cascade user/attempt deletion through a cleanup process, and purge unreferenced staging images after 24 hours. No images enter the AI solver or diagnostic logs. - -## Migration Plan - -1. Generate a separate additive migration for the new tables, constraints, indexes, functions, grants, RLS, and private bucket. Do not rerun `docs/mathly-supabase.sql`. -2. Verify ownership policies with two test accounts and unauthenticated callers, including direct table/storage access. Verify conditional finalization and renewal with concurrent requests. -3. Deploy backend and mobile/desktop UI together; expose capture only when authenticated answer storage is configured. Add one open-ended geometry sample after compatible rendering is deployed. -4. Run the API and browser acceptance suite plus existing choice and photo-solver regressions. Document setup, TTLs, cleanup, and retention in README. -5. Roll back by disabling `MATHLY_ANSWER_SCANS_ENABLED`; the skills endpoint then serves the retained original choice sample for compatibility with guest practice and older frontends. Preserve new tables and private objects for recovery. No existing tables or solver sessions need migration. Cleanup remains available with server credentials while student scanning is disabled. diff --git a/openspec/changes/add-open-question-phone-scan/proposal.md b/openspec/changes/add-open-question-phone-scan/proposal.md deleted file mode 100644 index 9a41e23d3ac150939b6c95d5ac4cf9337d557d2f..0000000000000000000000000000000000000000 --- a/openspec/changes/add-open-question-phone-scan/proposal.md +++ /dev/null @@ -1,33 +0,0 @@ -# Proposal - -## Why - -Students need to submit handwritten reasoning and drawings for open-ended questions. Mathly currently offers multiple-choice practice and phone-based AI problem solving, but cannot securely attach a student's photographed answer to the correct question attempt. - -## What Changes - -- Support open-ended question samples without predefined answer options. -- Add persistent, student-owned question attempts and answer attachments. -- Let a student request a phone scan from an open question and discover pending requests in the mobile app after signing in to the same account. -- Require confirmation before camera access, offer preview and retake, and confirm successful submission on both devices. -- Show waiting, uploading, received, failure, and expiry states; allow safe retries without duplicate attachments or association with a different attempt. -- Keep the existing photographed-problem solver available as a separate flow. - -## Capabilities - -### New Capabilities - -- `open-question-answers`: Open-ended question rendering, owned attempts, and persistent photographed answer attachments. -- `phone-answer-scans`: Same-account request discovery, confirmation, capture, submission, status synchronization, expiry, and retries. - -### Modified Capabilities - -None. This repository has no main capability specifications yet. - -## Impact - -- Question validation in `app/math_skills.py`, sample content, and question rendering in `static/math.js`. -- Authenticated attempt and scan APIs in `app/main.py` with a dedicated persistence module. -- Existing account integration in `app/auth.py`, mobile/PWA entry in `static/index.html`, and reusable photo preparation from `static/photo-image.js`. -- Additive Supabase tables and private image storage; use a separate migration rather than rerunning the destructive `docs/mathly-supabase.sql` script. -- API, ownership, concurrency, and desktop/mobile browser coverage alongside current phone-solver tests. diff --git a/openspec/changes/add-open-question-phone-scan/specs/open-question-answers/spec.md b/openspec/changes/add-open-question-phone-scan/specs/open-question-answers/spec.md deleted file mode 100644 index b95e6e46a11a9ab57cab6f7b46596e30f11d8270..0000000000000000000000000000000000000000 --- a/openspec/changes/add-open-question-phone-scan/specs/open-question-answers/spec.md +++ /dev/null @@ -1,57 +0,0 @@ -# Spec Delta - -## Purpose - -Allow students to answer questions requiring handwritten reasoning or drawings and retain a private photographed answer on the correct question attempt. - -## ADDED Requirements - -### Requirement: Open-ended question presentation -The system SHALL support open-ended questions without predefined answer options and SHALL offer “Scan my answer with my phone” on those questions, using localized text where appropriate. - -#### Scenario: Open a geometry question -- **WHEN** a student opens an open-ended geometry question -- **THEN** the question and any diagram appear without answer-choice controls -- **AND** the student can initiate a phone scan - -#### Scenario: Existing choice question -- **WHEN** a student opens an existing multiple-choice question -- **THEN** its answer choices and feedback continue to work - -### Requirement: Stable student question attempts -The system SHALL give each open-ended attempt a stable identity owned by the authenticated student and bound to the question and its content version. The system SHALL verify ownership before creating a scan or attaching an answer. - -#### Scenario: Resume the same attempt -- **WHEN** the student reloads an open-ended question with an active attempt -- **THEN** the system restores that attempt and its scan or attached answer - -#### Scenario: Reject a foreign or mismatched attempt -- **WHEN** a student requests a scan using another student's attempt or a different question identifier -- **THEN** the system rejects the request without revealing the other student's data - -### Requirement: Private durable answer attachment -The system SHALL retain a submitted photograph as an answer attachment to its original student, question, and attempt. Only that student SHALL be able to retrieve the photograph through the student-facing flow. Upload confirmation SHALL occur only after both image storage and attachment persistence succeed. - -#### Scenario: Submission succeeds -- **WHEN** a confirmed scan submission completes successfully -- **THEN** the photograph appears on its original question attempt on the computer -- **AND** both devices confirm successful upload - -#### Scenario: Navigate to another question -- **WHEN** the student changes questions before an upload completes -- **THEN** the received answer remains attached exclusively to the original attempt - -#### Scenario: Restart after submission -- **WHEN** the server restarts and the student reopens a submitted attempt -- **THEN** the saved answer remains accessible to its owner - -#### Scenario: Photograph access by another account -- **WHEN** another account requests an attachment or its image -- **THEN** access is denied without revealing the attachment contents - -### Requirement: Submission does not imply correctness -The system SHALL distinguish answer receipt from grading and SHALL NOT mark an open-ended answer correct or a skill mastered solely because a photograph was uploaded. - -#### Scenario: Answer received without grading -- **WHEN** a photograph is attached successfully -- **THEN** the attempt displays an answer-received state without automatically awarding correctness or mastery diff --git a/openspec/changes/add-open-question-phone-scan/specs/phone-answer-scans/spec.md b/openspec/changes/add-open-question-phone-scan/specs/phone-answer-scans/spec.md deleted file mode 100644 index e7d14d7602fff67df5c697e76f40df09bb666fa2..0000000000000000000000000000000000000000 --- a/openspec/changes/add-open-question-phone-scan/specs/phone-answer-scans/spec.md +++ /dev/null @@ -1,90 +0,0 @@ -# Spec Delta - -## Purpose - -Coordinate a private phone capture with a computer question attempt so students can safely submit handwritten answers across devices using the same account. - -## ADDED Requirements - -### Requirement: Owned scan request and mobile discovery -The system SHALL create a scan request only for the signed-in student's open-ended attempt and SHALL allow only that student to discover, inspect, confirm, upload to, or retry it. Opening the mobile app signed in to the same account SHALL discover pending requests without requiring a pairing link. - -#### Scenario: Same account opens the phone app -- **WHEN** a student initiates a scan on the computer and opens the mobile app with the same account -- **THEN** the phone offers the pending request with enough question context to identify its attempt - -#### Scenario: Several pending questions -- **WHEN** the student has pending requests for multiple question attempts -- **THEN** the mobile app lets the student select a request by its question and attempt context -- **AND** confirmation and upload apply only to that selected request - -#### Scenario: Different or missing account -- **WHEN** another student or an unauthenticated caller attempts to discover or access the request -- **THEN** the system exposes no request or answer data -- **AND** knowing a request identifier does not grant access - -### Requirement: Confirm before camera access -The mobile app SHALL ask the student to confirm the selected scan before invoking camera capture or requesting camera permission. Denial or cancellation SHALL leave the answer unsubmitted and provide a way to try again. - -#### Scenario: Confirmation accepted -- **WHEN** the student confirms the selected request -- **THEN** the app opens camera capture and requests permission if the platform requires it - -#### Scenario: Confirmation declined -- **WHEN** the student declines confirmation -- **THEN** the app does not open the camera or request camera permission -- **AND** no answer is uploaded - -#### Scenario: Camera permission denied -- **WHEN** camera access is denied or capture is cancelled -- **THEN** the app explains how to retry and leaves the attempt without a submitted photograph - -### Requirement: Review and retake before submission -The mobile app SHALL display a captured photograph for review, SHALL allow retaking it, and SHALL upload only after an explicit submit action. - -#### Scenario: Retake the photograph -- **WHEN** the student retakes a photograph on the review screen -- **THEN** the new capture replaces the local preview -- **AND** neither capture is submitted until the student selects submit - -### Requirement: Shared status and upload feedback -The computer SHALL display Waiting for phone, Uploading, Answer received, Upload failed, or Request expired as appropriate. Status SHALL be associated with the original attempt and restored after reconnection. Both devices SHALL confirm success only when the answer is durably attached. - -#### Scenario: Upload begins and finishes -- **WHEN** the student submits the reviewed photograph -- **THEN** the computer displays Uploading while the transfer is active -- **AND** displays Answer received with the attachment after successful completion - -#### Scenario: Network interruption -- **WHEN** upload or persistence fails -- **THEN** the system displays Upload failed once the failure is detected -- **AND** the phone retains the preview for retry while its page remains open -- **AND** the computer resumes authoritative status checks after reconnection - -### Requirement: Expiry and safe retries -The system SHALL expire unused scan requests after 15 minutes and reject new submissions to expired or superseded requests. The student SHALL be able to retry a failed upload or replace an expired request for the same attempt. Repeated or concurrent submissions SHALL create at most one answer attachment for a request. - -#### Scenario: Expired request -- **WHEN** the student submits to a request after its expiry -- **THEN** the system rejects the upload and offers a fresh request for the same attempt -- **AND** the replacement invalidates the expired request - -#### Scenario: Upload retry after failure -- **WHEN** the student retries a failed upload on an unexpired request -- **THEN** the system retries attachment to the original attempt without creating a new attempt - -#### Scenario: Success response was lost -- **WHEN** the phone repeats a submission that already completed -- **THEN** the system reports the existing successful attachment without duplicating it - -#### Scenario: Concurrent or superseded upload -- **WHEN** two phones submit to one request or an older request finishes after replacement -- **THEN** at most one valid attachment is committed -- **AND** the obsolete submission cannot overwrite the accepted answer - -### Requirement: Answer capture is independent of the solver -The system SHALL support answer scanning without an AI solver key. The existing photographed-problem solving flow SHALL remain usable with its established configuration and behavior. - -#### Scenario: AI is not configured -- **WHEN** a signed-in student requests an answer scan without an AI solver key configured -- **THEN** scan capture and attachment remain available when answer storage is configured diff --git a/openspec/changes/add-open-question-phone-scan/tasks.md b/openspec/changes/add-open-question-phone-scan/tasks.md deleted file mode 100644 index 361d9ec7ab0052e8cbd8fcb05efc4d808432d1d1..0000000000000000000000000000000000000000 --- a/openspec/changes/add-open-question-phone-scan/tasks.md +++ /dev/null @@ -1,36 +0,0 @@ -# Tasks - -## 1. Question model and owned attempts - -- [x] 1.1 Add open-ended sample typing and version identity in `app/math_skills.py`; extend `tests/test_math_skills.py` to accept open-ended samples without choices and reject malformed variants while retaining existing choice validation. -- [x] 1.2 Generate a separate additive Supabase migration for attempts, scans, attachments, ownership constraints, indexes, RLS, grants, and private storage; verify clean application in a disposable database and confirm existing class data remains intact. -- [x] 1.3 Add a persistence adapter and authenticated create/resume/read attempt endpoints using stable user IDs; verify same-account resume, version changes, forged question IDs, foreign ownership, and guest rejection with API tests. -- [x] 1.4 Document storage/auth setup and the additive migration in README; verify setup steps against the disposable environment without rerunning the destructive legacy script. - -## 2. Request lifecycle and durable attachment - -- [x] 2.1 Implement create/discover/read/confirm/renew scan APIs with server-clock expiry and generation checks; verify two-account isolation, missing authentication, several pending attempts, expiry, and supersession through API tests. -- [x] 2.2 Implement begin-upload leases, idempotency, image validation/re-encoding, private object storage, and transactional finalization; verify valid image attachment, invalid/oversized data, storage failure, and commit failure without false success. -- [x] 2.3 Enforce serialization of renewal and finalization plus unique attachments across workers; verify concurrent submissions, stale leases, late old-generation commits, and lost-response retries using database integration tests. -- [x] 2.4 Add authenticated image retrieval and staging/deletion cleanup; verify foreign and unauthenticated reads fail through API and direct table/storage access, accepted attachments survive a restart, and orphan images are purged without deleting referenced images. -- [x] 2.5 Document states, 15-minute expiry, lease timeout, errors, cleanup operation, and image retention; verify examples against endpoint responses and ensure no AI key is required for scans. - -## 3. Desktop open-ended question flow - -- [x] 3.1 Render open-ended questions and diagrams without rotating or displaying choices in `static/math.js`; add a versioned geometry sample and verify browser rendering plus existing multiple-choice feedback and mastery behavior. -- [x] 3.2 Add the localized scan action, attempt restoration, polling, status messages, attachment preview, and failure/expiry retry controls; verify waiting/uploading/received/failed/expired states and question switching in browser tests without attaching an answer to the currently displayed wrong question. -- [x] 3.3 Handle desktop refresh, hidden tabs, reconnect, and sign-out safely; verify polling resumes with server state and no previous-account request or photograph remains visible after account changes. -- [x] 3.4 Document the desktop flow and answer-received versus correctness distinction in README; verify displayed copy and screenshots or browser assertions match the instructions. - -## 4. Mobile discovery and camera flow - -- [x] 4.1 Add authenticated pending-request discovery on mobile/PWA entry and foreground resume, with question/attempt selection and explicit confirmation; verify same-account discovery, multiple requests, wrong-account isolation, and no camera invocation before confirmation. -- [ ] 4.2 Reuse photo preparation for camera capture, review, retake, and explicit submit with localized accessible controls; verify cancellation, denied permission, rotated images, replacement previews, and no upload before submit in browser tests and a documented phone smoke check. -- [x] 4.3 Connect begin/upload/retry/renew actions, retain the local preview after transient failure, and display durable success; verify upload failures, expired requests, duplicate taps, lost responses, and page resume with two independent browser contexts. -- [ ] 4.4 Document mobile sign-in, confirmation, permission recovery, HTTPS, and retry behavior; verify the documented happy path on the mobile web/PWA and record browser-specific camera limitations. - -## 5. Integrated acceptance - -- [x] 5.1 Run a complete two-device same-account scan to the original geometry attempt and a second-account rejection case; verify every scenario in both capability specs with API, database, browser, or recorded manual evidence. -- [x] 5.2 Run the existing pytest suite and phone browser regressions alongside new checks; verify existing photographed-problem solving remains independent and functional and that answer upload never awards correctness or mastery. -- [x] 5.3 Rehearse additive deployment and rollback in a disposable environment; verify private answers remain recoverable, rollback hides unsupported open-ended content, and no production data or legacy tables are deleted. diff --git a/openspec/changes/add-server-quiz-grades/.openspec.yaml b/openspec/changes/add-server-quiz-grades/.openspec.yaml deleted file mode 100644 index 4ccb2b41aa2b40f7b35d576c812cbd2fd5b90a2b..0000000000000000000000000000000000000000 --- a/openspec/changes/add-server-quiz-grades/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-11-04 diff --git a/openspec/changes/add-server-quiz-grades/design.md b/openspec/changes/add-server-quiz-grades/design.md deleted file mode 100644 index 8e08be450c5816e88466bbc35f6c031d2ead0bf4..0000000000000000000000000000000000000000 --- a/openspec/changes/add-server-quiz-grades/design.md +++ /dev/null @@ -1,45 +0,0 @@ -# Design - -## Context - -- A unit-quiz sitting exists only in the progress object `P.uq[unit]` in `static/math.js`: `{sitting, history:[{at, attempts, score, timeUp}]}`. `uqResult` fetches each attempt's check and computes `entry.score`, then `save()` uploads the whole object through `PUT /api/math/progress`. The server stores that object unchecked (`app/progress.py`). -- Each quiz question already has a server attempt, `math_question_attempts`, with `question_id = "quiz::"` (`app/answer_routes.py` `quiz_attempt`). Its photo is in `math_answer_attachments`, and its checks are in `math_answer_grades` (`result.score`, `result.verdict`). -- Point weights are in `app/math_algebra9.json` (`units[].quiz.questions[].points`). -- `app/class_report.py` `report_part` copies `uq` history, including the score, from the progress object into the report. - -## Goals / Non-Goals - -**Goals:** -- Unit-quiz grades in the report and on the result screen come only from server data. -- No change for the student beyond where the number comes from. - -**Non-Goals:** -- Making multiple-choice skill progress, gold stars or practice exams server-verified. Their answers are checked in the browser, and moving that checking to the server is a much larger change. This change labels them instead. -- Teacher overrides of a grade (`add-teacher-grade-review` builds on this table). - -## Decisions - -**A sitting table rather than deriving sittings from attempts.** The server cannot tell which attempts form one sitting, because a retaken quiz creates new attempts for the same questions. A `math_quiz_sittings` row (`id, user_id, unit_id, attempt_ids uuid[], submitted_at, time_up, client_key`) states it explicitly. The unique `(user_id, client_key)` makes a repeated submit idempotent; the device generates `client_key` when the sitting starts. Alternative considered: storing a sitting id on each attempt. Rejected because it changes the attempt table that the scan flow relies on. - -**Compute the grade on read, don't store it.** A grade is a pure function of the sitting's attempts, their latest completed checks and the points in the JSON. Computing it on read keeps it correct when a check finishes later (for example after the teacher sends it from the AI queue) without a trigger or a background job. Class sizes (about 30 students × 14 units) keep this cheap: one query for sittings and one for the latest checks of their attempts. - -**Shared Python function for the grade.** `quiz_grade(unit, attempts, attachments, checks)` lives in a small module used by both the student's sitting route and the class report, so the two can never disagree. - -**Routes.** -- `POST /api/math/quiz-sittings` `{unit_id, attempts:[...], time_up, client_key}` → `{id}`. Validates ownership, and that each attempt's `question_id` is `quiz::` with `i` matching its position. -- `GET /api/math/quiz-sittings?unit_id=` → the student's sittings with `grade`, `open` (questions still unchecked) and per-question points. -- The class report adds `quiz_sittings` per student, and `report_part` drops `uq[].history[].score`. - -**Device copy stays.** `P.uq` keeps the sitting so a reload continues the clock, and `history[].score` stays in the device's progress for older frontends. The report ignores it. - -## Risks / Trade-offs - -- [Students who submitted before deploy lose their grade in the report] → They appear as "not verified". They can see their own past result as before, and the teacher can ask them to resubmit. -- [Submit request fails offline] → The device keeps the sitting marked `submitted` with `serverId` missing and retries the post on the next open of the quiz or the result screen. -- [Grade "drops" for a student who edited their progress] → Intended. - -## Migration Plan - -1. Apply the additive migration (new table, service-only, RLS on). No existing table changes. -2. Deploy the code. Without the table, the submit route returns 503 `quiz_sittings_unavailable` and the report shows quiz grades as unavailable instead of falling back to device data. -3. Rollback: deploy the previous code. The table can stay. diff --git a/openspec/changes/add-server-quiz-grades/proposal.md b/openspec/changes/add-server-quiz-grades/proposal.md deleted file mode 100644 index 2ca3e29957609197791d3dd14d89ac5074f8c462..0000000000000000000000000000000000000000 --- a/openspec/changes/add-server-quiz-grades/proposal.md +++ /dev/null @@ -1,33 +0,0 @@ -# Proposal - -## Why - -The class teacher's report shows each student's unit-quiz (בוחן מסכם) grade, but that grade is computed in the student's browser and saved in the progress object that the student's device uploads unchecked (`PUT /api/math/progress`). A student who edits that object in the browser's developer tools can show the teacher any grade. The real per-answer checks already live on the server (`math_answer_grades`), so the grade the teacher sees can come from there. This must be fixed before the teacher's view is extended (see `add-class-attention-view`, `add-teacher-grade-review`), because those features build on the same grades. - -## What Changes - -- Record each unit-quiz sitting on the server when the student submits it: the unit, its attempts in question order, when it was submitted and whether the time ran out. -- Compute a sitting's score on the server from the stored checks and the quiz's point weights in `app/math_algebra9.json`. A sitting has no score until every answered question has a completed check with a score, and a question without a photographed answer earns 0. -- Show the student the server's score on the quiz result screen. The browser no longer decides it. -- The class report reads unit-quiz grades only from the server's sittings, never from the uploaded progress object. -- Mark in the report that skill progress, gold stars and practice-exam results come from the student's device ("נתוני תרגול מהמכשיר"), so the teacher knows which numbers are checked and which are not. -- Sittings from before this change (only in the progress object) appear in the report as "not verified" without a grade. - -## Capabilities - -### New Capabilities - -- `unit-quiz-grades`: recording unit-quiz sittings on the server and computing their grades from the stored checks, for the student and for the class report. - -### Modified Capabilities - -(none: there are no main specs yet) - -## Impact - -- New migration `supabase/migrations/_math_quiz_sittings.sql`: the service-only `math_quiz_sittings` table. -- `app/answer_routes.py`: a submit route for sittings and a read route for a student's own sittings. -- `app/class_report.py`: reads sittings for the class's students. It stops passing `uq[].history[].score` from the progress object. -- `static/math.js`: `uqSubmit` posts the sitting. `uqResult` shows the server's score. The report shows server grades and marks device-reported data. -- `static/guide.js` (teacher tab) and `README.md` (class teacher section, migration step). -- Tests: `tests/test_unit_quiz.py`, `tests/test_class_report.py`. diff --git a/openspec/changes/add-server-quiz-grades/specs/unit-quiz-grades/spec.md b/openspec/changes/add-server-quiz-grades/specs/unit-quiz-grades/spec.md deleted file mode 100644 index 29591e093e6c763c07a8f710960066e751389b5c..0000000000000000000000000000000000000000 --- a/openspec/changes/add-server-quiz-grades/specs/unit-quiz-grades/spec.md +++ /dev/null @@ -1,70 +0,0 @@ -# Spec Delta - -## Purpose - -Makes the server the only source of a student's unit-quiz grade, so the grade the student and the class teacher see cannot be changed from the student's device. - -## ADDED Requirements - -### Requirement: Submitting a unit quiz records a sitting on the server -When a signed-in student submits a unit quiz, the system SHALL store a sitting with the unit, the quiz's attempts in question order, the submission time and whether the time ran out. Every attempt in the sitting MUST belong to the submitting student and to that unit's quiz questions. - -#### Scenario: Student submits a quiz -- **WHEN** a signed-in student submits the unit quiz of unit `t` with one attempt for each of its four questions -- **THEN** the server stores a sitting for that student and unit with the four attempts in question order, and returns its id - -#### Scenario: Attempt of another student is rejected -- **WHEN** a submission names an attempt that belongs to another account -- **THEN** the server rejects the submission and stores no sitting - -#### Scenario: Attempt of another question is rejected -- **WHEN** a submission for unit `t` names an attempt whose question is not one of unit `t`'s quiz questions, or puts an attempt in the wrong question position -- **THEN** the server rejects the submission and stores no sitting - -#### Scenario: Repeated submit -- **WHEN** the same sitting is submitted twice (for example after a lost response) -- **THEN** the server keeps one sitting and returns the same id both times - -### Requirement: The server computes a sitting's grade from the stored checks -A sitting's grade SHALL be the sum over its questions of the question's points multiplied by its completed check's score out of 100, rounded per question. A question without a saved photo SHALL earn 0. The grade SHALL be absent while any question with a photo has no completed check with a score. - -#### Scenario: All answers checked -- **WHEN** every question of a sitting has a completed check with a score -- **THEN** the sitting's grade is the weighted sum, out of 100 - -#### Scenario: One answer still waiting -- **WHEN** one question has a photo whose check is still waiting for the teacher, still running, or ended without a score (unreadable or needs review) -- **THEN** the sitting has no grade and reports how many questions are still open - -#### Scenario: Missing photo -- **WHEN** a question in a sitting has no saved photo -- **THEN** that question earns 0 points and does not keep the grade open - -### Requirement: Student sees the server's grade -The unit-quiz result screen SHALL show the grade the server computed for the sitting. A grade written by the device into its progress MUST NOT be shown in its place. - -#### Scenario: Result screen -- **WHEN** a student opens the result of a submitted sitting whose answers are all checked -- **THEN** the screen shows the grade returned by the server - -### Requirement: Class report shows only server grades for unit quizzes -The class report SHALL take each student's unit-quiz grades, submission counts and dates only from the server's sittings. Values in the student's uploaded progress MUST NOT change what the report shows for unit quizzes. - -#### Scenario: Edited progress object -- **WHEN** a student's uploaded progress claims a unit-quiz score of 100 but the server's sitting for that unit has a grade of 62 -- **THEN** the class report shows 62 - -#### Scenario: Sitting in progress -- **WHEN** a student's latest sitting for a unit still has unchecked answers -- **THEN** the report shows that unit's quiz as waiting for checking, without a grade - -#### Scenario: Old sitting without a server record -- **WHEN** a student's progress lists a unit-quiz submission from before this change and the server has no sitting for it -- **THEN** the report lists it as not verified and shows no grade for it - -### Requirement: Report labels device-reported numbers -The class report SHALL label skill progress, gold stars and practice-exam results as reported by the student's device, so they are told apart from server-checked unit-quiz grades. - -#### Scenario: Teacher opens a student's card -- **WHEN** the teacher opens a student's card in the class report -- **THEN** the skills and practice-exam sections carry a label saying they come from the student's practice device, and the unit-quiz section does not diff --git a/openspec/changes/add-server-quiz-grades/tasks.md b/openspec/changes/add-server-quiz-grades/tasks.md deleted file mode 100644 index dbd514517d682b923855ee87142a39e857e15590..0000000000000000000000000000000000000000 --- a/openspec/changes/add-server-quiz-grades/tasks.md +++ /dev/null @@ -1,22 +0,0 @@ -# Tasks - -## 1. Sitting storage - -- [x] 1.1 Add migration `supabase/migrations/_math_quiz_sittings.sql`: table `math_quiz_sittings` (id, user_id → auth.users on delete cascade, unit_id, attempt_ids uuid[], submitted_at, time_up, client_key, unique(user_id, client_key)), RLS on, service_role only. Verify it applies cleanly to the disposable test PostgreSQL used by `tests/scan_support.py`. -- [x] 1.2 Add the grade function (points × check score, 0 for a missing photo, open while any photographed answer lacks a scored completed check). Verify with unit tests covering all-checked, waiting, unreadable, needs_review and missing-photo cases. - -## 2. Student routes - -- [x] 2.1 Add `POST /api/math/quiz-sittings` with ownership, question-position checks and an idempotent `client_key`. Verify with tests in `tests/test_unit_quiz.py`: success, another student's attempt, wrong question order, repeated submit returning the same id. -- [x] 2.2 Add `GET /api/math/quiz-sittings?unit_id=` returning the grade, open count and per-question points. Verify with a test where one check completes after submission and the grade appears. -- [x] 2.3 In `static/math.js`, make `uqSubmit` post the sitting (with retry on next open when it failed) and make `uqResult` show the server grade. Verify with a browser test where the device progress has a forged score and the screen shows the server's. - -## 3. Class report - -- [x] 3.1 In `app/class_report.py`, load sittings and their grades for the class's students and stop sending `uq` scores from the progress object. Verify in `tests/test_class_report.py` that a forged progress score does not appear and the server grade does. -- [x] 3.2 In the report UI, show server grades, "ממתין לבדיקה" for open sittings, "לא מאומת" for old device-only sittings, and the device-data label on the skills and practice-exam sections. Verify with a browser test of the report. -- [x] 3.3 Update the teacher tab in `static/guide.js` and the class-teacher and migration sections of `README.md`. Verify `tests/test_guide_browser.py` still passes. - -## 4. Integration - -- [ ] 4.1 Run the full `pytest` suite and check by hand, on a local Supabase project, that a submitted quiz checked through the AI queue shows the same grade to the student and the teacher. diff --git a/openspec/changes/add-student-hints-and-resources/.openspec.yaml b/openspec/changes/add-student-hints-and-resources/.openspec.yaml deleted file mode 100644 index 4ccb2b41aa2b40f7b35d576c812cbd2fd5b90a2b..0000000000000000000000000000000000000000 --- a/openspec/changes/add-student-hints-and-resources/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-11-04 diff --git a/openspec/changes/add-student-hints-and-resources/design.md b/openspec/changes/add-student-hints-and-resources/design.md deleted file mode 100644 index 9979a72c2f33068a0178157c04b1ff157870abf2..0000000000000000000000000000000000000000 --- a/openspec/changes/add-student-hints-and-resources/design.md +++ /dev/null @@ -1,43 +0,0 @@ -# Design - -## Context - -- Skills live in `app/math_algebra9.json` (96 skills with `id, unit, name, short, description, questions[...]`). Each wrong choice carries a `mistake` key into `mistakes` (`name`, `tip`, `back`). `answer()` in `static/math.js` shows the tip and, through `back`, the skill to strengthen. -- A wrong answer already sets `FIRST=false` and resets the first-try run, so finishing and gold already need clean answers after a mistake. -- Resources (`app/unit_resources.py`, table `math_unit_resources`, private bucket `mathly-resources`): teacher-role only (`students.view`), per unit, optional `skill_id`. They are not per class: every teacher sees every unit's resources. -- A student's open units come from their classes (`MY_CLASSES[].lessons`, enforced on the server by `access_for`). - -## Goals / Non-Goals - -**Goals:** -- Help at the moment of being stuck, without giving the current answer away. -- Teacher explanations reach students with one checkbox. - -**Non-Goals:** -- AI-generated hints at runtime (students never call the AI, by product decision). -- Per-class resources (resources stay per unit, as today). -- Hints for unit-quiz or open questions. - -## Decisions - -**Static worked examples in the data file, not AI at runtime.** One example per skill keeps the "students never call the AI" rule, costs nothing per use, and can be checked by a teacher. Format: `example: {question, steps: [{do, why}], answer}`, using the same `$…$` math markup as questions. Authoring: a one-off script may draft examples with Claude from each skill's description and questions. A math teacher reviews every example before it is merged. Skills without an example after review simply don't offer one (the validator requires the example to be well-formed when present; a separate test lists skills still missing one, so coverage is visible without blocking the release). - -**Offer after the second mistake in the round.** It is counted from the round's wrong answers (`P.missed[id]` size, plus this session's wrong answers). The first mistake is often a slip, and the tip already handles it. Two mistakes suggest a gap in the method. The help "?" stays available at any time, so a student who knows they don't know isn't forced to fail twice. - -**Visibility column.** `alter table math_unit_resources add column visible boolean not null default false`. Existing rows stay hidden, which is the safe default because exercises may be test material. The upload form posts `visible`, and its default in the UI depends on the kind. `PATCH /api/math/resources/{rid}` `{visible}` uses the same owner-or-manager rule as delete. - -**Student read routes.** `GET /api/math/units/{unit_id}/student-resources` and `GET /api/math/student-resources/{rid}/image`. Both check that the unit is open to the student (the same check that gates the skills API) and `visible = true`. A hidden or foreign resource answers 404, so ids cannot be probed. Images are served with `Cache-Control: private, max-age=300`. - -**Recording use.** `P.examples[id] = {n, last}` merged across devices by `mergeProgress` (`n`: most, `last`: latest). `report_part` passes `examples`. - -## Risks / Trade-offs - -- [Example quality: a wrong worked example teaches a wrong method] → Every example is reviewed by a math teacher before merge. `tests/test_math_skills.py` checks the format only. -- [Students open the example instead of thinking] → It is offered only after two mistakes, and opening it does not help finish or gold, which still need clean first-try answers. -- [A teacher marks an exercise that will be on a test as visible] → Exercises default to hidden, and the checkbox says "גלוי לתלמידים" explicitly. - -## Migration Plan - -1. Apply the additive migration (one column, default false). -2. Deploy. Without the column, the student resource routes return an empty list and the upload ignores `visible`. -3. Rollback: previous code. The column can stay. diff --git a/openspec/changes/add-student-hints-and-resources/proposal.md b/openspec/changes/add-student-hints-and-resources/proposal.md deleted file mode 100644 index 6ed44a82f43a033529497e05d0e96aebb1207d64..0000000000000000000000000000000000000000 --- a/openspec/changes/add-student-hints-and-resources/proposal.md +++ /dev/null @@ -1,38 +0,0 @@ -# Proposal - -## Why - -When a student picks a wrong answer they see the misconception's name and a one-line tip, and the question comes back later without its answer. That works for a slip, but a student who does not know the method has no way to learn it inside the app. They guess until a question comes back, or give up. Meanwhile teachers photograph explanations from the board into the lesson resources, and those photos are hidden from students ("בשלב זה המשאבים גלויים למורים בלבד"). The help exists, but students cannot reach it. - -## What Changes - -- Add a **worked example** to skills in `app/math_algebra9.json`: a question similar to the skill's questions (not one of them), solved step by step with a short explanation per step. Examples are written for all 96 skills, drafted with help and checked by a math teacher before release. -- In skill practice, after a **second wrong answer in the same skill in the current round**, the feedback offers **"איך פותרים? דוגמה פתורה"**. It opens the worked example in the sheet without leaving the question. The skill's description and the example are also available any time from a small "?" in the skill sheet's header. -- Using the example is recorded per skill (`P.examples[id]`: how many times and when). The student keeps the same rules for finishing a skill and for gold (the earlier wrong answer already broke the first-try run). -- Teachers can mark a lesson resource **"גלוי לתלמידים"**. When they upload, the box is checked by default for a theory explanation and unchecked for an exercise or other photo. They can change it later on existing resources. -- Students see the visible resources of their class's units: - - in a skill's sheet, under "הסברים מהמורה", the visible resources tagged with that skill, - - in the "?" help panel of the skill, - - in a unit-level "הסברים מהמורה" list for visible resources without a skill tag. -- The class report's student card shows the skills where the student opened the worked example, so the teacher sees where they needed help. - -## Capabilities - -### New Capabilities - -- `practice-help`: help a student can reach while practising a skill: the worked example, when it is offered, and recording its use. -- `lesson-resources`: teacher-uploaded lesson photos, who can see them, and the teacher's control over showing them to students. - -### Modified Capabilities - -(none: there are no main specs yet) - -## Impact - -- `app/math_algebra9.json`: an `example` field per skill (`{question, steps:[{do, why}], answer}`). `app/math_skills.py` validates it, and the skills API sends it. -- New migration `_math_resources_visible.sql`: column `visible boolean not null default false` on `math_unit_resources`. -- `app/unit_resources.py`: a `visible` form field and a toggle route for teachers. Read routes for students, limited to visible resources of their class's units. -- `static/math.js`: the offer after the second wrong answer, the "?" help panel, "הסברים מהמורה" lists, the visibility checkbox and toggle, the report card line. `static/math-sky.js`: `examples` in `ensure` and in the progress merge. -- `app/class_report.py`: `report_part` adds `examples`. -- `static/guide.js` both tabs, `README.md` lesson-resources section. -- Tests: `tests/test_math_skills.py`, `tests/test_unit_resources.py`, `tests/test_sky_browser.py`. diff --git a/openspec/changes/add-student-hints-and-resources/specs/lesson-resources/spec.md b/openspec/changes/add-student-hints-and-resources/specs/lesson-resources/spec.md deleted file mode 100644 index d2b1063b114cdbc42dabc3299fe0fbb014e8f1ee..0000000000000000000000000000000000000000 --- a/openspec/changes/add-student-hints-and-resources/specs/lesson-resources/spec.md +++ /dev/null @@ -1,52 +0,0 @@ -# Spec Delta - -## Purpose - -Covers the photos teachers add to a lesson (exercises, theory explanations, other notes): who may add, see and remove them, and how a teacher chooses which ones students see. - -## ADDED Requirements - -### Requirement: Teacher chooses whether students see a resource -Every lesson resource SHALL have a visibility setting. When uploading, the setting SHALL default to visible for a theory explanation and hidden for an exercise or other photo. The teacher who added the resource, or a manager, SHALL be able to change it later. Resources that existed before this change SHALL start hidden. - -#### Scenario: Upload a theory photo -- **WHEN** a teacher uploads a photo marked "הסבר תיאורטי" without changing the visibility box -- **THEN** the resource is visible to students - -#### Scenario: Upload an exercise -- **WHEN** a teacher uploads a photo marked "תרגיל חדש" without changing the visibility box -- **THEN** the resource is hidden from students - -#### Scenario: Another teacher tries to change visibility -- **WHEN** a teacher who did not add a resource, and is not a manager, tries to change its visibility -- **THEN** the server refuses and the setting does not change - -#### Scenario: Existing resources -- **WHEN** this change is deployed -- **THEN** all resources added before it are hidden from students until a teacher makes them visible - -### Requirement: Students see visible resources of their class's units -A signed-in student SHALL be able to list and open the visible resources of the units open to their class. Hidden resources, and resources of units not open to their class, MUST NOT be listed or served to them, and the response MUST NOT include storage paths. - -#### Scenario: Skill sheet shows teacher explanations -- **WHEN** a student in a class with unit `t` opens skill `t_ext`, which has a visible resource tagged with it -- **THEN** the sheet shows it under "הסברים מהמורה", and tapping it shows the photo - -#### Scenario: Unit list -- **WHEN** a unit has visible resources without a skill tag -- **THEN** the student sees them in the unit's "הסברים מהמורה" list - -#### Scenario: Hidden resource requested directly -- **WHEN** a student requests the image of a hidden resource by its id -- **THEN** the server answers not found - -#### Scenario: Unit not open to the class -- **WHEN** a student requests the resources of a unit their class does not have -- **THEN** the server answers with an empty list or not found, and no image is served - -### Requirement: Teachers keep their current access -Accounts with the teacher role SHALL keep seeing all resources, hidden and visible, with the visibility shown on each. Only the teacher who added a resource, or a manager, SHALL be able to delete it. - -#### Scenario: Teacher lists resources -- **WHEN** a teacher opens a unit's resources -- **THEN** they see every resource of the unit, each marked as visible to students or not diff --git a/openspec/changes/add-student-hints-and-resources/specs/practice-help/spec.md b/openspec/changes/add-student-hints-and-resources/specs/practice-help/spec.md deleted file mode 100644 index 987924317cf4b309d7c99d3cbb00c7737eb8fbd6..0000000000000000000000000000000000000000 --- a/openspec/changes/add-student-hints-and-resources/specs/practice-help/spec.md +++ /dev/null @@ -1,57 +0,0 @@ -# Spec Delta - -## Purpose - -Gives a student who does not know how to solve a skill's questions a way to learn the method inside the app, at the moment they are stuck, without giving away the answer to the question in front of them. - -## ADDED Requirements - -### Requirement: Skills have a worked example -Each skill with multiple-choice questions SHALL have a worked example: a question that is not one of the skill's own questions, its solution as ordered steps each with a short explanation, and the final answer. The skills data MUST fail validation when an example repeats one of the skill's questions or has no steps. - -#### Scenario: Valid example -- **WHEN** the skills data is loaded and skill `t_ext` has an example with its own question and three steps -- **THEN** loading succeeds and the skills API returns the example with the skill - -#### Scenario: Example copies a practice question -- **WHEN** a skill's example question is the same as one of its practice questions -- **THEN** validation of the skills data fails, naming the skill - -### Requirement: Example offered after repeated mistakes -In skill practice, the feedback for the second or later wrong answer in the same skill within the current round SHALL offer to open the skill's worked example. The first wrong answer SHALL show only the misconception tip, as today. - -#### Scenario: First mistake -- **WHEN** a student makes their first wrong answer in a round of `t_ext` -- **THEN** the feedback shows the misconception name and tip and does not offer the example - -#### Scenario: Second mistake -- **WHEN** the same student makes a second wrong answer in that round -- **THEN** the feedback also shows a button "איך פותרים? דוגמה פתורה" - -### Requirement: Example opens without losing the question -Opening the worked example SHALL show it inside the skill sheet, step by step, and closing it SHALL return to the same question in the same state. It MUST NOT reveal the answer to the student's current question. - -#### Scenario: Open and return -- **WHEN** the student opens the example and then closes it -- **THEN** they are back on the same question, with the same feedback shown - -### Requirement: Help is available on demand -The skill sheet SHALL offer a help control at any time that shows the skill's description, its worked example and the teacher's visible resources for that skill. - -#### Scenario: Student asks for help before answering -- **WHEN** a student opens skill `t_ext` and presses the help control before answering -- **THEN** the help panel shows the description and the worked example - -### Requirement: Example use is recorded -Each time a student opens a skill's worked example, the student's progress SHALL record it for that skill (count and last time). Opening the example MUST NOT change whether the skill is finished or gold. - -#### Scenario: Example then correct answers -- **WHEN** a student opens the example of `t_ext` and then answers the remaining questions correctly -- **THEN** the use is recorded for `t_ext`, and finishing and gold follow the same rules as without the example - -### Requirement: Teacher sees where examples were used -The class report SHALL show, on each student's card, the skills in which the student opened the worked example in the last 14 days. - -#### Scenario: Report card -- **WHEN** a student opened the example of `g_pyth` three times this week -- **THEN** their card lists `g_pyth` among the skills where they used an example diff --git a/openspec/changes/add-student-hints-and-resources/tasks.md b/openspec/changes/add-student-hints-and-resources/tasks.md deleted file mode 100644 index 583ea9efbdaeedb1b0a91b36436c289616cfb68d..0000000000000000000000000000000000000000 --- a/openspec/changes/add-student-hints-and-resources/tasks.md +++ /dev/null @@ -1,29 +0,0 @@ -# Tasks - -## 1. Worked example content - -- [x] 1.1 Add `example` validation to `app/math_skills.py` (own question, at least one step with `do`/`why`, `answer`) and send it in the skills API. Verify in `tests/test_math_skills.py` with a valid example and one that copies a practice question. -- [x] 1.2 Write a one-off drafting script under `scripts/` that proposes examples for skills without one, writing to a review file, not to the data file. Verify it runs on one unit and produces well-formed drafts. -- [ ] 1.3 Add reviewed examples to `app/math_algebra9.json`, unit by unit, each one approved by a math teacher. Verify the validation test passes and the coverage test lists the skills still missing one. - -## 2. Help in practice - -- [x] 2.1 In `static/math.js`, offer "איך פותרים? דוגמה פתורה" from the second wrong answer in the round, and show the example inside the sheet with a return to the same question. Verify with a browser test: no offer after one mistake, offer after two, same question after closing. -- [x] 2.2 Add the "?" help panel in the skill sheet (description, example, teacher explanations for the skill). Verify in the browser test. -- [x] 2.3 Record `P.examples[id]` (count and last) and merge it across devices in `mergeProgress`. Add it to `ensure` in `static/math-sky.js`. Verify with a browser test that finishing and gold are unchanged by opening the example, and with a merge test. - -## 3. Resource visibility - -- [x] 3.1 Add migration `_math_resources_visible.sql` (column `visible` default false). Verify it applies on the test database. -- [x] 3.2 In `app/unit_resources.py`, accept `visible` on upload and add `PATCH /api/math/resources/{rid}` with the owner-or-manager rule. Verify in `tests/test_unit_resources.py`: defaults by kind, owner can toggle, another teacher gets 403. -- [x] 3.3 Add the student routes (list and image) limited to visible resources of the student's open units, answering 404 otherwise. Verify the tests: hidden resource 404, unit not open 404 or empty, no `object_key` in the response. -- [x] 3.4 In the UI, add the visibility checkbox to the upload form, a toggle and a "visible" mark on each resource for teachers, and the "הסברים מהמורה" lists for students in the skill sheet and unit. Verify with browser tests for both roles. - -## 4. Report and docs - -- [x] 4.1 Add `examples` to `report_part` and show on the student's card the skills where an example was opened in the last 14 days. Verify in `tests/test_class_report.py` and the report browser test. -- [x] 4.2 Update `static/guide.js` (student: the help and teacher explanations; teacher: visibility of resources, replacing "בשלב זה המשאבים גלויים למורים בלבד") and `README.md`. Verify `tests/test_guide_browser.py` passes. - -## 5. Integration - -- [x] 5.1 Run the full `pytest` suite and check locally, as a teacher and a student in the same class, that a theory photo uploaded by the teacher appears in the student's skill sheet. diff --git a/openspec/changes/add-teacher-grade-review/.openspec.yaml b/openspec/changes/add-teacher-grade-review/.openspec.yaml deleted file mode 100644 index 4ccb2b41aa2b40f7b35d576c812cbd2fd5b90a2b..0000000000000000000000000000000000000000 --- a/openspec/changes/add-teacher-grade-review/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-11-04 diff --git a/openspec/changes/add-teacher-grade-review/design.md b/openspec/changes/add-teacher-grade-review/design.md deleted file mode 100644 index ff896da0508a6e076438eb2bd804dac07c5688ef..0000000000000000000000000000000000000000 --- a/openspec/changes/add-teacher-grade-review/design.md +++ /dev/null @@ -1,51 +0,0 @@ -# Design - -## Context - -- Open answers: `math_question_attempts` (question snapshot), `math_answer_attachments` (photo), `math_answer_grades` (AI checks, `result` jsonb with `verdict`, `score`, `feedback`, `transcription`, `solution`). They are read through the owner-checked `math_answer_action`/`math_grade_action` RPCs as the student (`app/answer_scans.py`). -- The teacher → students mapping already exists in `app/ai_queue.py` (`watched`: class teachers see the non-teacher emails of their classes, managers see everyone). -- The AI queue keeps handled rows for a day, so after that the teacher has no way back to an answer. The class report (after `add-server-quiz-grades`) knows each sitting's attempt ids. -- A correct open skill answer completes the skill on the student's device (`static/math.js`, `P.done[questionId]` set from `grading.finished_at` when the verdict is correct). - -## Goals / Non-Goals - -**Goals:** -- The teacher can read and review any checked answer of their students, at any time. -- The student sees the teacher's word clearly, and can ask for it. - -**Non-Goals:** -- Free-form chat threads (one comment per review, and the dispute message, are enough for now). -- Reviewing multiple-choice answers. -- Push notifications for new comments (the home notice is enough. A later change can reuse `app/push.py`). - -## Decisions - -**Separate review table, AI check unchanged.** `math_teacher_reviews(id, attempt_id, user_id (student), reviewer_email, score int null check 0..100, comment text check len ≤ 1000, created_at, seen_at null)`, latest row per attempt wins. The AI's `math_answer_grades.result` is never edited, so the transparency requirement ("AI check" still visible) is free and history is kept. Alternative considered: writing the override into `result`. Rejected because it loses the AI's original and mixes trust levels. - -**Requests table.** `math_review_requests(id, attempt_id, user_id, message ≤ 300, state open|closed, created_at, closed_at)` with a unique partial index on `(attempt_id) where state='open'`. Saving a review closes the open request for that attempt in the same transaction (service-only RPC). - -**Teacher access path.** New routes in `app/teacher_review.py`: -- `GET /api/teacher/answers/{attempt_id}` → question snapshot, checks, latest review, open request. -- `GET /api/teacher/answers/{attempt_id}/image` → the photo bytes (`Cache-Control: no-store`). -- `PUT /api/teacher/answers/{attempt_id}/review` `{score?, comment?}`. -- `GET /api/teacher/review-requests` → open requests of the teacher's students. - -Each route resolves the attempt's owner with the service key, maps it to an email, and checks it against `watched(user)`. The `watched` helper moves from `ai_queue.py` into `app/access.py` (or a shared `classes` helper) so both modules use one rule. - -**Student side.** The existing attempt read adds `teacher_review: {score, comment, at}` (latest) and `review_request` state. New routes `POST /api/math/answer-attempts/{id}/review-request {message}` and `GET /api/math/teacher-comments` (unseen reviews). Opening an attempt sets `seen_at` on its latest review. - -**Effective score.** One helper `effective_score(check, review)` returns `review.score` if set, else `check.score`. The sitting grade from `add-server-quiz-grades` and the attempt payload's `effective_score` both use it. The device's skill completion reads `effective_score == 100` from a teacher review as well as an AI `correct` verdict. - -**Where the teacher opens answers.** The unit-quiz rows in the class report become buttons opening the sitting's answers. Handled AI-queue rows get an "open answer" link. The AI queue sheet gets a second tab "בקשות לבדיקה חוזרת" with a count on the header button. - -## Risks / Trade-offs - -- [The teacher's photo access widens who can read a student's image] → Same population that already sees the photo in the AI queue (class teacher, managers). Checked on every request, never by a public URL. -- [A student spams "look again" requests] → One open request per answer, and a limit of 5 open requests per student, like the AI queue. -- [A teacher score of 100 completing a skill could be unexpected] → It is shown to the teacher in the form ("100 מסמן את המיומנות כהושלמה"). - -## Migration Plan - -1. Apply the additive migration after `add-server-quiz-grades`'s migration. -2. Deploy. Without the tables, teacher review routes return 503 `review_unavailable`, and the student pages show no teacher section. -3. Rollback: previous code. Tables can stay. diff --git a/openspec/changes/add-teacher-grade-review/proposal.md b/openspec/changes/add-teacher-grade-review/proposal.md deleted file mode 100644 index 1559e965fed440b16f603bd7449d43ed82a7387d..0000000000000000000000000000000000000000 --- a/openspec/changes/add-teacher-grade-review/proposal.md +++ /dev/null @@ -1,37 +0,0 @@ -# Proposal - -## Why - -The teacher's only power over a checked answer is to approve or decline it before the AI sees it. After the AI grades it, the teacher cannot fix a wrong grade, cannot grade an answer the AI marked unreadable or "needs review", and cannot say anything personal to the student. The guide even tells students that "the automatic check can be wrong, show your teacher", but the app gives the teacher no way to act on that. Personal feedback on real work is also the strongest link between the teacher and the student, and today there is none. - -## What Changes - -- The class teacher (or a manager) can open any checked open answer of their students: the photo, the question, the AI's transcription, verdict, score and feedback. They reach it from the class report (unit-quiz rows and the student's card) and from handled requests in the AI queue. -- The teacher can **set a teacher score** (0–100) on that answer, replacing the AI's score, and **write a comment** to the student. Both are optional, and saving either creates a teacher review. -- The teacher can give a score to answers the AI left without one (unreadable, needs review), so such a quiz can get a grade. -- The student sees the teacher's comment and score on the answer, marked as coming from the teacher, above the AI feedback. The AI's original score stays visible as "AI check" for transparency. -- Unit-quiz grades (from `add-server-quiz-grades`) use the teacher score when there is one. -- An open skill answer that the teacher marks fully correct (100) completes the skill like a correct AI check does. -- The student can press **"לבקש מהמורה לבדוק שוב"** on a checked answer, with an optional short message. The request appears to the teacher in a "requests to look again" list (in the AI queue sheet) and on the student's report card. It closes when the teacher saves a review. -- The student's home screen shows a small notice when a teacher has commented on one of their answers since they last looked. - -## Capabilities - -### New Capabilities - -- `teacher-answer-review`: the class teacher reviewing a student's checked open answer (teacher score, comment), the student asking for a review, and how the student sees it. - -### Modified Capabilities - -(none: there are no main specs yet. The `unit-quiz-grades` capability added by `add-server-quiz-grades` is extended in this change's spec by a requirement that the teacher score takes precedence.) - -## Impact - -- New migration `_math_teacher_reviews.sql`: tables `math_teacher_reviews` and `math_review_requests`, service-only. -- New module `app/teacher_review.py` with routes for teachers (read an answer with its image, save a review, list requests to look again) and for students (ask for a review, list unseen comments). It reuses the teacher→students mapping from `app/ai_queue.py` (`watched`). -- `app/answer_routes.py` / `app/answer_scans.py`: the attempt read for students includes the teacher review. -- Grade function from `add-server-quiz-grades`: teacher score first. -- `static/math.js`, `static/answer-scans.js`: the teacher's answer view and edit form, the student's display, the "look again" button and the home notice. -- `static/guide.js` both tabs, `README.md`. -- Tests: new `tests/test_teacher_review.py`, browser tests. -- Depends on `add-server-quiz-grades`. diff --git a/openspec/changes/add-teacher-grade-review/specs/teacher-answer-review/spec.md b/openspec/changes/add-teacher-grade-review/specs/teacher-answer-review/spec.md deleted file mode 100644 index 3f2b2ad47c6bf97320f8691ae2ea08f91133cdce..0000000000000000000000000000000000000000 --- a/openspec/changes/add-teacher-grade-review/specs/teacher-answer-review/spec.md +++ /dev/null @@ -1,81 +0,0 @@ -# Spec Delta - -## Purpose - -Lets the class teacher correct and comment on the automatic check of a student's open answer, lets the student ask for that, and makes the teacher's word the one that counts. - -## ADDED Requirements - -### Requirement: Teacher opens a student's checked answer -The class teacher of a student's class, or a manager, SHALL be able to open any of that student's open answers that have a saved photo: the question, the photo, and every completed automatic check with its transcription, verdict, score and feedback. Any other account MUST be refused. - -#### Scenario: Class teacher opens an answer -- **WHEN** the teacher of class 9א opens a unit-quiz answer of a student in 9א from the class report -- **THEN** they see the question, the student's photo and the AI check - -#### Scenario: Teacher of another class -- **WHEN** a teacher who does not teach any class the student is in asks for the answer -- **THEN** the server refuses with a forbidden error and sends neither the image nor the check - -### Requirement: Teacher saves a review with score and comment -The teacher SHALL be able to save a review on an answer with a teacher score from 0 to 100, a comment of up to 1000 characters, or both. A review with neither MUST be rejected. A new review SHALL replace the teacher's previous one for that answer, and the time and reviewer SHALL be recorded. - -#### Scenario: Teacher corrects the AI score -- **WHEN** the AI gave 40 and the teacher saves a score of 85 with the comment "הדרך נכונה, טעות חישוב בשורה 3" -- **THEN** the answer's effective score is 85 and the comment is stored with the teacher's email and the time - -#### Scenario: Teacher grades an unreadable answer -- **WHEN** the AI marked an answer unreadable and the teacher saves a score of 70 -- **THEN** the answer has an effective score of 70 - -#### Scenario: Empty review -- **WHEN** the teacher saves a review with no score and no comment -- **THEN** the server rejects it and nothing changes - -#### Scenario: Score out of range -- **WHEN** the teacher sends a score of 120 -- **THEN** the server rejects it - -### Requirement: Teacher score takes precedence in grades -Wherever an answer's score is used (unit-quiz grade, skill completion), the teacher score SHALL be used when the answer has one, otherwise the AI score. - -#### Scenario: Quiz grade with a teacher score -- **WHEN** a sitting's question worth 25 points has an AI score of 40 and a teacher score of 80 -- **THEN** that question contributes 20 points to the sitting's grade - -#### Scenario: Skill completed by the teacher -- **WHEN** the teacher gives a score of 100 to an open skill answer the AI marked partial -- **THEN** the skill is completed for the student the next time their page reads that answer - -### Requirement: Student sees the teacher's review -The student SHALL see the teacher's comment and score on the answer, marked as from their teacher and shown before the AI feedback. The AI's own score SHALL stay visible, labelled as the automatic check. - -#### Scenario: Student opens a reviewed answer -- **WHEN** the student opens a quiz result whose second answer has a teacher review -- **THEN** the second answer shows "הערת המורה" with the comment and the teacher score, followed by the AI check with its score - -### Requirement: Student asks the teacher to look again -The student SHALL be able to ask their class teacher to look again at a checked answer, with an optional message of up to 300 characters. At most one open request SHALL exist per answer. The request SHALL close when the teacher saves a review on that answer. - -#### Scenario: Student disputes a check -- **WHEN** the student presses "לבקש מהמורה לבדוק שוב" with the message "כתבתי x=4, לא x=1" -- **THEN** the request appears in the teacher's list of requests to look again with the student, the question and the message - -#### Scenario: Second request on the same answer -- **WHEN** the student asks again while their first request on that answer is open -- **THEN** no second request is created and the student sees that the request is already waiting - -#### Scenario: Teacher answers the request -- **WHEN** the teacher saves a review on that answer -- **THEN** the request closes and disappears from the teacher's list - -### Requirement: Student is told about new teacher comments -The student's home screen SHALL show a notice when a teacher has saved a review on one of their answers that they have not opened since, linking to that answer. - -#### Scenario: New comment -- **WHEN** the teacher reviewed one of the student's answers yesterday and the student has not opened it -- **THEN** the home screen shows a notice that the teacher commented, and opening it shows the answer - -#### Scenario: Seen comment -- **WHEN** the student has opened the reviewed answer -- **THEN** the notice no longer appears diff --git a/openspec/changes/add-teacher-grade-review/tasks.md b/openspec/changes/add-teacher-grade-review/tasks.md deleted file mode 100644 index 9b088a0285975369f951f071f6368b7f166fa4e0..0000000000000000000000000000000000000000 --- a/openspec/changes/add-teacher-grade-review/tasks.md +++ /dev/null @@ -1,33 +0,0 @@ -# Tasks - -## 1. Storage and access rule - -- [x] 1.1 Add migration `_math_teacher_reviews.sql`: `math_teacher_reviews`, `math_review_requests` (unique open request per attempt), and a service-only RPC that saves a review and closes the open request in one transaction. Verify it applies to the disposable test PostgreSQL and that a second open request on one attempt fails. -- [x] 1.2 Move the teacher→students rule (`watched`) out of `app/ai_queue.py` into a shared helper used by both modules. Verify `tests/test_ai_queue.py` still passes unchanged. - -## 2. Teacher routes - -- [x] 2.1 Add `app/teacher_review.py` with `GET /api/teacher/answers/{id}` and `/image`, checking the class-teacher rule. Verify in `tests/test_teacher_review.py`: class teacher allowed, other teacher 403, manager allowed, no image bytes on 403. -- [x] 2.2 Add `PUT /api/teacher/answers/{id}/review` with validation (score 0–100, comment ≤ 1000, not both empty). Verify the tests for correcting a score, grading an unreadable answer, the empty review and out-of-range values. -- [x] 2.3 Add `GET /api/teacher/review-requests`. Verify a request appears for its class teacher only and disappears after a review is saved. - -## 3. Grades use the teacher score - -- [x] 3.1 Add `effective_score` and use it in the unit-quiz grade function from `add-server-quiz-grades` and in the attempt payload. Verify with a test where a 25-point question's AI 40 / teacher 80 contributes 20 points. -- [x] 3.2 In `static/math.js`, complete an open skill when the teacher score is 100. Verify with a browser test. - -## 4. Student side - -- [x] 4.1 Include `teacher_review` and `review_request` in the student's attempt read, and set `seen_at` when opened. Verify with tests. -- [x] 4.2 Add `POST /api/math/answer-attempts/{id}/review-request` (one open per answer, at most 5 open per student) and `GET /api/math/teacher-comments`. Verify tests for the duplicate and limit cases. -- [x] 4.3 Show "הערת המורה" with the teacher score above the AI feedback on quiz results and open skill answers, the "לבקש מהמורה לבדוק שוב" button with its message field, and the home notice. Verify with browser tests in `tests/test_answer_browser.py`. - -## 5. Teacher UI - -- [x] 5.1 Add the teacher's answer view (photo, question, AI check, review form, "100 completes the skill" hint), opened from the report's unit-quiz rows and from handled AI-queue rows. Verify with a browser test that saves a review and sees it in the report. -- [x] 5.2 Add the "בקשות לבדיקה חוזרת" tab in the AI queue sheet with a count on the header button. Verify with a browser test. -- [x] 5.3 Update both tabs of `static/guide.js` (the student "בדיקה דרך המורה" section and the teacher "תור AI"/"דוח הכיתה" sections) and `README.md`. Verify `tests/test_guide_browser.py` passes. - -## 6. Integration - -- [x] 6.1 Run the full `pytest` suite and check end to end locally: student submits a quiz, the teacher sends it to the AI, the student disputes one answer, the teacher corrects it, and the student sees the new grade and comment. diff --git a/openspec/changes/archive/2026-10-24-add-focused-learner-home/.openspec.yaml b/openspec/changes/archive/2026-10-24-add-focused-learner-home/.openspec.yaml deleted file mode 100644 index 1f5d28041e04a8554a035b36cd25abe6e8815529..0000000000000000000000000000000000000000 --- a/openspec/changes/archive/2026-10-24-add-focused-learner-home/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-24 diff --git a/openspec/changes/archive/2026-10-24-add-requirements-browser/.openspec.yaml b/openspec/changes/archive/2026-10-24-add-requirements-browser/.openspec.yaml deleted file mode 100644 index f56fe13917aafd9b0317d1339a8548906dd40edf..0000000000000000000000000000000000000000 --- a/openspec/changes/archive/2026-10-24-add-requirements-browser/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-23 diff --git a/openspec/changes/archive/2026-10-24-render-atlas-code-blocks/.openspec.yaml b/openspec/changes/archive/2026-10-24-render-atlas-code-blocks/.openspec.yaml deleted file mode 100644 index 1f5d28041e04a8554a035b36cd25abe6e8815529..0000000000000000000000000000000000000000 --- a/openspec/changes/archive/2026-10-24-render-atlas-code-blocks/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-24 diff --git a/openspec/changes/archive/2026-10-24-render-atlas-diagrams/.openspec.yaml b/openspec/changes/archive/2026-10-24-render-atlas-diagrams/.openspec.yaml deleted file mode 100644 index 1f5d28041e04a8554a035b36cd25abe6e8815529..0000000000000000000000000000000000000000 --- a/openspec/changes/archive/2026-10-24-render-atlas-diagrams/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-24 diff --git a/openspec/changes/add-assignment-worksheets/.openspec.yaml b/openspec/changes/archive/2026-11-07-build-foundation/.openspec.yaml similarity index 50% rename from openspec/changes/add-assignment-worksheets/.openspec.yaml rename to openspec/changes/archive/2026-11-07-build-foundation/.openspec.yaml index 1491b921e293907ec3fc95a3b8a7adfbfb9f991e..e582ee4a2c22919eed558b194fa58fb923e0f359 100644 --- a/openspec/changes/add-assignment-worksheets/.openspec.yaml +++ b/openspec/changes/archive/2026-11-07-build-foundation/.openspec.yaml @@ -1,2 +1,2 @@ schema: spec-driven -created: 2026-11-05 +created: 2026-11-07 diff --git a/openspec/changes/archive/2026-11-07-build-foundation/design.md b/openspec/changes/archive/2026-11-07-build-foundation/design.md new file mode 100644 index 0000000000000000000000000000000000000000..9c6444279417abd2757502778c35334565d476de --- /dev/null +++ b/openspec/changes/archive/2026-11-07-build-foundation/design.md @@ -0,0 +1,77 @@ +# Design + +## Context + +The current app (`app/`, `static/`) is FastAPI plus Supabase, called through Supabase's REST API. It already has Google sign-in, a teacher list from the `TEACHER_EMAILS` setting, and a Dockerfile for Hugging Face Spaces. Two parts are kept as they are (PRD 7.1): the exercise bank `app/math_algebra9.json` (24 lessons, 96 skills, 1,050 questions inside the skills, 244 mistakes) and the drawing board (`static/math-board.js`, `static/board-math.js`, `static/vendor/mathlive/`). + +The bank writes math as plain text between `$…$` with Unicode signs (`$x² − 2x − 15$`), not as LaTeX. The current `static/math-tex.js` turns that text into TeX and draws it with MathJax. + +## Goals / Non-Goals + +**Goals:** +- A base that every later slice (`build-skill-learning`, `build-lesson-quizzes`, `build-assignments`, `build-test-prep`, `build-class-progress-views`) builds on without reworking it. +- Both apps can run side by side until the switch. + +**Non-Goals:** +- Any learning, quiz, test or assignment screen. Those come in later slices. +- Writing the missing content. This change only reports what is missing. +- Changing or retiring the current app. + +## Decisions + +### Layout: one Python package in `mathly2/` +``` +mathly2/ + __init__.py main.py # FastAPI app: uvicorn mathly2.main:app + config.py # settings from environment + clock.py # server time and Israel calendar day + store.py # Supabase REST calls; InMemoryStore for tests + auth.py classes.py bank.py + content/math_algebra9.json # the bank (copied) + static/ # index.html, app.js, app.css, math-tex.js, MathJax setup + supabase/migrations/ + tests/ + Dockerfile README.md +``` +The package is named `mathly2` so it never clashes with the current `app` package when both run from the repo root. *Alternative:* a separate repo, which the user ruled out. + +### Copy the bank, then the new copy is the source +`mathly2/content/math_algebra9.json` is copied once. New content (worked examples, quizzes) goes only into the new copy. *Alternative:* sharing one file, which would let new fields break the current app. + +### Supabase: same project, `m2_` tables, server-only writes +New tables live in the existing project with an `m2_` prefix, so Google sign-in keeps working with no new OAuth setup. Every `m2_` table has row-level security turned on and no policy for the anon or authenticated roles, so only the server (secret key) can read or write them. The browser uses Supabase only to sign in and send its token. This is how the "grades kept on the server" rule is enforced. *Alternative:* a new Supabase project. It's cleaner, but it needs a second Google OAuth setup, and that isn't needed to start empty. + +Foundation tables: +- `m2_classes(id, name, teacher_email, created_at)` +- `m2_class_members(class_id, email unique, user_id null, added_at)`: one class per student, enforced by the unique email. `user_id` is filled on the student's first sign-in. + +### Teachers from `TEACHER_EMAILS` +The same setting as today. It is simple, and there is no admin role (PRD open question 3 was answered: the teacher creates classes and adds students). + +### Server clock and calendar day +`clock.py` gives the server's current time and the calendar day in `Asia/Jerusalem`. Every later rule that depends on days (mastery's "2 different days", the countdown, the simulation window) uses it, never the device's time. + +### Front end: plain ES modules, no build step +One `index.html` with `dir="rtl"` and `lang="he"`, ES modules, and CSS tokens for light and dark mode. It is designed for phone width first (360–430px), with wider layouts added for the teacher screens later. The board files (later slice) and `math-tex.js` are plain scripts, so a build step would add nothing. + +### Math shown with the current `math-tex.js` +The current `math-tex.js` and its MathJax setup are copied, because the bank's math is plain text, not LaTeX. The `exercise-bank` spec's "LaTeX inside `$…$`" is met by drawing every `$…$` as a formula. Whatever can't be read stays as text. + +### Bank checked on start-up +`bank.py` loads the bank once and checks it: ids are unique, every question has one correct choice, every wrong choice's `mistake` exists, every mistake's `back` skill exists when it is filled in (204 of the 244 mistakes have it empty today; the content-gaps report lists them), and every skill's lesson exists. A broken bank stops the server from starting, with a clear message. The API serves lessons and skills, and questions only through later endpoints that hide which choice is correct. + +### Local development without Supabase +When `SUPABASE_URL` is empty, the server uses `InMemoryStore` and a sign-in screen that takes an email (marked "dev only"). Tests use the same path. *Alternative:* requiring a Supabase project for development, which would slow down every test. + +## Risks / Trade-offs + +- [Two copies of the bank diverge] → Intended. The current app is retired at the switch. +- [Supabase REST without a client library] → Same approach as the current app. All calls go through `store.py`, so it can be swapped out in one place. +- [Teacher list in a setting] → Changing teachers needs a restart. That's fine at one school's scale. +- [Students stay in one class] → Matches the PRD. Moving a student means removing them and adding them again. + +## Migration Plan + +- Deploy `mathly2` as its own Hugging Face Space from `mathly2/Dockerfile`, with the same Supabase settings. +- Run the `m2_` migrations. They don't touch the current app's tables. +- Rollback: stop the new Space and drop the `m2_` tables. diff --git a/openspec/changes/archive/2026-11-07-build-foundation/proposal.md b/openspec/changes/archive/2026-11-07-build-foundation/proposal.md new file mode 100644 index 0000000000000000000000000000000000000000..b6ac7b1156812347d9e0bbff4ccf2b15899c78e1 --- /dev/null +++ b/openspec/changes/archive/2026-11-07-build-foundation/proposal.md @@ -0,0 +1,30 @@ +# Proposal + +## Why + +Mathly is being rebuilt from scratch (see `docs/tasks/prd-mathly.md`). Every later feature needs the same base first: a running app in Hebrew and right-to-left, sign-in, classes, and the exercise bank loaded and readable. + +## What Changes + +- New app in `mathly2/`, next to the current app, which keeps running until the new one replaces it. +- Same stack as today: Python FastAPI server, Supabase for sign-in and data, plain JavaScript front end. +- Google sign-in; teachers from a list in the settings; teachers create classes and add students by email. +- The exercise bank is copied into the new app, checked on start-up, and served to the front end, with math shown as formulas. +- A report of the content the bank still lacks (worked examples, faded examples, "why this step?" choices, lesson quizzes). +- A rule and a base for grades: only the server writes them. +- Starts empty: no data moves from the current app. + +## Capabilities + +### New Capabilities +- `app-basics`: Hebrew, right-to-left, phone first; grades kept on the server. +- `exercise-bank`: the bank as the source of lessons, skills, questions and mistakes; math shown as formulas; known content gaps. +- `accounts-and-classes`: Google sign-in, teacher accounts, classes and their students. + +### Modified Capabilities + +## Impact + +- New folder `mathly2/` with its own server package, static files, tests, Supabase migrations and Dockerfile. +- New Supabase tables (prefix `m2_`) in the existing Supabase project, reusing its Google sign-in setup. +- The current app (`app/`, `static/`) is not changed. diff --git a/openspec/changes/archive/2026-11-07-build-foundation/specs/accounts-and-classes/spec.md b/openspec/changes/archive/2026-11-07-build-foundation/specs/accounts-and-classes/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..7d1e8bac7a66847acc5c0ab0ce4dc04e89a80d73 --- /dev/null +++ b/openspec/changes/archive/2026-11-07-build-foundation/specs/accounts-and-classes/spec.md @@ -0,0 +1,61 @@ +# Spec Delta + +## Purpose + +Lets students and teachers sign in with their school Google accounts, and lets a teacher create classes and add students, so every other feature knows who the student is and which class they belong to. + +## ADDED Requirements + +### Requirement: Google sign-in +Students and teachers SHALL sign in with their Google account. The app MUST NOT show any student content before sign-in. + +#### Scenario: Signing in +- **WHEN** a student opens the app and signs in with Google +- **THEN** they see the app as a student + +#### Scenario: Not signed in +- **WHEN** someone opens the app without signing in +- **THEN** only the sign-in screen is shown + +### Requirement: Teacher accounts +Only accounts listed as teachers in the app's settings SHALL get the teacher screens. Every other signed-in account SHALL be treated as a student. + +#### Scenario: Listed teacher +- **WHEN** an account listed as a teacher signs in +- **THEN** they see the teacher screens + +#### Scenario: Not listed +- **WHEN** an account not listed as a teacher signs in +- **THEN** they see no teacher screens + +### Requirement: Teacher creates classes +A teacher SHALL be able to create a class with a name and see the classes they created. + +#### Scenario: New class +- **WHEN** a teacher creates the class "ט'3" +- **THEN** "ט'3" appears in their list of classes + +### Requirement: Teacher adds students by email +A teacher SHALL be able to add students to a class by their email addresses, one or many at once, and remove them. A student SHALL belong to one class at a time. + +#### Scenario: Adding a list +- **WHEN** a teacher pastes 25 email addresses into class "ט'3" +- **THEN** the 25 students are listed in "ט'3" + +#### Scenario: Student in another class +- **WHEN** a teacher adds a student who already belongs to another class +- **THEN** the teacher is told which class the student is in, and the student is not added twice + +### Requirement: Student not in a class +A signed-in student who is in no class SHALL see a message asking them to ask their teacher to add them, showing the email they signed in with. + +#### Scenario: Not added yet +- **WHEN** a student signs in before the teacher added their email +- **THEN** they see the message with their email, and no lessons + +### Requirement: Fresh start +The new app SHALL start with no students, classes or progress. Nothing SHALL be imported from the current app. + +#### Scenario: First teacher sign-in +- **WHEN** a teacher signs in to the new app for the first time +- **THEN** they have no classes, even if they had classes in the current app diff --git a/openspec/changes/archive/2026-11-07-build-foundation/specs/app-basics/spec.md b/openspec/changes/archive/2026-11-07-build-foundation/specs/app-basics/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..c22d419699c69b3a00dc041044f0b94325cadadd --- /dev/null +++ b/openspec/changes/archive/2026-11-07-build-foundation/specs/app-basics/spec.md @@ -0,0 +1,21 @@ +# Spec Delta + +## Purpose + +Sets the rules every Mathly screen follows: Hebrew right-to-left, phone first, and grades kept on the server. + +## ADDED Requirements + +### Requirement: Hebrew, right-to-left, phone first +Every screen SHALL be in Hebrew, laid out right-to-left, and designed for phones first. + +#### Scenario: Opening on a phone +- **WHEN** a student opens the app on a phone +- **THEN** the screen is in Hebrew, right-to-left, and fits the phone's width + +### Requirement: Grades that count are kept on the server +Quiz, exercise test and simulation grades SHALL be computed and stored on the server, so a student cannot change them from the device. + +#### Scenario: Tampered device +- **WHEN** a student changes a grade stored on their device +- **THEN** the grade shown to them and the teacher is still the server's grade diff --git a/openspec/changes/archive/2026-11-07-build-foundation/specs/exercise-bank/spec.md b/openspec/changes/archive/2026-11-07-build-foundation/specs/exercise-bank/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..c73f61679645af3a9344fdc9aaec130eddfb9bb0 --- /dev/null +++ b/openspec/changes/archive/2026-11-07-build-foundation/specs/exercise-bank/spec.md @@ -0,0 +1,28 @@ +# Spec Delta + +## Purpose + +Defines the exercise bank kept from the current app as the source of lessons, skills, questions and mistakes, and how its math is shown. + +## ADDED Requirements + +### Requirement: Bank is the content source +Lessons, skills, multiple-choice questions and mistakes SHALL come from the exercise bank kept from the current app. Each wrong choice of a question SHALL point to a mistake with a name, a tip and the skill to go back to. + +#### Scenario: Wrong choice +- **WHEN** a student picks a wrong choice +- **THEN** the mistake it points to supplies the feedback's name and tip + +### Requirement: Math is rendered +Math written in LaTeX inside `$…$` in the bank SHALL be rendered as math in the app. + +#### Scenario: Question with math +- **WHEN** a question's text contains `$x^2+5x+6$` +- **THEN** the student sees it as a formatted formula + +### Requirement: Content gaps are filled before use +Worked examples, faded examples, "why this step?" choices and quizzes for every lesson SHALL be added to the bank, since it lacks them today. Each skill SHALL have enough questions for similar questions and for retakes that draw new questions. + +#### Scenario: Skill without a worked example +- **WHEN** a skill has no worked example in the bank yet +- **THEN** it is listed as a content gap to fill diff --git a/openspec/changes/archive/2026-11-07-build-foundation/tasks.md b/openspec/changes/archive/2026-11-07-build-foundation/tasks.md new file mode 100644 index 0000000000000000000000000000000000000000..b04d72134184c988d07048878f34b971f3cff17f --- /dev/null +++ b/openspec/changes/archive/2026-11-07-build-foundation/tasks.md @@ -0,0 +1,36 @@ +# Tasks + +## 1. Scaffold + +- [x] 1.1 Create the `mathly2/` package with `main.py`, `config.py` and a `GET /api/health` endpoint; verify `venv/bin/python -m uvicorn mathly2.main:app --port 7861` answers `{"ok": true}` +- [x] 1.2 Add `mathly2/requirements.txt` (and dev requirements) and a `mathly2/tests/` pytest setup; verify `venv/bin/python -m pytest mathly2/tests` runs and passes a health test +- [x] 1.3 Add `clock.py` (server time, Israel calendar day) with tests for a time just before and just after midnight in Asia/Jerusalem; verify the tests pass + +## 2. App shell: Hebrew, right-to-left, phone first + +- [x] 2.1 Serve `static/index.html` (`lang="he"`, `dir="rtl"`), `app.css` with light/dark tokens and a phone-first layout, and `app.js`; verify a Playwright test at 390px width finds `dir="rtl"` and no horizontal scroll +- [x] 2.2 Document how to run the new app locally in `mathly2/README.md`; verify the documented commands start it + +## 3. Exercise bank + +- [x] 3.1 Copy `app/math_algebra9.json` to `mathly2/content/` and add `bank.py`, which loads and checks it (unique ids, one correct choice per question, every `mistake` and `back` id exists, every skill's lesson exists); verify tests pass on the real bank and fail on broken samples +- [x] 3.2 Add `GET /api/lessons` (lessons with their skills, no questions); verify a test returns 24 lessons and 96 skills +- [x] 3.3 Copy `math-tex.js` and its MathJax setup into `mathly2/static/` and show every `$…$` as a formula; verify a Playwright test shows `$x² − 2x − 15$` as a rendered formula +- [x] 3.4 Add `scripts/content_gaps.py` that lists skills without a worked example, faded examples or "why this step?" choices, lessons without a quiz, and skills with too few questions; verify it runs on the bank and lists the skill with no questions + +## 4. Sign-in and classes + +- [x] 4.1 Add the migration `mathly2/supabase/migrations/…_m2_classes.sql` (`m2_classes`, `m2_class_members` with unique email, row-level security on with no anon or authenticated policies); verify a pgserver test applies it and an authenticated-role insert is refused +- [x] 4.2 Add `store.py` (Supabase REST using the secret key) and `InMemoryStore` with the same interface; verify the class tests pass against `InMemoryStore` +- [x] 4.3 Add sign-in: Google through Supabase in the browser, token checked by the server, teachers from `TEACHER_EMAILS`, and the dev email sign-in when Supabase is not set; verify tests for teacher, student and no-token requests +- [x] 4.4 Add the teacher's class endpoints and screen: create a class, list classes, add students by pasted emails, remove a student, with a clear message when a student is already in another class; verify API tests and a Playwright test adding 3 emails +- [x] 4.5 Link a student's account to their class membership on first sign-in, and show the "ask your teacher to add you" message, with their email, when they are in no class; verify tests for both cases +- [x] 4.6 Verify no student content is served before sign-in: a test calls every `/api/` endpoint without a token and gets 401 (except health) + +## 5. Deployment + +- [x] 5.1 Add `mathly2/Dockerfile` (same base as the current one, `uvicorn mathly2.main:app`) and document the settings it needs in `mathly2/README.md`; verify `docker build -f mathly2/Dockerfile .` succeeds and the container answers `/api/health` + +## Workflow follow-up + +- Archive this change once it is deployed and reviewed, so `app-basics`, `exercise-bank` and `accounts-and-classes` move into `openspec/specs/`. diff --git a/openspec/changes/add-class-assignments/.openspec.yaml b/openspec/changes/build-assignments/.openspec.yaml similarity index 50% rename from openspec/changes/add-class-assignments/.openspec.yaml rename to openspec/changes/build-assignments/.openspec.yaml index 4ccb2b41aa2b40f7b35d576c812cbd2fd5b90a2b..e582ee4a2c22919eed558b194fa58fb923e0f359 100644 --- a/openspec/changes/add-class-assignments/.openspec.yaml +++ b/openspec/changes/build-assignments/.openspec.yaml @@ -1,2 +1,2 @@ schema: spec-driven -created: 2026-11-04 +created: 2026-11-07 diff --git a/openspec/changes/build-assignments/proposal.md b/openspec/changes/build-assignments/proposal.md new file mode 100644 index 0000000000000000000000000000000000000000..35bdbaf851f758a97e35ecffaef262b4ba362677 --- /dev/null +++ b/openspec/changes/build-assignments/proposal.md @@ -0,0 +1,24 @@ +# Proposal + +## Why + +Teachers need to give work from the material they already have and check it (see `docs/tasks/prd-mathly.md`, 4.8). Students need to hand in full written solutions. + +## What Changes + +- Teachers create assignments from a file, a camera photo or the drawing board. +- Students hand in their solutions, including on the drawing board. +- Teachers grade from 0 to 100 with a note, or send work back for correction. +- The drawing board is copied from the current app. + +## Capabilities + +### New Capabilities +- `assignments`: creating, handing in and checking assignments. +- `drawing-board`: solving on the board and handing in the board, using the board kept from the current app. + +### Modified Capabilities + +## Impact + +- Builds on `build-foundation`. Adds assignment and submission tables and file storage in `mathly2/`. Copies `math-board.js`, `board-math.js` and `vendor/mathlive/`. diff --git a/openspec/changes/build-assignments/specs/assignments/spec.md b/openspec/changes/build-assignments/specs/assignments/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..5fd472a24844f2cb256477999cf5196886fa5916 --- /dev/null +++ b/openspec/changes/build-assignments/specs/assignments/spec.md @@ -0,0 +1,36 @@ +# Spec Delta + +## Purpose + +Lets the teacher give assignments from a file, a photo or the drawing board, and check what students hand in with a grade and feedback. + +## ADDED Requirements + +### Requirement: Create an assignment +The teacher SHALL be able to create an assignment with a title, a note and a due date, and load its content from a file upload (PDF or images), a photo taken with the device camera, or the drawing board, where what the teacher writes is saved as the assignment's pages. + +#### Scenario: From a PDF +- **WHEN** a teacher creates an assignment and uploads a PDF +- **THEN** students see the assignment with the PDF's pages + +#### Scenario: From the board +- **WHEN** a teacher writes an assignment on the drawing board and saves it +- **THEN** the board is saved as the assignment's page + +### Requirement: Students hand in assignments +Assignments SHALL appear in the student's "המשימות שלי", and the student SHALL be able to hand in their solution, including on the drawing board. + +#### Scenario: Handing in +- **WHEN** a student solves an assignment on the board and hands it in +- **THEN** the teacher sees the submission + +### Requirement: Check assignments +The teacher SHALL be able to open each student's submission and give a grade from 0 to 100 and a note, or send it back for correction. + +#### Scenario: Grading +- **WHEN** a teacher gives a submission 88 with a note +- **THEN** the student sees 88 and the note, and the grade appears on their grades screen + +#### Scenario: Send back +- **WHEN** a teacher sends a submission back for correction +- **THEN** the student can hand in the assignment again diff --git a/openspec/changes/build-assignments/specs/drawing-board/spec.md b/openspec/changes/build-assignments/specs/drawing-board/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..a019dff2fad8ef79ad5ec10c7b87f2941b9f575e --- /dev/null +++ b/openspec/changes/build-assignments/specs/drawing-board/spec.md @@ -0,0 +1,21 @@ +# Spec Delta + +## Purpose + +Lets students write full solutions, and teachers write assignments, on the existing drawing board, and hand in the board as a picture. + +## ADDED Requirements + +### Requirement: Solve on the board +Wherever a question needs a written solution (open questions and assignments), the student SHALL be able to solve it on the drawing board and hand in the board as their answer. + +#### Scenario: Open question +- **WHEN** a student solves an open quiz question on the board and hands it in +- **THEN** the board is saved as a picture and submitted as the answer + +### Requirement: Board is kept from the current app +The drawing board, including typed math on the board and the math keyboard, SHALL be the one kept from the current app rather than rebuilt. + +#### Scenario: Typed math +- **WHEN** a student types math on the board +- **THEN** the board's math keyboard is offered and the math is rendered on the board diff --git a/openspec/changes/add-class-attention-view/.openspec.yaml b/openspec/changes/build-class-progress-views/.openspec.yaml similarity index 50% rename from openspec/changes/add-class-attention-view/.openspec.yaml rename to openspec/changes/build-class-progress-views/.openspec.yaml index 4ccb2b41aa2b40f7b35d576c812cbd2fd5b90a2b..e582ee4a2c22919eed558b194fa58fb923e0f359 100644 --- a/openspec/changes/add-class-attention-view/.openspec.yaml +++ b/openspec/changes/build-class-progress-views/.openspec.yaml @@ -1,2 +1,2 @@ schema: spec-driven -created: 2026-11-04 +created: 2026-11-07 diff --git a/openspec/changes/build-class-progress-views/proposal.md b/openspec/changes/build-class-progress-views/proposal.md new file mode 100644 index 0000000000000000000000000000000000000000..4155e1f66bc69bc1db7f252e77f3704bfda8b52a --- /dev/null +++ b/openspec/changes/build-class-progress-views/proposal.md @@ -0,0 +1,22 @@ +# Proposal + +## Why + +Teachers need a per-student picture of which skills and lessons each student has covered (see `docs/tasks/prd-mathly.md`, 4.8). + +## What Changes + +- A class heat map of skill states per student, readable without relying on color. +- A lesson coverage table: % mastered and best quiz grade per student and lesson. +- Period tabs (Sep–Dec, Jan–Jun), showing states as of the end of each period. + +## Capabilities + +### New Capabilities +- `class-progress-views`: the heat map, lesson coverage and period tabs. + +### Modified Capabilities + +## Impact + +- Builds on `build-skill-learning` (skill states and answer dates) and `build-lesson-quizzes` (best quiz grades). diff --git a/openspec/changes/build-class-progress-views/specs/class-progress-views/spec.md b/openspec/changes/build-class-progress-views/specs/class-progress-views/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..07ef85f1cd9890adc9ca141752b7e42fba91ce2a --- /dev/null +++ b/openspec/changes/build-class-progress-views/specs/class-progress-views/spec.md @@ -0,0 +1,35 @@ +# Spec Delta + +## Purpose + +Gives the teacher a per-student picture of the class: a heat map of skill states and a table of lesson coverage, each by school period. + +## ADDED Requirements + +### Requirement: Class heat map +The teacher SHALL see a heat map with a row per student and a column per skill, grouped by lesson. Each cell SHALL be colored by the skill state and also show a symbol or text, so it does not rely on color alone and reads in light and dark mode. + +#### Scenario: Reading a cell +- **WHEN** a student is "learning" a skill +- **THEN** that cell has the learning color and the learning symbol + +### Requirement: Lesson coverage +The teacher SHALL see a table with a row per student and a column per lesson. Each cell SHALL show the percentage of the lesson's skills the student mastered and their best quiz grade for that lesson. + +#### Scenario: Coverage cell +- **WHEN** a student mastered 3 of 4 skills of a lesson and their best quiz grade is 80 +- **THEN** the cell shows 75% and 80 + +### Requirement: Period tabs +Both views SHALL have period tabs "Sep–Dec" and "Jan–Jun". A period SHALL show the skills or lessons taught in it, with states as they were at the end of the period, or today for the current period. + +#### Scenario: Past period +- **WHEN** in February a teacher opens the "Sep–Dec" tab +- **THEN** it shows the lessons taught September to December, with states as of the end of December + +### Requirement: Works on a computer +The heat map and coverage views SHALL work well on a computer screen as well as on a phone. + +#### Scenario: Wide class +- **WHEN** a teacher opens the heat map of 30 students on a laptop +- **THEN** all rows and the lesson-grouped skill columns can be read and scrolled diff --git a/openspec/changes/add-grok-class-student-management/.openspec.yaml b/openspec/changes/build-lesson-quizzes/.openspec.yaml similarity index 50% rename from openspec/changes/add-grok-class-student-management/.openspec.yaml rename to openspec/changes/build-lesson-quizzes/.openspec.yaml index d58ba023278aa6f86a07634f36bfd9ad72f3f2b3..e582ee4a2c22919eed558b194fa58fb923e0f359 100644 --- a/openspec/changes/add-grok-class-student-management/.openspec.yaml +++ b/openspec/changes/build-lesson-quizzes/.openspec.yaml @@ -1,2 +1,2 @@ schema: spec-driven -created: 2026-10-26 +created: 2026-11-07 diff --git a/openspec/changes/build-lesson-quizzes/proposal.md b/openspec/changes/build-lesson-quizzes/proposal.md new file mode 100644 index 0000000000000000000000000000000000000000..d5cca9c2b805db51cb43c9793fe63f5455a11030 --- /dev/null +++ b/openspec/changes/build-lesson-quizzes/proposal.md @@ -0,0 +1,23 @@ +# Proposal + +## Why + +Each lesson needs a grade that reflects what the student knows now, and a way to improve it (see `docs/tasks/prd-mathly.md`, 4.2). + +## What Changes + +- One retakeable quiz (בוחן) per lesson. Each retake draws new questions, and the best grade is the lesson's grade. +- After a quiz, the skills where points were lost are listed. +- Grades are computed and stored on the server. +- Quizzes are added to the bank for the 20 lessons that lack one. + +## Capabilities + +### New Capabilities +- `lesson-quizzes`: the quiz per lesson, retakes, best grade, and skills to practise. + +### Modified Capabilities + +## Impact + +- Builds on `build-foundation` and `build-skill-learning` (skill states and the path). Adds quiz attempt tables in `mathly2/`. diff --git a/openspec/changes/build-lesson-quizzes/specs/lesson-quizzes/spec.md b/openspec/changes/build-lesson-quizzes/specs/lesson-quizzes/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..828e1166bbc22f6452857304a4d5cf2efbbb8619 --- /dev/null +++ b/openspec/changes/build-lesson-quizzes/specs/lesson-quizzes/spec.md @@ -0,0 +1,42 @@ +# Spec Delta + +## Purpose + +Gives every lesson a retakeable quiz (בוחן) whose best grade is the lesson's grade, and points the student to the skills to practise before retaking it. + +## ADDED Requirements + +### Requirement: Quiz per lesson +Each lesson SHALL have a quiz on that lesson. It SHALL be the only quiz type; there MUST NOT be a one-time summary quiz. + +#### Scenario: Opening a lesson's quiz +- **WHEN** a student opens the quiz of טכניקה אלגברית 1 +- **THEN** its questions are on that lesson's skills + +### Requirement: Retakes draw new questions +The student SHALL be able to retake a quiz any number of times. Each retake SHALL draw new questions. + +#### Scenario: Second attempt +- **WHEN** a student retakes a lesson's quiz +- **THEN** the questions are drawn anew rather than repeating the previous attempt's set + +### Requirement: Best grade is the lesson's grade +The quiz grade that counts SHALL be the student's best grade across attempts, and it SHALL be the lesson's grade. + +#### Scenario: Lower retake +- **WHEN** a student got 85 and then 70 on a lesson's quiz +- **THEN** the lesson's grade is 85 + +### Requirement: Skills to practise after a quiz +After a quiz, the system SHALL list the skills where the student lost points, so they can practise them before retaking. + +#### Scenario: Lost points +- **WHEN** a student loses points on questions of 2 skills +- **THEN** the result lists those 2 skills + +### Requirement: Quiz grades kept on the server +Quiz grades SHALL be computed and stored on the server, so a student cannot change them from the device. + +#### Scenario: Handing in +- **WHEN** a student hands in a quiz +- **THEN** the server computes and stores the grade diff --git a/openspec/changes/build-skill-learning/.openspec.yaml b/openspec/changes/build-skill-learning/.openspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e582ee4a2c22919eed558b194fa58fb923e0f359 --- /dev/null +++ b/openspec/changes/build-skill-learning/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-11-07 diff --git a/openspec/changes/build-skill-learning/design.md b/openspec/changes/build-skill-learning/design.md new file mode 100644 index 0000000000000000000000000000000000000000..ca99be39a840343e61c92777834b500ccbe72ea5 --- /dev/null +++ b/openspec/changes/build-skill-learning/design.md @@ -0,0 +1,199 @@ +# Design + +UI sketch: [static mockup](./mockups/skill-learning.html). It predates decision 4: its faded-example screen shows typed boxes, while the design uses multiple-choice steps. + +## Context + +See proposal.md for why. Current state in `mathly2/` after `build-foundation`: + +- `bank.py` loads and checks `content/math_algebra9.json`. `GET /api/lessons` serves lessons and skills without questions. +- `store.py` has `InMemoryStore` (tests, local development) and `SupabaseStore` (PostgREST, secret key) with the same methods. Tables are `m2_*`, row-level security on, no browser grants. +- `clock.school_day()` gives the calendar day in Asia/Jerusalem. It was built for the mastery rule. +- `static/student.js` only lists lessons. Screens are plain ES modules that render HTML strings into `#app`. + +Facts about the bank that shape this design: + +| Fact | Consequence | +|---|---| +| 96 skills, 1,050 questions, median 10 per skill. `a_30_side` has none. | Enough for "a different question". One skill cannot be practised yet. | +| Questions have no id. Within a skill, no two are fully identical (10 share the same text but differ in figure or choices). | A key must be derived (decision 3). | +| 410 questions have a `figure` (geometry text such as `A=0,2; ... poly A B C D`) and 53 have a `graph` (points and axis ranges), across 48 skills. | Practice must draw them (decision 9). | +| Every wrong choice has a `mistake`. Only 40 of 244 mistakes have a `back` skill. | Feedback can always name the mistake. A "go back to" link is shown only when `back` exists. | +| No skill has `worked_example` or `faded_examples`. `scripts/content_gaps.py` already looks for those two field names. | The new content uses those names (decision 4). Stages without content are skipped (spec). | + +## Goals / Non-Goals + +**Goals:** +- Every rule that counts for mastery is decided on the server from rows it wrote itself: correctness, the date, whether help was opened. +- The whole path works today with the bank as it is. Examples are added skill by skill without code changes. +- One code path for both stores, so every rule is tested on `InMemoryStore` and runs the same on Supabase. + +**Non-Goals:** +- Writing the 96 skills' examples. This change defines their shape, checks them, and ports the drafting tool. Teachers write and approve the content. +- Anti-cheating beyond the server owning the rules. A student can still look answers up elsewhere. +- Quizzes, exercise tests and teacher views. They read the skill states this change produces (later changes). + +## Decisions + +### 1. Two new tables: an answer log and a per-skill progress row + +```mermaid +erDiagram + m2_class_members ||--o{ m2_answers : "user_id" + m2_class_members ||--o{ m2_skill_progress : "user_id" + m2_answers { + bigint id PK + uuid user_id + text skill_id + text question_key + bool correct + bool counted "false when help was opened" + text mistake_id "null when correct" + date day "school_day() at answer time" + timestamptz answered_at "default now()" + } + m2_skill_progress { + uuid user_id PK + text skill_id PK + text stage "example | faded | practice" + int faded_done + text current_key "question being shown" + bool current_helped + timestamptz started_at "first answer of any kind" + timestamptz mastered_at "set once, never cleared" + } +``` + +A view `m2_daily_correct (user_id, day, correct)` counts correct practice answers per day for the goal and streak. + +- `m2_answers` is append-only. It is the evidence for mastery and later for weak skills, quizzes and the heat map. +- `m2_skill_progress` holds what the server must remember between requests: the stage, the question on screen, whether help was opened for it, and `mastered_at`. +- *Alternative:* derive everything from the log on every read. Rejected: the path screen would scan every answer for 96 skills, and "question on screen + help opened" is not an answer at all. + +### 2. Mastery is stored once, when the rule is first met + +After each counted practice answer the server reads the student's last 3 counted answers on that skill. If all 3 are correct and they fall on 2 or more distinct `day` values, it sets `mastered_at` if it is still null. Nothing ever clears it. + +```mermaid +stateDiagram-v2 + [*] --> NotStarted + NotStarted --> Learning: first answer of any kind + Learning --> Learning: answer, rule not met + Learning --> Mastered: last 3 counted answers correct, on 2+ days + Mastered --> Mastered: any later answer +``` + +- State is derived from the progress row: no row or no `started_at` means not started; `mastered_at` set means mastered; anything else means learning. +- "First answer of any kind" includes "why this step?" and faded steps, so a student working through the example sees "learning". Only practice answers count for mastery. +- "Counted" means no help was opened for that question. Uncounted answers are skipped: they neither extend nor break the run (spec: Help between correct answers). +- *Alternative:* recompute mastery on every read. Rejected: mastery must never decay, and a stored timestamp also gives the collection screen and the later period views "mastered as of a date" for free. + +### 3. Question key = skill id + hash of the question + +`question_key = f"{skill_id}:{sha1(canonical JSON of the question)[:10]}"`. + +- Stable when questions are reordered or added. Editing a question gives it a new key, which is right: it is a different question. +- `check_bank` rejects two questions with the same key in one skill. +- *Alternative:* skill id + index. Rejected: inserting a question would silently re-key every answer after it. + +### 4. Shape of worked and faded examples, with multiple-choice steps + +```json +"worked_example": { + "question": "$x^2 + 5x + 6$", + "steps": [ + {"do": "two numbers: product 6, sum 5 -> 2 and 3", + "why": [{"text": "...", "correct": true}, {"text": "..."}, {"text": "..."}]} + ], + "answer": "$(x+2)(x+3)$" +}, +"faded_examples": [ + {"question": "...", + "steps": [{"do": "...", "choices": [{"text": "...", "correct": true}, {"text": "...", "mistake": "sign_mid"}]}], + "answer": "..."} +] +``` + +- A missing faded step is filled in by choosing among options. A wrong option names its mistake, reusing the bank's `mistakes`. *Alternative:* typed math. Rejected for now: it needs a math answer checker, and the spec only requires that the student fill the step and get feedback. +- Each skill has **2 faded examples**: the first hides its last step, the second its last 2 steps. Fading goes backwards, so the student first finishes a solution and then starts one. Backward fading is the variant with the stronger research support. A faded example therefore needs at least 2 steps, and the second needs one step more than it hides, so the student never faces an empty solution. +- `check_bank` checks the shape when present: exactly 2 faded examples, the first with at least 2 steps and the second with at least 3, exactly one correct `why` and one correct choice per step, mistake ids exist. + +### 5. Teaching stages are checked in the browser; practice on the server + +```mermaid +flowchart LR + open[Open skill] --> hasW{worked_example?} + hasW -- yes --> W[1 Worked example] + hasW -- no --> hasF + W --> hasF{faded_examples?} + hasF -- yes --> F[2 Faded examples] + hasF -- no --> P + F --> P[3 Practice] + P -- wrong --> FB[4 Mistake name + tip] --> P + P -- correct --> M{mastery rule?} + M -- met --> done[Mastered] + M -- not yet --> P +``` + +- Worked and faded examples are sent whole, including which choice is right, and checked in the browser for instant feedback. They are teaching material and do not count for mastery. The browser reports progress (`stage done`, `faded k done`) so the server can resume and mark the skill as started. +- Practice questions are sent **without** `correct` or `mistake`. Choices carry their original index, and the browser may shuffle them for display. The server grades by index. + +### 6. Practice API and one answer, end to end + +| Endpoint | Purpose | +|---|---| +| `GET /api/path` | All lessons and skills with state, today's correct count and the streak | +| `GET /api/skills/{id}` | Stage, worked and faded examples (if any), and the current practice question | +| `POST /api/skills/{id}/stage` | Browser reports a finished stage or faded example | +| `POST /api/skills/{id}/help` | Marks the question on screen as helped | +| `POST /api/skills/{id}/answer` | `{question_key, choice}` -> result, feedback, next question, new state | +| `GET /api/collection` | Mastered skills and completed lessons | + +```mermaid +sequenceDiagram + participant B as Browser + participant S as Server + participant DB as Store + B->>S: POST /api/skills/t_ext/answer {question_key, choice} + S->>DB: progress(user, skill) + S->>S: reject if question_key != current_key (stale tab) + S->>S: grade from bank, day = school_day() + S->>DB: insert m2_answers (counted = not current_helped) + S->>DB: last 3 counted answers + S->>S: mastery rule -> maybe set mastered_at + S->>S: pick next question (decision 7) + S->>DB: update progress (current_key, current_helped=false, mastered_at) + S-->>B: correct?, mistake {name, tip, back}, next question, state +``` + +- The answer must match `current_key`, so a second tab or a replayed request cannot answer a question that is not on screen. +- On a wrong answer the response has the mistake's name and tip and never the correct choice. + +### 7. Next question: least seen, never the one just answered + +Pick at random among the skill's questions with the fewest past answers by this student, excluding the question just answered. With about 10 questions per skill, a student meets every question before any repeats. A skill with one question repeats it, and a skill with none shows "no practice yet" and cannot be mastered. + +### 8. Daily goal and streak from the view + +Today's goal = correct practice answers on `school_day()`. The streak = consecutive days with at least 5, ending today, or ending yesterday when today is not yet at 5, so the streak is not shown as lost in the morning. Helped answers count toward the goal: it measures effort, not mastery. + +### 9. Draw figures and graphs by porting the old renderer + +Copy the `figure` (geometry) and `plot` (graph) drawing functions from the old `static/math.js` into `mathly2/static/figures.js`, with a Playwright check that one of each draws. This follows the precedent of `math-tex.js` in build-foundation: it is part of showing the exercise bank, not the old app's behaviour. *Alternative:* skip figure questions. Rejected: that removes most practice from 48 skills. + +### 10. Drafting tool ported, not run + +`scripts/draft_examples.py` moves to `mathly2/scripts/` and is changed to produce the decision 4 shape (multiple-choice `why`, faded examples with choices). Its review-file flow (draft -> teacher approves -> merge) stays. Running it spends API money and needs a teacher, so it is a tool in this change, not a task. + +## Risks / Trade-offs + +- [Teaching-stage answers are checked in the browser, so a student can see the right "why" choice in the network tab] -> Accepted: they do not count for anything, and instant feedback matters more there. +- [Help is reported by the browser through `/help`. A modified client could skip the call and get a "counted" answer] -> Accepted for now: the student would also need 3 correct on 2 days. The same holds for any client-side app, and the alternative (serving help only from the server) is what `/help` already does for the honest client. +- [Editing a question gives it a new key, so its old answers stop matching it] -> Intended. Mastery and the log are by skill, so nothing is lost. +- [Students mastering one skill with 0 or 1 question] -> `a_30_side` cannot be mastered until it gets questions. `content_gaps.py` already lists it. +- [The ported figure renderer drags old-app code in] -> Copy only the two drawing functions and what they need, with their own tests. + +## Migration Plan + +- One additive migration: `m2_answers`, `m2_skill_progress`, the `m2_daily_correct` view. Row-level security on, no browser grants, as in `m2_classes`. Rollback: drop the three objects. Nothing else reads them yet. +- The bank file gains optional fields only, so the current bank still loads. diff --git a/openspec/changes/build-skill-learning/mockups/skill-learning.html b/openspec/changes/build-skill-learning/mockups/skill-learning.html new file mode 100644 index 0000000000000000000000000000000000000000..f86648cc968ff4eb0fd9930c3cc8061368553eda --- /dev/null +++ b/openspec/changes/build-skill-learning/mockups/skill-learning.html @@ -0,0 +1,189 @@ + + + + + +Mathly - skill learning mockup + + + +
+

Mathly - skill learning (static mockup)

+

Illustrates the draft specs in openspec/changes/build-skill-learning. Not the real app: fixed sample data, no server.

+
+ + +
+ + +
+

המסלול שלי

+

כל השיעורים פתוחים, בכל סדר

+
+
יעד יומי: 3 מתוך 5
+
🔥 רצף: 4 ימים
+
+
טכניקה אלגברית 1
+ + + +
משוואות ריבועיות
+ +

Every skill shows state as text + symbol, not colour alone.

+
+ + +
+

פירוק טרינום

+
1 דוגמה2 השלמה3 תרגול
+
x² + 5x + 6 = ?
+
שלב 1Find two numbers: product 6, sum 5 → 2 and 3
+

למה עושים את השלב הזה?

+ + + +
+

The next step appears only after "why this step?" is answered.

+
+ + +
+

פירוק טרינום

+
1 דוגמה2 השלמה3 תרגול
+

דוגמה 2 מתוך 3 - חסרים 2 שלבים

+
x² + 7x + 12
+
Step 1: product 12, sum 7 → 3 and 4 ✓
+
Step 2: ( x + __ )( x + __ ) +
+
+
Step 3: ____
+
+

Help fades: example 1 = 1 gap, example 2 = 2 gaps, ...

+
+ + +
+

חוק הפילוג המורחב

+
1 דוגמה2 השלמה3 תרגול
+
(x + 3)(x − 5) = ?
+ + + + +
+
+ + +
+
נכונות ברצף:  (ביום אחר יהפוך לנשלטה)
+

Wrong answers name the mistake (from the bank) and never reveal the correct one.

+
+ + +
+

האוסף שלי

+

מה השגתי

+
מיומנויות שנשלטו (1)
+
✓ חוק הפילוג המורחב
+
שיעורים שהושלמו (0)
+
עדיין אין - נשלוט בכל מיומנויות השיעור
+
+ +
+ + + + diff --git a/openspec/changes/build-skill-learning/proposal.md b/openspec/changes/build-skill-learning/proposal.md new file mode 100644 index 0000000000000000000000000000000000000000..212331e5e5eb7fa26fafadcf0377f75989b28ca4 --- /dev/null +++ b/openspec/changes/build-skill-learning/proposal.md @@ -0,0 +1,27 @@ +# Proposal + +## Why + +Students often finish a topic without mastering it (see `docs/tasks/prd-mathly.md`). The path teaches each skill step by step and proves mastery instead of assuming it. + +## What Changes + +- Each skill teaches in four stages: a worked example with "why this step?", faded examples, practice, and feedback that names the mistake and gives a similar question. +- Mastery: 3 correct in a row, first try, no help, over 2 calendar days, checked on the server. Mastery never decays. +- A path screen with every lesson open, a daily goal and streak, and a collection screen. +- Worked examples, faded examples and "why this step?" choices are added to the bank, skill by skill. A stage with no content is skipped, so every skill works through practice from day one. + +UI sketch: [static mockup](./mockups/skill-learning.html) (path, worked example, faded example, practice, collection). + +## Capabilities + +### New Capabilities +- `skill-learning`: the four stages of learning a skill. +- `skill-mastery`: the mastery rule and skill states. +- `learning-path`: lessons open in any order, the path screen, daily goal and streak, collection. + +### Modified Capabilities + +## Impact + +- Builds on `build-foundation`. Adds answer storage (`m2_` tables) and student screens in `mathly2/`. diff --git a/openspec/changes/build-skill-learning/specs/learning-path/spec.md b/openspec/changes/build-skill-learning/specs/learning-path/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..45e8cf0c2b12751e8fdbff321373c3ab9b96f518 --- /dev/null +++ b/openspec/changes/build-skill-learning/specs/learning-path/spec.md @@ -0,0 +1,39 @@ +# Spec Delta + +## Purpose + +Gives the student a self-paced path through every lesson (שיעור) and skill, open in any order, with a daily goal and streak and a collection of what they achieved. + +## ADDED Requirements + +### Requirement: All lessons open +The student SHALL be able to open any lesson, and any skill inside it, at any time and in any order. Lessons MUST NOT be locked, and the app MUST NOT force an order. + +#### Scenario: Jumping ahead +- **WHEN** a student who has not started the first lesson opens a skill in a later lesson +- **THEN** the skill opens at its first stage + +### Requirement: Path screen +The path screen SHALL list all lessons and their skills, each skill showing its state (not started, learning or mastered). Mastered skills SHALL look clearly different from learning and not-started ones. + +#### Scenario: Viewing the path +- **WHEN** a student opens the path +- **THEN** every lesson is listed with its skills, and each skill shows its state + +### Requirement: Daily goal and streak +A day with 5 correct answers SHALL count toward the student's streak. The path SHALL show the day's progress toward 5 and the current streak. + +#### Scenario: Goal reached +- **WHEN** a student answers a fifth question correctly today +- **THEN** today's goal is shown as reached and the streak counts today + +#### Scenario: Goal missed +- **WHEN** a student has 3 correct answers today +- **THEN** today's goal shows 3 of 5 and today does not yet count toward the streak + +### Requirement: Collection screen +The student SHALL have a collection screen that shows each skill they mastered and each lesson they completed. + +#### Scenario: New mastery +- **WHEN** a student masters a skill +- **THEN** the skill appears on their collection screen diff --git a/openspec/changes/build-skill-learning/specs/skill-learning/spec.md b/openspec/changes/build-skill-learning/specs/skill-learning/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..b591cf1ac010126b9755dce4e7a3037d8d000196 --- /dev/null +++ b/openspec/changes/build-skill-learning/specs/skill-learning/spec.md @@ -0,0 +1,57 @@ +# Spec Delta + +## Purpose + +Teaches each skill (מיומנות) through four stages in a fixed order: a worked example, faded examples, practice, and feedback that names the student's mistake, so the student learns to solve alone. + +## ADDED Requirements + +### Requirement: Worked example with "why this step?" +The system SHALL start a skill with a fully solved example shown one step at a time. After each step, the system SHALL ask the student "why this step?" as a multiple-choice question before revealing the next step. + +#### Scenario: Stepping through the example +- **WHEN** a student opens the worked example of פירוק טרינום and sees its first step +- **THEN** a "why this step?" multiple-choice question is shown, and the second step appears only after the student answers it + +### Requirement: Faded examples +After the worked example, the system SHALL show solved examples with steps removed: first one step missing, then two, and so on. The student SHALL fill in each missing step. A wrong step SHALL get immediate feedback on the mistake. + +#### Scenario: Help fades +- **WHEN** the student finishes the faded example with one missing step +- **THEN** the next faded example has two missing steps + +#### Scenario: Wrong step +- **WHEN** the student fills in a missing step wrongly +- **THEN** feedback on the mistake is shown right away + +### Requirement: Stages without content are skipped +The system SHALL skip a stage for a skill whose bank entry has no content for it: no worked example skips stage 1, and no faded examples skips stage 2. A skill MUST always be learnable through practice, so a missing example MUST NOT block it. + +#### Scenario: Skill with no examples +- **WHEN** a student opens a skill that has no worked example and no faded examples +- **THEN** the skill opens directly at the practice stage + +#### Scenario: Worked example but no faded examples +- **WHEN** a student finishes the worked example of a skill that has no faded examples +- **THEN** the skill moves to the practice stage + +### Requirement: Practice from the exercise bank +After the faded examples, the system SHALL give the student practice questions on the skill, taken from the exercise bank. + +#### Scenario: Practice questions +- **WHEN** the student reaches the practice stage of a skill +- **THEN** the questions shown are exercise-bank questions of that skill + +### Requirement: Feedback names the mistake +After a wrong answer in practice, the system SHALL show the name and tip of the mistake attached to the chosen wrong answer in the exercise bank. It MUST NOT reveal the correct answer. + +#### Scenario: Wrong choice with a mistake +- **WHEN** a student picks a wrong choice tagged with the mistake "טעות סימן באיבר האמצעי" +- **THEN** the mistake's name and tip are shown, and the correct choice is not marked + +### Requirement: Similar question after a mistake +After a wrong answer in practice, the system SHALL give the student a similar question: the same skill, a different question. It MUST NOT give the same question again. + +#### Scenario: Next question after a mistake +- **WHEN** a student answers a practice question wrongly +- **THEN** the next question is on the same skill and is not the question just answered diff --git a/openspec/changes/build-skill-learning/specs/skill-mastery/spec.md b/openspec/changes/build-skill-learning/specs/skill-mastery/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..4896faa5d0a6f7d851a449692a86810b3e332cfd --- /dev/null +++ b/openspec/changes/build-skill-learning/specs/skill-mastery/spec.md @@ -0,0 +1,51 @@ +# Spec Delta + +## Purpose + +Defines when a skill counts as mastered and the state every skill is in for every student, so mastery is proven rather than assumed and stays once earned. + +## ADDED Requirements + +### Requirement: Mastery rule +A skill SHALL become mastered when the student answers 3 questions on it correctly in a row, each on the first try, without opening help or the worked example, and these answers are spread over at least 2 different calendar days. + +#### Scenario: Mastered over two days +- **WHEN** a student answers 2 questions of a skill correctly on Monday and a third correctly on Tuesday, all first try and without help +- **THEN** the skill becomes mastered + +#### Scenario: All on one day +- **WHEN** a student answers 3 questions of a skill correctly in a row on the same day +- **THEN** the skill is not yet mastered + +#### Scenario: Help opened +- **WHEN** a student opens help or the worked example before answering a question +- **THEN** that answer is skipped for mastery: it neither counts toward the run nor breaks it + +#### Scenario: Help between correct answers +- **WHEN** a student answers 2 questions correctly without help on Monday, answers a third with help, and answers a fourth correctly without help on Tuesday +- **THEN** the skill becomes mastered, since the run of counted answers is the Monday, Monday and Tuesday ones + +#### Scenario: Streak broken +- **WHEN** a student answers 2 correctly, then 1 wrongly, then 1 correctly +- **THEN** the run of correct answers in a row restarts from the last correct answer + +### Requirement: Skill states +Every skill, for every student, SHALL be in exactly one state: "not started" (no answers yet), "learning" (at least one answer, not yet mastered) or "mastered" (met the mastery rule). + +#### Scenario: First answer +- **WHEN** a student answers the first question of a skill +- **THEN** the skill moves from "not started" to "learning" + +### Requirement: Mastery does not decay +A mastered skill SHALL stay mastered. It MUST NOT fade, decay or require re-mastering over time, even after later wrong answers. + +#### Scenario: Months later +- **WHEN** a student mastered a skill in October and answers a question on it wrongly in March +- **THEN** the skill is still mastered + +### Requirement: Mastery is checked on the server +The server SHALL store the date of each answer and decide mastery from it, so the "2 different days" rule cannot be changed from the device. + +#### Scenario: Device clock changed +- **WHEN** a student changes the device date before answering +- **THEN** the answer is dated by the server, and mastery uses that date diff --git a/openspec/changes/build-skill-learning/tasks.md b/openspec/changes/build-skill-learning/tasks.md new file mode 100644 index 0000000000000000000000000000000000000000..2a849ee0d0af4a64b308d7a05848285152c58082 --- /dev/null +++ b/openspec/changes/build-skill-learning/tasks.md @@ -0,0 +1,53 @@ +# Tasks + +## 1. Bank: question keys and example content + +- [ ] 1.1 Add `question_key(skill_id, question)` to `bank.py` (design decision 3) and make `check_bank` reject two questions with the same key in a skill; verify tests pass on the real bank and fail on a sample with a duplicated question +- [ ] 1.2 Add checks for the optional `worked_example` and `faded_examples` shapes (decision 4: exactly 2 faded examples with at least 2 and 3 steps, one correct `why` and one correct choice per step, mistake ids exist); verify tests pass on a valid sample and fail on each broken case, and the real bank (with no examples) still loads +- [ ] 1.3 Add `Bank` helpers for practice: a question for the browser without `correct` or `mistake` (choices keep their original index), grading a choice index, and a mistake's name, tip and `back`; verify unit tests, including that a served question has no `correct` field anywhere +- [ ] 1.4 Update `scripts/content_gaps.py` to the decision 4 shape (a step without `why` choices, a faded step without choices); verify its test still lists `a_30_side` and flags a sample step without choices + +## 2. Storage + +- [ ] 2.1 Add the migration `mathly2/supabase/migrations/…_m2_skill_learning.sql` with `m2_answers`, `m2_skill_progress` and the `m2_daily_correct` view (decision 1), row-level security on and no browser grants; verify a pgserver test applies it, the view counts only correct practice answers per day, and an authenticated-role insert is refused +- [ ] 2.2 Add the progress and answer methods to `InMemoryStore` (get or create progress, update progress, insert answer, last N counted answers, answer counts per question, daily correct counts, progress rows of a user); verify unit tests for each method +- [ ] 2.3 Add the same methods to `SupabaseStore`; verify `test_store.py`-style tests against the faked PostgREST pass with the same cases as 2.2 + +## 3. Rules: mastery, next question, goal and streak + +- [ ] 3.1 Add `learning.py` with the mastery rule over counted answers (decision 2); verify a test for every scenario in `specs/skill-mastery/spec.md`: two days, one day, help opened, help between correct answers, streak broken, months later still mastered +- [ ] 3.2 Add the skill state from a progress row (not started, learning, mastered); verify tests that a "why this step?" answer moves a skill to learning and only practice answers can master it +- [ ] 3.3 Add next-question picking (decision 7): fewest past answers, never the one just answered; verify tests with 10 questions (no repeat before all are seen), 1 question (repeats) and 0 questions (none) +- [ ] 3.4 Add today's goal and the streak from daily counts (decision 8), using `clock.school_day()`; verify tests for 3 of 5, reaching 5, a streak kept overnight before today's 5, and a broken streak + +## 4. Practice API + +- [ ] 4.1 Add `GET /api/skills/{id}` (stage, examples if any, current question) and `POST /api/skills/{id}/stage`; verify tests that a skill with no examples opens at practice, a skill with a worked example but no faded examples moves to practice after it (spec: Stages without content are skipped), and any skill opens in any order (spec: Jumping ahead) +- [ ] 4.2 Add `POST /api/skills/{id}/answer` per the decision 6 sequence; verify tests that the server dates the answer (spec: Device clock changed), a wrong answer returns the mistake's name and tip but not the correct choice, the next question differs from the one answered, and an answer for a question not on screen is refused +- [ ] 4.3 Add `POST /api/skills/{id}/help`; verify a test that the next answer is stored with `counted = false` and does not break a run +- [ ] 4.4 Add `GET /api/path` and `GET /api/collection`; verify tests for states, today's goal, the streak, mastered skills, and a lesson counted as completed only when all its skills are mastered +- [ ] 4.5 Extend the "no content before sign-in" test to the new endpoints, and refuse a student with no class (403) as `/api/lessons` does; verify the test passes + +## 5. Student screens + +- [ ] 5.1 Port the `figure` and `plot` drawing functions from the old `static/math.js` into `mathly2/static/figures.js` (decision 9); verify a Playwright test draws one bank question with a `figure` and one with a `graph` +- [ ] 5.2 Replace the lesson list in `student.js` with the path screen: every lesson and skill with its state as text and symbol, today's goal and the streak; verify a Playwright test at 390px shows all 24 lessons, a mastered skill's label, and no horizontal scroll +- [ ] 5.3 Add the worked-example screen: one step at a time, the next step only after "why this step?" is answered; verify a Playwright test against a test bank with one worked example +- [ ] 5.4 Add the faded-example screen with backward fading and mistake feedback on a wrong step; verify a Playwright test that example 1 hides one step, example 2 hides two, and a wrong choice shows its mistake +- [ ] 5.5 Add the practice screen: choices, help, mistake feedback with a "similar question" button and a "go back to" link when the mistake has `back`, and the run of correct answers; verify a Playwright test that answers wrongly, sees the mistake name, and gets a different question +- [ ] 5.6 Add the collection screen; verify a Playwright test that a skill mastered through the API appears on it + +## 6. Drafting tool + +- [ ] 6.1 Port `scripts/draft_examples.py` to `mathly2/scripts/draft_examples.py`, producing the decision 4 shape (one worked example and 2 faded examples per skill) and merging only approved drafts through `check_bank`; verify tests with a faked AI client for draft, a rejected draft, and merge, and `--dry-run` sends nothing +- [ ] 6.2 Document the draft -> teacher approves -> merge flow in `mathly2/README.md`; verify the documented `--dry-run` command runs as written + +## 7. Integration + +- [ ] 7.1 Walk one skill end to end in a browser test: open from the path, answer 2 correctly, move the server clock to the next day, answer 1 more, and see the skill as mastered on the path and in the collection; verify the test passes +- [ ] 7.2 Run the whole suite `venv/bin/python -m pytest mathly2/tests` and `openspec validate build-skill-learning`; verify both pass + +## Workflow follow-up + +- Write worked and faded examples for a first lesson with the drafting tool and have a teacher approve them (content work, outside this change). +- Archive this change once it is deployed and reviewed, so `skill-learning`, `skill-mastery` and `learning-path` move into `openspec/specs/`. diff --git a/openspec/changes/build-test-prep/.openspec.yaml b/openspec/changes/build-test-prep/.openspec.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e582ee4a2c22919eed558b194fa58fb923e0f359 --- /dev/null +++ b/openspec/changes/build-test-prep/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-11-07 diff --git a/openspec/changes/build-test-prep/proposal.md b/openspec/changes/build-test-prep/proposal.md new file mode 100644 index 0000000000000000000000000000000000000000..d1bb6faf3a1cae41baec8a185136baf07a535605 --- /dev/null +++ b/openspec/changes/build-test-prep/proposal.md @@ -0,0 +1,28 @@ +# Proposal + +## Why + +Students arrive at the real test without having practised mixed, timed questions or knowing their gaps (see `docs/tasks/prd-mathly.md`, 4.3–4.7). + +## What Changes + +- The teacher sets a real test (date, lessons, number of questions, time limit) and sees who took the simulation. +- The student gets a countdown plan, two retakeable exercise tests weighted toward weak skills, and one required simulation with a timer kept on the server. +- A readiness meter for the student and the teacher. +- The student's home (assignments, test reminder with today's task, continue the path) and the grades screen. + +## Capabilities + +### New Capabilities +- `real-tests`: setting a test and the tests tab. +- `test-countdown`: the plan by days left and today's task. +- `exercise-tests`: two exercise tests with a weak-skill question mix. +- `simulation-test`: the one-time simulation with a window and a server timer. +- `readiness-meter`: readiness per upcoming test. +- `student-screens`: the student's home and grades screen. + +### Modified Capabilities + +## Impact + +- Builds on `build-foundation`, `build-skill-learning`, `build-lesson-quizzes` and `build-assignments` (home and grades show their items). diff --git a/openspec/changes/build-test-prep/specs/exercise-tests/spec.md b/openspec/changes/build-test-prep/specs/exercise-tests/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..4a838c3b10f2f2acf40be09a38d72cab9b0153c2 --- /dev/null +++ b/openspec/changes/build-test-prep/specs/exercise-tests/spec.md @@ -0,0 +1,60 @@ +# Spec Delta + +## Purpose + +Gives each student two retakeable, timed, mixed exercise tests (מבחן תרגול) before a real test, weighted toward their weak skills, so the real test does not surprise them. + +## ADDED Requirements + +### Requirement: Two exercise tests per test +When the teacher sets a test, the system SHALL create 2 exercise tests for every student in the class and place them on the student's countdown. + +#### Scenario: Test set +- **WHEN** a teacher sets a test for a class of 25 +- **THEN** each of the 25 students has exercise test 1 and exercise test 2 on their countdown + +### Requirement: Teacher can assign an exercise test +The teacher SHALL be able to send an exercise test to the whole class as an assignment. + +#### Scenario: Assigning +- **WHEN** a teacher sends exercise test 1 to the class +- **THEN** every student in the class sees it among their assignments + +### Requirement: Retakes and best grade +The student SHALL be able to start or retake an exercise test at any time. Each retake SHALL draw new questions, and the best grade SHALL count. + +#### Scenario: Retake +- **WHEN** a student got 60 and then 75 on exercise test 1 +- **THEN** exercise test 1's grade is 75, and the second attempt had new questions + +### Requirement: Built like the real test +An exercise test SHALL have the real test's number of questions and time limit, mix questions from all covered lessons, not show skill names, and give feedback only at the end. + +#### Scenario: Taking the test +- **WHEN** a student takes an exercise test for a test of 12 questions and 90 minutes +- **THEN** it has 12 questions from the covered lessons, a 90-minute limit, no skill names, and no feedback until handed in + +### Requirement: Question mix by weak skills +Exercise test 1 SHALL draw 60% of its questions from weak skills and 40% from other covered skills; exercise test 2, 30% and 70%. A weak skill is one in the "learning" state or answered wrongly in a previous exercise test. With too few weak skills, the rest SHALL come from other covered skills. + +#### Scenario: Test 1 mix +- **WHEN** a student with enough weak skills opens exercise test 1 of 10 questions +- **THEN** 6 questions are on weak skills and 4 on other covered skills + +#### Scenario: Few weak skills +- **WHEN** a student has only enough weak-skill questions for 2 of the 6 weak slots +- **THEN** the other slots are filled from other covered skills + +### Requirement: Skills not started are left out +Skills in the "not started" state MUST NOT appear in an exercise test. The exercise test card SHALL list them as "practice these first". + +#### Scenario: Not started skill +- **WHEN** a covered skill is "not started" for the student +- **THEN** no question on it appears, and the card lists it under "practice these first" + +### Requirement: Result links back to the path +After an exercise test, the system SHALL show the weak skills it found and link each to its place in the path. The grade SHALL be computed and stored on the server. + +#### Scenario: Result +- **WHEN** a student hands in an exercise test with mistakes on 3 skills +- **THEN** the result lists those skills, each opening its place in the path diff --git a/openspec/changes/build-test-prep/specs/readiness-meter/spec.md b/openspec/changes/build-test-prep/specs/readiness-meter/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..b6e3579d61535ae3abab99f8d019a92fd759e662 --- /dev/null +++ b/openspec/changes/build-test-prep/specs/readiness-meter/spec.md @@ -0,0 +1,18 @@ +# Spec Delta + +## Purpose + +Shows the student and the teacher how ready the student is for each upcoming test, from mastered skills, exercise test grades and the simulation grade. + +## ADDED Requirements + +### Requirement: Readiness meter +For each upcoming test, the system SHALL show a readiness meter made of the percentage of covered skills that are mastered, the best grade of each exercise test, and the simulation grade once taken. Both the student and the teacher SHALL see it. + +#### Scenario: Before the simulation +- **WHEN** a student mastered 15 of 20 covered skills and has best grades 70 and 80 on the exercise tests +- **THEN** the meter shows 75% mastered, 70 and 80, and no simulation grade + +#### Scenario: Teacher view +- **WHEN** the teacher looks at the student's readiness for that test +- **THEN** the same meter is shown diff --git a/openspec/changes/build-test-prep/specs/real-tests/spec.md b/openspec/changes/build-test-prep/specs/real-tests/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..4d00302b4c82817a59a6f0b9e8c56a1050f6796c --- /dev/null +++ b/openspec/changes/build-test-prep/specs/real-tests/spec.md @@ -0,0 +1,32 @@ +# Spec Delta + +## Purpose + +Lets the teacher put a real school test (מבחן) in the app, with its date, covered lessons, number of questions and time limit, so the app can prepare students for it. + +## ADDED Requirements + +### Requirement: Teacher sets a test +The teacher SHALL be able to set a test with a date, the lessons it covers, an optional note, the number of questions and the time limit. The number of questions SHALL default to 12 and the time limit to 90 minutes, and the teacher SHALL be able to change both. + +#### Scenario: Defaults +- **WHEN** a teacher sets a test without changing the question count or time limit +- **THEN** the test has 12 questions and 90 minutes + +#### Scenario: Custom limits +- **WHEN** a teacher sets a test with 10 questions and 45 minutes +- **THEN** the test is saved with 10 questions and 45 minutes + +### Requirement: Tests tab +The teacher SHALL have a tests tab to set tests and see, for each test, which students have taken its simulation test and which have not. + +#### Scenario: Simulation status +- **WHEN** a teacher opens a test in the tests tab and 20 of 25 students took the simulation +- **THEN** the 20 are shown as taken and the 5 as not taken + +### Requirement: Real test grades are not handled +The app MUST NOT grade the real school test or import its grades. + +#### Scenario: After the test date +- **WHEN** a test's date has passed +- **THEN** the app offers no way to enter or import grades for it diff --git a/openspec/changes/build-test-prep/specs/simulation-test/spec.md b/openspec/changes/build-test-prep/specs/simulation-test/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..ea5106028bc3a2d8e5d02ddef3aff1f410013ac5 --- /dev/null +++ b/openspec/changes/build-test-prep/specs/simulation-test/spec.md @@ -0,0 +1,46 @@ +# Spec Delta + +## Purpose + +Gives each student one required, one-time full simulation (מבחן סימולציה) of the real test, so they know where they stand while there is still time to fix gaps. + +## ADDED Requirements + +### Requirement: One required attempt +Every student SHALL take one simulation test per real test. It SHALL be possible to take it only once. + +#### Scenario: Second try +- **WHEN** a student who handed in the simulation opens it again +- **THEN** they see their result and cannot start another attempt + +### Requirement: Built like the real test +The simulation SHALL cover all lessons of the real test, with the real test's number of questions and time limit, no skill names, and no feedback until the end. + +#### Scenario: Taking the simulation +- **WHEN** a student starts the simulation of a test with 12 questions and 90 minutes +- **THEN** it has 12 questions from all covered lessons, a 90-minute limit, no skill names and no feedback until handed in + +### Requirement: Window and home reminder +The simulation SHALL become available about 5 days before the test and stay available until the test day. Until taken, it SHALL be shown as required on the student's home screen. + +#### Scenario: Too early +- **WHEN** the test is 8 days away +- **THEN** the simulation cannot be started yet + +#### Scenario: Required on home +- **WHEN** the test is 4 days away and the student has not taken the simulation +- **THEN** home shows the simulation as required + +### Requirement: Timer kept on the server +The simulation's timer SHALL be kept on the server, so refreshing or closing the app does not reset it. The grade SHALL be computed and stored on the server. + +#### Scenario: Refresh mid-test +- **WHEN** a student refreshes the app 30 minutes into a 90-minute simulation +- **THEN** the timer shows about 60 minutes left + +### Requirement: Failed skills become review tasks +After the simulation, the system SHALL list the skills that failed and make them the review tasks of the plan's last days. + +#### Scenario: Review tasks +- **WHEN** a student hands in the simulation with 3 failed skills +- **THEN** the result lists them, and the countdown's last days ask to review those 3 skills diff --git a/openspec/changes/build-test-prep/specs/student-screens/spec.md b/openspec/changes/build-test-prep/specs/student-screens/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..20a3e2395061facb22307cb539c1300f0e26bd84 --- /dev/null +++ b/openspec/changes/build-test-prep/specs/student-screens/spec.md @@ -0,0 +1,32 @@ +# Spec Delta + +## Purpose + +Defines the student's main screens: home with assignments, the test reminder and a way back to the path, and a grades screen with every grade that counts. + +## ADDED Requirements + +### Requirement: Student home +The student's home SHALL show their assignments from the teacher ("המשימות שלי"), the reminder for the nearest test (days left, readiness meter and today's task), and a way to continue the path. + +#### Scenario: Assignment and test +- **WHEN** a student has an open assignment and a test in 6 days +- **THEN** home shows the assignment, the test reminder with today's task, and continue the path + +#### Scenario: Nothing scheduled +- **WHEN** a student has no assignments and no upcoming test +- **THEN** home still offers to continue the path + +### Requirement: Grades screen +The student SHALL have a grades screen listing every lesson quiz (best grade), every exercise test (best grade), every simulation grade and every assignment grade. + +#### Scenario: Quiz retaken +- **WHEN** a student got 70 and then 90 on a lesson's quiz +- **THEN** the grades screen shows 90 for that quiz + +### Requirement: No student-to-student features +The app MUST NOT offer student-to-student features such as chat or leaderboards, and MUST NOT show a student other students' results. + +#### Scenario: Grades screen +- **WHEN** a student opens their grades +- **THEN** no other student's grade or rank is shown diff --git a/openspec/changes/build-test-prep/specs/test-countdown/spec.md b/openspec/changes/build-test-prep/specs/test-countdown/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..d1cf2c7dba37884c90ce87c75e6e02a0b47745bc --- /dev/null +++ b/openspec/changes/build-test-prep/specs/test-countdown/spec.md @@ -0,0 +1,35 @@ +# Spec Delta + +## Purpose + +Plans the student's last days before a real test: finish the path, take two exercise tests, take the simulation, then review what failed, with one clear task for today. + +## ADDED Requirements + +### Requirement: Countdown plan +Once a test is set, the student SHALL see a plan based on days left: until ~9 days, finish the path for every covered lesson; ~9, exercise test 1; ~7, exercise test 2; ~5, the required simulation test; 4 to 1, review the skills that failed in the simulation, with light mixed review the day before. + +#### Scenario: Plan at 12 days +- **WHEN** a test is set 12 days ahead +- **THEN** the plan shows finishing the covered skills now, exercise test 1 at ~9 days, exercise test 2 at ~7, the simulation at ~5 and review in the last 4 days + +### Requirement: Days are recommendations +The plan's day numbers SHALL be recommendations. The student SHALL be able to start each step earlier or later. + +#### Scenario: Starting early +- **WHEN** a student opens exercise test 2 with 11 days left +- **THEN** the exercise test starts + +### Requirement: Short notice shortens the gaps +If a test is set less than 9 days ahead, the plan SHALL keep the same order of steps and shorten the gaps between them evenly. + +#### Scenario: Test in 6 days +- **WHEN** a test is set 6 days ahead +- **THEN** the plan keeps the order exercise test 1, exercise test 2, simulation, review, spread evenly over the 6 days + +### Requirement: Today's task +Home SHALL show, for the nearest test, the days left, the readiness meter and one task for today taken from the plan, as a single obvious button. When several tests are coming up, today's task SHALL come from the closest one. + +#### Scenario: Two tests ahead +- **WHEN** a student has tests in 4 and 10 days +- **THEN** home shows one task for today, taken from the plan of the test in 4 days diff --git a/openspec/changes/document-path-shadda-rendering/.openspec.yaml b/openspec/changes/document-path-shadda-rendering/.openspec.yaml deleted file mode 100644 index 7ccf7c369511c5b08e33676571f5f1b1d310f7f9..0000000000000000000000000000000000000000 --- a/openspec/changes/document-path-shadda-rendering/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-25 diff --git a/openspec/changes/fix-baseline-forgiveness/.openspec.yaml b/openspec/changes/fix-baseline-forgiveness/.openspec.yaml deleted file mode 100644 index 7ccf7c369511c5b08e33676571f5f1b1d310f7f9..0000000000000000000000000000000000000000 --- a/openspec/changes/fix-baseline-forgiveness/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-10-25 diff --git a/openspec/changes/improve-student-teacher-loop/.openspec.yaml b/openspec/changes/improve-student-teacher-loop/.openspec.yaml deleted file mode 100644 index 8a94d769474a3542b8ac7f989d45e99fac30e0a8..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-11-06 diff --git a/openspec/changes/improve-student-teacher-loop/design.md b/openspec/changes/improve-student-teacher-loop/design.md deleted file mode 100644 index 2309aeada35f1fab63a1d8768e8b8351a44876da..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/design.md +++ /dev/null @@ -1,112 +0,0 @@ -# Design - -## Context - -See proposal.md for the motivation. The facts that shape the approach: - -- **Main specs are empty.** All current behaviour lives in unarchived changes (`add-class-assignments`, `add-assignment-worksheets`, `add-server-quiz-grades`, `add-teacher-grade-review`, `add-class-attention-view`, `add-misconception-patterns`, `add-open-question-phone-scan`). Several are still marked in progress. -- **Unit-quiz sittings** (`math_quiz_sittings`) store `unit_id`, `attempt_ids`, `submitted_at`, `time_up`, `client_key`. The start time and the time limit live only in the student's page (`P.uq[unit].sitting.started`, `static/math.js`). Any number of sittings is allowed; the report shows the latest. -- **Grades** come from `app/quiz_grades.py` (`sitting_view`), with teacher reviews taking precedence over AI scores. Quiz questions have `points` and `question` and no skill tags. -- **Assignments** (`math_assignments`) are class-wide, with `items` as JSON. `worksheets_only()` in `app/assignments.py` limits non-managers to worksheet items. -- **Worksheet submissions** (`math_worksheet_submissions`) are unique per `(worksheet_id, student_id)` and are replaced in place until `checked_at` is set; then they are frozen. The AI check (`app/homework_grading.py`) is called one submission at a time by the teacher and only fills the review form. -- **AI queue** (`app/ai_queue.py`, `math_ai_requests`): students never call the AI; each pending `grading` request is sent one by one by the class teacher, and each send uses `TeacherQuota` (`app/teacher_ai.py`, 3/day, in memory). -- **Phone scans** (`math_answer_scans`) are bound to one `math_question_attempts` row and one attachment (one image). -- **Misconceptions, skill states, fading, examples** are computed in the browser from the progress each device uploads (`math_progress`); the class report reuses the same code (`Sky.patterns`, `Sky.assignmentState`). -- **Exam board**: `classes.exams` is a JSON array of `{subject, date}`. - -## Goals / Non-Goals - -**Goals:** -- Reuse what exists (states, `Sky.*` helpers, the queue, the phone flow, `sitting_view`) instead of adding parallel systems. -- Server-trusted where it matters for grades: final-quiz start time, attempt count, official grade, release. -- Every new table follows the existing pattern: service-role only, RLS on, a migration that can be missing without breaking the rest ("unavailable" answers, as worksheets do). - -**Non-Goals:** -- Moving skill practice, misconceptions or fading to the server. They stay device-reported and are labelled as such. -- Proctoring final quizzes (tab locking, cameras). The server clock and single sitting are the only integrity measures. -- Notifications by email or push for new tasks (push exists for photo requests only; extending it is a follow-up). -- Teacher-to-student messaging beyond the existing comments, notes and "look again" requests. -- Changing the teacher's personal 3/day AI allowance. - -## Decisions - -### D1. Quiz mode on the sitting, windows in their own table -Add `mode text not null default 'practice' check (mode in ('practice','final'))`, `started_at timestamptz`, `window_id uuid` to `math_quiz_sittings`. New `math_quiz_windows (id, class_id, unit_id, opens_at, closes_at, released_at, created_by_email)` with a partial unique index on open windows per `(class_id, unit_id)`. New `math_quiz_extra_sittings (id, window_id, student_id, until, reason, granted_by_email, used_sitting_id)`. - -A final sitting is created by a new `POST /api/math/quiz-sittings/start` that checks the window (or an unused grant) and that the student has no final sitting in it, records `started_at` on the server, and returns the deadline. The existing submit route then accepts attempts for a final sitting only until `min(started_at + minutes + grace, closes_at or grant.until)`; photo uploads for attempts of a final sitting check the same deadline. - -*Alternatives*: a per-class "max attempts / best or latest" policy (rejected by the product decision: practice is unlimited, final is once); keeping the clock on the page (rejected: the final grade must not depend on the device). - -Practice sittings keep today's flow (page clock, created at hand-in) so nothing changes for existing users. - -### D2. Official grade and release computed on read -`sitting_view` gains `mode`, `window_id`, `released`. "Official grade" = grade of the latest handed-in final sitting per unit. For a student, a final sitting's grade, per-question points and solutions are withheld unless `released_at` is set on its window (or on the grant's window); the teacher always sees them. A sitting released with open checks shows its grade when the checks complete (no extra state needed: release is a window flag, grade is computed on read). - -### D3. Skill tags on quiz questions -Add `skills: [skill_id, ...]` (1–3, same unit) to each `units[].quiz.questions[]` in `app/math_algebra9.json`; validate in `app/math_skills.py` at load. Lost points per skill are computed on read from checked answers of the last 60 days. This feeds the practise-before-retake list, the focus profile and exam readiness. - -### D4. Focus profile computed in the browser, quiz evidence from the server -The class report already gets each student's progress and quiz sittings. Add per-question `skills` and earned/possible points to the sittings it returns, and compute the weakness score in a new `Sky.focus(progress, sittings, skills)` helper shared by the report and the student's exam view. Score per skill = `2·lost_quiz_points/25 + wrong_14d + 2·(started && !done) + 1·fading`, capped and ranked. The weights are a starting point kept in one constant table, tested, and may be tuned without spec changes. - -*Alternative*: compute on the server. Rejected for now: misconceptions and fading are device data already computed client-side by `Sky.*`; duplicating that logic in Python would drift. - -### D5. Focus practice as an audience on assignments -Add `student_emails text[]` (nullable; null = whole class) to `math_assignments`. *Revised during implementation:* the audience is kept by email, not account id, because the class lists its students by email and a student who has not signed in yet has no id. `worksheets_only()` becomes `allowed_items(user, fields, old)`: managers may give anything; class teachers may give worksheets to the class, or 1–5 skill items when `student_ids` is set. The student listing keeps an assignment when it has no audience or the student's email is in it, on the server; a student is told only that an assignment is personal, never whom else it was given to. Report completion counts only the audience. Path markers and `Sky.assignmentState` need no change beyond receiving the filtered list. - -*Alternative*: a separate `math_focus_practice` table. Rejected: it would duplicate due dates, completion, report tabs and the student card. - -### D6. Worksheet versions and return-for-fix -Today one row per `(worksheet_id, student_id)` is replaced in place. Change to versioned rows: add `version int not null default 1`, `state text check (state in ('submitted','checked','returned'))`, `note text (<=300)`, `returned_at`, `return_comment`, `return_due_on date`; replace the unique constraint with `unique (worksheet_id, student_id, version)`. Before a check, a new hand-in still replaces the current version (as today); after a return, it creates `version+1`. The current submission is the highest version. Existing rows migrate to `version 1`, `state = checked_at is null ? 'submitted' : 'checked'`. - -The completion rule (done = has a submission; late = handed in after due) uses the current version; a returned current version counts as not done, and its due date becomes `return_due_on` when set. - -### D7. Worksheet hand-in from the phone -*Revised during implementation.* This already exists: each page of a worksheet hand-in is a `worksheet:` answer attempt (`POST /api/math/worksheet-attempts`), photographed on this device or on the phone through the normal answer-scan flow (request, confirm before the camera, review, upload), and the page then adds it to the hand-in. It meets the spec (same account, confirm and review steps, pages bound to their worksheet), so no new table is added; the work is to keep it working with the note and the versioned submissions of D6. - -### D8. Task list and grades as read-model routes -`GET /api/math/my-tasks` and `GET /api/math/my-grades` assemble, for the signed-in student only, assignments (filtered by audience), open windows/grants, worksheet submissions, sittings and reviews. They do not take a student id. The state order in the task-hub spec is implemented once in `Sky.taskState` and used by the student's list and the teacher's views, so both always agree. - -### D9. Batches and a class budget for AI checks -Add `batch_id` to `math_ai_requests` (the class is found from the student's email, as the queue already does); new `math_ai_batches (id, class_id, scope_kind, scope_id, created_by_email, total, sent, created_at)`; new `math_class_ai_budget (class_id, day date, used int, primary key (class_id, day))` plus `classes.ai_daily_checks int` (null → default 150) and `classes.auto_send_practice bool default false`. - -The budget is taken with an atomic Postgres function `take_class_checks(class_id, day, n, limit) returns int` (how many were granted) and given back with `give_class_checks`. It is in the database, not in memory like `TeacherQuota`, because batches run across requests and restarts and the number matters for cost. - -`POST /api/ai-queue/batches` takes a scope (window, unit practice, worksheet), collects the class's pending requests oldest first, takes up to `n` from the budget, marks them `sending` with the `batch_id`, and processes them in a background worker with a small concurrency (2–3) to respect provider rate limits. The existing per-request `send` route uses the class budget for `grading` requests and the teacher quota for `photo` requests. *Revised during implementation:* worksheet AI checks do not become queue requests (the queue's rows are tied to one answer attempt); a single or batch worksheet check takes from the same class budget and stores the suggestion on the submission (`ai_score`, `ai_comment`, `ai_readable`, `ai_checked_at`), where it only fills the teacher's review form. - -Auto-send for practice: when a practice sitting is handed in and `auto_send_practice` is on, its requests go straight into a system batch, within the budget; whatever does not fit stays pending. - -*Alternatives*: raise the teacher's personal limit (rejected: mixes the teacher's own use with class work, and still needs 100+ clicks); auto-send everything (rejected by the product decision: final and worksheet checks wait for the teacher). - -### D10. Exam entries with units -Extend each `classes.exams` entry with optional `units: [unit_id]` and `note` (≤300). *Revised during implementation:* the exam board had no editor in the app, so a new route, `PUT /api/classes/{id}/exams/topics` (class teacher or manager), sets an existing exam's units (⊂ the class's units) and note; the report's "מבחנים" tab uses it. No migration needed (JSON column). Readiness and the plan are computed in the browser from progress, `Sky.focus` and the student's sittings; plan step completion is derived from progress state (skill done/reviewed after the plan was first opened, practice sitting after that time, practice exam over the exam's units after that time), so no new storage. - -### Relation to in-flight changes -This change only adds requirements. Where it narrows earlier behaviour it does so through new states, not by contradicting text: -- `assignment-worksheets` "Replace after the check → refused" still holds for a checked submission; "returned" is a new state that allows a new version. -- `unit-quiz-grades` "report shows the server's sittings" still holds; the report now labels each sitting practice/final and shows the official grade from final sittings. -- `class-assignments` "Class teacher creates assignments" is narrowed in code by `worksheets_only()`; D5 widens it for per-student skill items only. - -Recommended order: archive the seven listed changes (sync their specs into `openspec/specs/`) before archiving this one, so a later edit can use MODIFIED deltas against real main specs. - -## Risks / Trade-offs - -- [Device-reported data in the focus profile can be stale or edited] → every piece of evidence is labelled by source (spec), and quiz evidence, which drives the most weight, is server-checked. -- [Weakness weights feel arbitrary to teachers] → evidence is shown in words next to each skill; weights are one tested constant table. -- [AI cost spikes from batch sends] → per-class daily budget in the database, manager-set; teacher sees the count before confirming; failed checks are given back. -- [Provider rate limits on a 100-check batch] → background worker with small concurrency and retry with back-off; students see "checking" meanwhile. -- [Final-quiz windows across midnight / time zones] → all window times stored as `timestamptz`, shown in Jerusalem time, same as due dates. -- [Versioned worksheet rows break code that assumes one row per student] → a single helper `current_submission()` used everywhere; migration keeps existing rows as version 1; tests cover old rows. -- [Releasing with open checks surprises a student later] → confirmation names how many sittings are still open. -- [Several unarchived predecessor changes] → listed above; no requirement here contradicts them. - -## Migration Plan - -1. Supabase migrations, each independent and additive: quiz modes and windows; assignment audience; worksheet versions and scans; AI batches and class budget. Each feature answers "unavailable" when its migration is missing (existing pattern), so code can deploy first. -2. Content: add `skills` to the 4 unit quizzes' questions; validation fails loudly in CI if a tag is missing. -3. Deploy server, then front end. Existing sittings become practice; existing worksheet submissions become version 1; existing assignments keep `student_ids = null`. -4. Rollback: front end and routes can be reverted alone; new columns are nullable/defaulted and ignored by old code, except the worksheet unique constraint — the down migration restores `unique (worksheet_id, student_id)` after deleting non-current versions (data loss of earlier versions only, documented). - -## Open Questions - -- Default class budget (150) and auto-send default (off) may be tuned after the first weeks of use; they are settings, not spec changes. -- Whether the teacher's daily summary of the inbox should also go by push notification is left to a follow-up change. diff --git a/openspec/changes/improve-student-teacher-loop/proposal.md b/openspec/changes/improve-student-teacher-loop/proposal.md deleted file mode 100644 index 55802cbb15b0958c07453039b0a98c4fc909e4a0..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/proposal.md +++ /dev/null @@ -1,59 +0,0 @@ -# Proposal - -## Why - -Mathly now has the pieces of a classroom loop — assignments with worksheets, server-graded unit quizzes, teacher reviews of AI checks, an AI queue, a class report — but they are scattered, and the loop between student and teacher breaks in a few places: - -- A student has no single place that says "what do I owe, what is coming, how did I do". Assignments sit on the home screen, the exam board only lists a subject and a date, unit-quiz grades are hidden inside each quiz's intro, and worksheet scores only appear on the assignment card until it drops off after 14 days. -- Every unit quiz can be retaken without limit, and the report quietly shows the latest sitting. There is no way to give a quiz "for real" once, and no way to say "retake it, but practise first". The clock of a sitting is kept only by the student's page. -- The exam board does not say what an exam covers, so the app cannot help a student prepare for it. -- The teacher sees a student's signals (stuck skills, recurring misconceptions, low quiz grades) in different tabs, and cannot act on them: class teachers can only give worksheets, and only to the whole class. -- AI checking of student work does not scale: each queued student answer uses one of the teacher's 3 daily AI requests, so a 4-question quiz for a class of 27 (108 answers) cannot realistically be checked. A worksheet submission, once checked, can never be sent back for a fix. - -This change closes those gaps so that the same loop — teacher gives work → student prepares and hands in → AI checks → teacher confirms → student sees the result and what to do next → teacher sees who needs what — works end to end. - -## What Changes - -**Student side** -- A "My tasks" hub (`המשימות שלי`): one list of open assignments, open final quizzes, and work returned for a fix, ordered by due date, with a clear state per item (not started / in progress / handed in / waiting for check / checked / returned / late). -- Worksheet hand-in improvements: hand in from the phone (reusing the same-account phone flow), an optional note to the teacher, a visible receipt, and a resubmit path when the teacher returns the work for a fix. -- Two kinds of unit quiz: **practice** quizzes (retake any time, own grade history, never the official grade) and **final** quizzes (opened by the class teacher for a time window, one sitting per student, server-kept clock, the official grade). The teacher can give one student another final sitting (for example after an absence or a technical failure). -- Retaking a practice quiz shows what to practise first: the skills behind the questions the student lost points on. -- A grades page (`הציונים שלי`): all server grades — final quizzes, practice quizzes (best and latest), worksheet scores — with teacher comments, items still waiting for a check, and a link to each result. -- Exam preparation: the exam board entries can name the units they cover; the student gets a per-exam readiness view (skills finished / fading / not started, recurring misconceptions in those units, last practice-quiz grade) and a preparation plan with one-tap practice (due skills, a practice exam preset to the exam's units, the unit's practice quiz). - -**Teacher side** -- A per-student focus profile in the class report: the student's weakest skills, recurring misconceptions, questions lost in final/practice quizzes mapped to skills, overdue work, and a short trend — each with the evidence behind it. -- Class-level weakness summary: the skills and misconceptions shared by most students. -- Focus practice: a class teacher may assign skill items to chosen students (one or more), straight from the focus profile. Class-wide skill / quiz / practice-exam items stay manager-only. -- Submissions inbox: one list of everything waiting for the teacher — worksheet submissions, final-quiz answers, "look again" requests — with filters by assignment and state, and a "return for a fix" action on worksheets. -- AI check batches: the teacher approves a whole batch (a final quiz's answers, a worksheet's submissions) in one action. Checks of student work draw from a per-class daily AI budget, separate from the teacher's personal 3 requests. AI results are shown as suggestions the teacher confirms or corrects; nothing reaches the student as a grade before the rule for that item says so. - -**Content data** -- Unit-quiz questions get skill tags (which skills each question tests), so lost points can be mapped to skills. - -Nothing here is **BREAKING** for existing data: existing unit-quiz sittings become practice sittings, and existing assignments, worksheets and reviews keep working. - -## Capabilities - -### New Capabilities -- `student-task-hub`: the student's single list of owed work and its states, worksheet hand-in from the phone, the note to the teacher, the hand-in receipt and resubmission after a return. -- `unit-quiz-modes`: practice vs. final unit quizzes, final-quiz windows opened by the teacher, one official sitting, server-kept clock, extra sittings granted by the teacher, practise-before-retake guidance. -- `student-gradebook`: the student's grades page and what each grade shown there means. -- `exam-preparation`: exams linked to units, the per-exam readiness view and the preparation plan. -- `student-focus-profile`: the teacher's per-student and class-wide weakness views and the evidence behind each signal, including quiz-question skill tags. -- `focus-practice-assignments`: class teachers assigning skill practice to chosen students. -- `teacher-submissions-inbox`: one queue of work waiting for the teacher, returning worksheets for a fix. -- `ai-check-batches`: batch approval of AI checks for student work, the per-class AI budget, and AI results as suggestions the teacher confirms. - -### Modified Capabilities -None under `openspec/specs/` (the main specs directory is empty). This change builds on capabilities still held in unarchived changes — `class-assignments`, `assignment-worksheets`, `unit-quiz-grades`, `teacher-answer-review`, `class-report`, `misconception-patterns` — and adds to them through the new capabilities above without contradicting their requirements (see design.md, "Relation to in-flight changes"). - -## Impact - -- **Server**: `app/assignments.py` (per-student targeting, teacher-allowed skill items), `app/worksheets.py` (note, return-for-fix state, phone hand-in), `app/quiz_grades.py` and the quiz-sitting routes (mode, windows, server clock, official grade), `app/ai_queue.py` and `app/teacher_ai.py` (batches, class budget), `app/class_report.py` (focus profile data), `app/main.py` (exam entries with units). New routes for the student task list, grades, final-quiz windows, inbox and batches. -- **Database (Supabase migrations)**: `math_quiz_sittings` gets `mode` and server `started_at`; new `math_quiz_windows` and `math_quiz_extra_sittings`; `math_assignments` gets an optional `student_ids` audience; `math_worksheet_submissions` gets `note`, `state`, `returned_at`, `return_comment`, `version`; `math_ai_requests` gets `batch_id`, `class_id`; new `math_ai_batches` and `math_class_ai_budget`; `classes.exams` entries may carry `units`. -- **Front end**: `static/math.js` (task hub, grades page, exam preparation, quiz modes, focus profile, inbox, batch approval), `static/answer-scans.js` (worksheet hand-in from the phone). -- **Content**: `app/math_algebra9.json` unit-quiz questions gain `skills` tags; validation in `app/math_skills.py`. -- **Cost**: AI spend for student work becomes predictable per class (budget) rather than bounded by each teacher's 3/day. -- **Tests**: unit tests per route, and Playwright end-to-end flows for the student task hub, final quiz, return-and-resubmit and batch approval. diff --git a/openspec/changes/improve-student-teacher-loop/specs/ai-check-batches/spec.md b/openspec/changes/improve-student-teacher-loop/specs/ai-check-batches/spec.md deleted file mode 100644 index c8804ecd385ec97970647c66ade06290fe180b16..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/ai-check-batches/spec.md +++ /dev/null @@ -1,72 +0,0 @@ -# Spec Delta - -## Purpose - -Makes AI checking of student work practical for a whole class: the teacher approves a batch in one action, checks draw from a per-class daily budget instead of the teacher's personal allowance, and the teacher stays the one who confirms what counts. - -## ADDED Requirements - -### Requirement: Teacher approves a batch of checks -The class teacher SHALL be able to send to the AI, in one action, all pending check requests of one final-quiz window, of one unit's practice sittings, or of one worksheet's submissions. The teacher SHALL see how many checks the batch holds and how many the class budget has left before confirming. Requests outside the teacher's classes MUST NOT be included. - -#### Scenario: Final quiz batch -- **WHEN** 27 students handed in a 4-question final quiz and the teacher presses "שליחת כל הבוחן לבדיקה" -- **THEN** the app shows "108 בדיקות · נשארו 150 היום", and on confirmation the 108 requests are sent - -#### Scenario: Worksheet batch -- **WHEN** a worksheet has 12 submissions without an AI suggestion and the teacher sends them as a batch -- **THEN** each submission gets an AI suggestion, shown in its review form - -### Requirement: Checks of student work use a class budget -Checks of student work SHALL count against a daily budget of the student's class (Jerusalem date), not against the teacher's personal daily AI allowance. A manager SHALL set each class's budget; a class without a setting SHALL use a default of 150 checks a day. A check that fails or could not read the photo SHALL be given back. - -#### Scenario: Teacher's own allowance untouched -- **WHEN** the teacher sends a batch of 108 checks -- **THEN** the teacher can still make their own 3 AI requests that day - -#### Scenario: Unreadable photo given back -- **WHEN** the AI marks one answer unreadable -- **THEN** the class budget used goes down by one for that answer - -### Requirement: Budget running out -When a batch needs more checks than the budget has left, the teacher SHALL be able to send as many as are left, oldest first. The rest SHALL stay pending and SHALL be offered again the next day. The student SHALL see their request as waiting, not failed. - -#### Scenario: Partial batch -- **WHEN** a batch holds 108 checks and 40 are left today -- **THEN** 40 are sent now, 68 stay pending, and the teacher sees "68 יישלחו מחר" - -### Requirement: Teacher may auto-send practice checks -The class teacher SHALL be able to turn on, per class, automatic sending of practice-quiz checks. When on, a handed-in practice sitting's answers SHALL be sent to the AI without waiting for the teacher, within the class budget. Final-quiz and worksheet checks SHALL always wait for the teacher's approval. The setting SHALL be off by default. - -#### Scenario: Auto-send on -- **WHEN** auto-send is on for 9א and a student hands in a practice sitting -- **THEN** its answers are checked without the teacher's action, and the student sees the result when it completes - -#### Scenario: Final quiz with auto-send on -- **WHEN** auto-send is on and a student hands in a final sitting -- **THEN** its answers wait in the teacher's queue - -### Requirement: AI results are the teacher's to confirm -A worksheet's AI check SHALL only fill the review form; nothing SHALL reach the student until the teacher saves the check. A quiz answer's AI score SHALL count unless the teacher saves a review, and final results SHALL reach students only on release. Answers the AI could not score SHALL go to the teacher's inbox. - -#### Scenario: Worksheet suggestion not saved -- **WHEN** the AI suggests 70 for a worksheet submission and the teacher has not saved it -- **THEN** the student sees "ממתין לבדיקה" and no score - -#### Scenario: Needs review -- **WHEN** the AI ends a quiz answer's check with "needs review" -- **THEN** the answer appears in the teacher's inbox - -### Requirement: Student sees where their check is -For each answer or submission sent for checking, the student SHALL see one of: waiting for the teacher to send, checking, checked, waiting for the teacher's review, or declined (with the teacher's note). - -#### Scenario: Waiting for the teacher -- **WHEN** a student's final-quiz answers are pending in the queue -- **THEN** the result screen shows "ממתין לאישור המורה לבדיקה" for each answer - -### Requirement: Teacher sees AI use per class -The teacher SHALL see, per class, the checks used and left today, and the checks used in the last 7 days. - -#### Scenario: Budget view -- **WHEN** the teacher opens the AI queue -- **THEN** each class shows "נוצלו 108 מתוך 150 היום" and the last 7 days' total diff --git a/openspec/changes/improve-student-teacher-loop/specs/exam-preparation/spec.md b/openspec/changes/improve-student-teacher-loop/specs/exam-preparation/spec.md deleted file mode 100644 index e82e3ddc63b685f973c8c34833ab8fac1936ff8e..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/exam-preparation/spec.md +++ /dev/null @@ -1,69 +0,0 @@ -# Spec Delta - -## Purpose - -Links each upcoming exam on the class exam board to the units it covers, and turns that into a readiness view and a preparation plan the student can follow one tap at a time. - -## ADDED Requirements - -### Requirement: Exams name the units they cover -An exam on a class's exam board SHALL be able to name the class units it covers, and an optional note of up to 300 characters (for example "פרק 3 עד עמוד 80"). Only the class teacher or a manager SHALL set them. Units outside the class's units MUST be rejected. Exams without units SHALL keep working as today. - -#### Scenario: Teacher links units -- **WHEN** the teacher of 9א sets the math exam of 18/11 to cover units `t` and `g` -- **THEN** students of 9א see "חומר למבחן: ביטויים אלגבריים, משפט פיתגורס" on the exam - -#### Scenario: Exam without units -- **WHEN** an exam names no units -- **THEN** it is shown with its subject and date only, and has no readiness view - -### Requirement: Student sees an upcoming-exam view -For each upcoming exam that names units, the student SHALL be able to open a view with the days left, the units covered, the teacher's note and the student's readiness. The nearest such exam SHALL be linked from the home screen and from the task list. - -#### Scenario: Open the nearest exam -- **WHEN** a student taps the countdown of the math exam in 5 days -- **THEN** the exam view opens with "עוד 5 ימים", the two units and the readiness - -### Requirement: Readiness is shown per skill -The readiness of an exam SHALL list, for each skill of its units, the student's state (gold, finished, fading, practising, not started) using the same states as the path, and a summary of finished skills out of all skills. It SHALL also list the student's recurring misconceptions seen in those units, and their latest practice and official quiz grades of those units. - -#### Scenario: Readiness summary -- **WHEN** units `t` and `g` have 14 skills and the student finished 9, 2 of them fading -- **THEN** the view shows "9 מתוך 14" and marks the 2 fading skills and the 5 not finished - -#### Scenario: Misconception in an exam unit -- **WHEN** the student has the recurring misconception `sign_mid`, seen in skills of unit `t` -- **THEN** the view lists it with its tip and its skill to strengthen - -### Requirement: Student gets a preparation plan -The exam view SHALL offer a plan in this order: skills not started or practising, then fading skills, then skills to strengthen from recurring misconceptions, then the units' practice quizzes, then a practice exam over the exam's units. Each step SHALL open with one tap and SHALL be checked off when done. - -#### Scenario: Plan steps -- **WHEN** the student has 1 skill not started, 2 fading skills and no misconception -- **THEN** the plan lists the skill, then the 2 fading skills, then the practice quizzes of `t` and `g`, then "מבחן תרגול על החומר" - -#### Scenario: Practice exam set to the exam's units -- **WHEN** the student opens the plan's practice exam step -- **THEN** a practice exam starts with units `t` and `g` chosen and no other unit - -#### Scenario: Step done -- **WHEN** the student finishes a fading skill's review from the plan -- **THEN** that step is shown as done when they return to the exam view - -### Requirement: Plan suggests a daily amount -When the exam is 2 or more days away, the plan SHALL suggest how many steps to do per day, so the remaining steps are spread over the days left, and SHALL show today's steps first. - -#### Scenario: Six steps, three days -- **WHEN** 6 steps remain and the exam is in 3 days -- **THEN** the plan says "2 צעדים ביום" and shows the first 2 as today's - -#### Scenario: Exam tomorrow -- **WHEN** the exam is tomorrow -- **THEN** the plan shows all remaining steps without a daily amount - -### Requirement: Teacher sees class readiness for an exam -In the class report, the teacher SHALL see for each upcoming exam with units how many students finished each of its skills, and the students with the lowest readiness. - -#### Scenario: Class readiness -- **WHEN** the teacher opens the 18/11 exam in the report -- **THEN** they see each skill of `t` and `g` with how many students finished it, and the 5 students with the fewest finished skills diff --git a/openspec/changes/improve-student-teacher-loop/specs/focus-practice-assignments/spec.md b/openspec/changes/improve-student-teacher-loop/specs/focus-practice-assignments/spec.md deleted file mode 100644 index 3ed7babc314167caed9bdb07ff9900ed6fadd60e..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/focus-practice-assignments/spec.md +++ /dev/null @@ -1,50 +0,0 @@ -# Spec Delta - -## Purpose - -Lets a class teacher give skill practice to chosen students of their class, so the weaknesses found in the report turn into work each student sees, while class-wide skill and quiz assignments stay with managers. - -## ADDED Requirements - -### Requirement: Class teacher gives focus practice to chosen students -The class teacher of a class SHALL be able to create a focus-practice assignment for 1 or more chosen students of that class, with a title of up to 80 characters, an optional note of up to 500 characters, a due date and 1 to 5 skill items of the class's units. Any other item kind in a teacher's focus-practice assignment MUST be rejected. - -#### Scenario: Focus practice for two students -- **WHEN** the teacher of 9א gives "חיזוק פיתגורס" with skills `g_pyth` and `g_pyth_word` to Dana and Noa, due 15/11 -- **THEN** the assignment is stored for 9א with those two students as its audience - -#### Scenario: Quiz item refused -- **WHEN** the teacher adds a unit-quiz item to a focus-practice assignment -- **THEN** the server rejects it with "teachers_give_worksheets_only" - -#### Scenario: Student of another class -- **WHEN** the chosen students include a student who is not in 9א -- **THEN** the server rejects the assignment - -### Requirement: Class-wide skill items stay with managers -A class teacher's assignment for the whole class SHALL keep accepting worksheet items only; skill, unit-quiz and practice-exam items for the whole class SHALL stay limited to managers. - -#### Scenario: Whole-class skill assignment by a teacher -- **WHEN** a class teacher who is not a manager saves a whole-class assignment with a skill item -- **THEN** the server rejects it - -### Requirement: Only the chosen students see a focus assignment -A focus-practice assignment SHALL appear only to its chosen students, on the task list, the home screen and the path markers. Other students of the class MUST NOT receive it in any response. - -#### Scenario: Classmate not chosen -- **WHEN** Yossi of 9א loads his assignments -- **THEN** "חיזוק פיתגורס" given to Dana and Noa is not in the response - -### Requirement: Teacher follows focus practice -The assignments tab of the class report SHALL list focus-practice assignments marked as personal, with their audience, and SHALL count completion only over their chosen students. A student's card SHALL list the focus practice given to them and its state. - -#### Scenario: Completion count -- **WHEN** Dana finished both skills and Noa finished one -- **THEN** the report shows "1 מתוך 2 סיימו" for "חיזוק פיתגורס" - -### Requirement: Teacher changes the audience -The class teacher SHALL be able to add or remove chosen students of a focus-practice assignment. A removed student SHALL no longer see it; an added student SHALL see it on their next load. - -#### Scenario: Student added -- **WHEN** the teacher adds Yossi to "חיזוק פיתגורס" -- **THEN** Yossi sees it after reloading, with its due date diff --git a/openspec/changes/improve-student-teacher-loop/specs/student-focus-profile/spec.md b/openspec/changes/improve-student-teacher-loop/specs/student-focus-profile/spec.md deleted file mode 100644 index 4825f91ace5fbe260fb4fb5d1e854aabba47c0ed..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/student-focus-profile/spec.md +++ /dev/null @@ -1,68 +0,0 @@ -# Spec Delta - -## Purpose - -Shows the class teacher, for each student and for the class, the skills and misconceptions that most need work, with the evidence behind each one, so the teacher knows whom to help with what. - -## ADDED Requirements - -### Requirement: Unit-quiz questions name their skills -Each unit-quiz question SHALL name one to three skills of its unit that it tests. Loading the content data MUST fail when a quiz question names no skill or a skill outside its unit. - -#### Scenario: Valid tags -- **WHEN** question 2 of unit `t`'s quiz names `t_ext_eq` -- **THEN** the content loads and the question carries that skill - -#### Scenario: Skill of another unit -- **WHEN** a quiz question of unit `t` names `g_pyth` -- **THEN** loading fails, naming the unit and the question - -### Requirement: Quiz points lost are counted per skill -For each student, the system SHALL count, per skill, the points lost in their checked final and practice quiz answers, splitting a question's lost points equally among its skills, over the last 60 days. - -#### Scenario: Lost points on a tagged question -- **WHEN** a student got 10 of 25 points on a question tagged `t_ext` and `t_ext_eq` -- **THEN** each of the two skills counts 7.5 lost points for that student - -#### Scenario: Unchecked answers are not counted -- **WHEN** an answer has no completed check -- **THEN** it adds no lost points - -### Requirement: Teacher sees a student's focus areas -Each student's card in the class report SHALL open with a "על מה לעבוד" section listing at most 5 skills, ranked by a weakness score that combines: quiz points lost on the skill, wrong answers in the skill in the last 14 days, being started but not finished, and being fading. Each listed skill SHALL state its evidence in words. - -#### Scenario: Evidence in words -- **WHEN** `g_pyth` is a student's top focus skill -- **THEN** it is listed with its evidence, for example "4 טעויות ב־14 ימים · איבד 12 נק׳ בבוחן הסופי · לא הושלם" - -#### Scenario: No weak skill -- **WHEN** a student has no skill with a weakness score above zero -- **THEN** the section says there is no focus area right now - -### Requirement: Focus areas include recurring misconceptions -The "על מה לעבוד" section SHALL also list the student's recurring misconceptions, with the number of times and skills, and their skill to strengthen, the same as the student's own patterns sheet. The words SHALL describe the mistake, not the student. - -#### Scenario: Recurring misconception -- **WHEN** a student has `sign_mid` recurring in 3 skills -- **THEN** the card lists "טעות סימן באמצע הביטוי · 3 פעמים ב־3 מיומנויות" with its skill to strengthen - -### Requirement: Sources are labelled -Each piece of evidence SHALL be labelled by its source: checked by the server (quiz answers and teacher reviews) or reported by the student's device (practice answers, misconceptions, fading). - -#### Scenario: Mixed sources -- **WHEN** a focus skill has quiz points lost and wrong practice answers -- **THEN** the quiz evidence has no device label and the practice evidence carries the device label - -### Requirement: Teacher sees class-wide focus areas -The report SHALL show for the class the 5 skills with the most students listing them among their focus skills, and the 3 misconceptions recurring in the most students, each with the number of students and a way to open the list of those students. - -#### Scenario: Shared weakness -- **WHEN** 11 students list `g_pyth` among their focus skills -- **THEN** the class view shows `g_pyth` with "11 תלמידים", and opening it lists the 11 students - -### Requirement: Focus area leads to action -Each focus skill, for a student or for the class, SHALL offer to assign it as focus practice to that student, or to the students who list it. - -#### Scenario: Assign from the class view -- **WHEN** the teacher presses "לתת תרגול" on `g_pyth` in the class view -- **THEN** the focus-practice form opens with `g_pyth` and the 11 students already chosen diff --git a/openspec/changes/improve-student-teacher-loop/specs/student-gradebook/spec.md b/openspec/changes/improve-student-teacher-loop/specs/student-gradebook/spec.md deleted file mode 100644 index 191a4bfa8743d98d4c21757bead2ff8b189e6320..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/student-gradebook/spec.md +++ /dev/null @@ -1,57 +0,0 @@ -# Spec Delta - -## Purpose - -Gives a student one page with every grade the server holds for them, what each one means, and what is still waiting for a check, so they never have to hunt through quizzes and assignment cards. - -## ADDED Requirements - -### Requirement: Student opens their grades page -A signed-in student SHALL have a "הציונים שלי" page, reachable from the home screen and from the task list, grouped by unit. It SHALL list: the official grade of each unit's final quiz, their practice-quiz grades (best and latest), and the scores of their checked worksheets. All grades on it SHALL come from the server. - -#### Scenario: Grades by unit -- **WHEN** a student has a final grade of 62 in unit `g`, practice grades 70 and 85 in unit `g`, and a worksheet score of 90 in an assignment of unit `g` -- **THEN** the unit `g` section shows "בוחן סופי: 62", "תרגול: הכי טוב 85 · אחרון 85" and the worksheet with 90 - -#### Scenario: Edited device progress -- **WHEN** the student's device progress claims a different quiz score -- **THEN** the grades page shows the server's grade - -### Requirement: Each grade is labelled by kind -Each grade SHALL say what it is: official final grade, practice grade, or worksheet score. Practice grades SHALL be marked as not counting toward the official grade. - -#### Scenario: Practice label -- **WHEN** the page shows a practice-quiz grade -- **THEN** it carries the label "תרגול – לא נכנס לציון" - -### Requirement: Waiting items are shown without a grade -Sittings and submissions that are handed in but not fully checked, or whose final results are not released, SHALL appear with their state and no grade. - -#### Scenario: Unchecked answers -- **WHEN** a practice sitting has 1 of 4 answers still waiting for a check -- **THEN** it is listed as "ממתין לבדיקה · שאלה אחת" with no grade - -#### Scenario: Final not released -- **WHEN** a final sitting is checked but the results are not released -- **THEN** it is listed as handed in, waiting for results, with no grade - -### Requirement: Teacher comments are shown with the grade -When a grade has a teacher review or worksheet comment, the page SHALL show a marker for it, and SHALL list teacher comments the student has not opened yet at the top of the page. - -#### Scenario: New comment -- **WHEN** the teacher commented on question 2 of a final sitting yesterday and the student has not opened it -- **THEN** the page shows it under "הערות חדשות מהמורה" with a link to that answer - -### Requirement: Each grade opens its result -Each grade SHALL open the matching result: the quiz result screen with per-question points, feedback and solutions, or the checked worksheet with its pages, score and comment. - -#### Scenario: Open a final result -- **WHEN** the student taps the final grade of unit `g` -- **THEN** the quiz result screen of that sitting opens - -### Requirement: Grades stay private -A student SHALL see only their own grades. The grades request MUST NOT accept another student's id. - -#### Scenario: Another student's grades -- **WHEN** a request for grades names a classmate's id -- **THEN** the server ignores the id and answers with the signed-in student's grades only diff --git a/openspec/changes/improve-student-teacher-loop/specs/student-task-hub/spec.md b/openspec/changes/improve-student-teacher-loop/specs/student-task-hub/spec.md deleted file mode 100644 index 879152a56746d6d08c73dcc8f17874c7bc01086a..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/student-task-hub/spec.md +++ /dev/null @@ -1,81 +0,0 @@ -# Spec Delta - -## Purpose - -Gives a student one place that lists everything they owe their teacher, with a clear state for each item, and lets them hand in, add a note and fix returned work from there. - -## ADDED Requirements - -### Requirement: Student sees one list of owed work -A signed-in student SHALL have a "המשימות שלי" list holding: their open assignments (class-wide and those given to them personally), final quizzes open to them, and worksheets returned to them for a fix. Items SHALL be ordered by due date, nearest first; items without a due date come last. The home screen SHALL show the count of open items and the nearest due date, linking to the list. - -#### Scenario: Mixed list -- **WHEN** a student has an assignment due 12/11, a final quiz of unit `g` open until 10/11, and a worksheet returned for a fix due 14/11 -- **THEN** the list shows the final quiz first, then the assignment, then the returned worksheet - -#### Scenario: Nothing owed -- **WHEN** the student has no open items -- **THEN** the list says there is nothing to do now and links to the path and the grades page - -#### Scenario: Personal assignment -- **WHEN** the teacher gave a focus-practice assignment to this student only -- **THEN** it appears in this student's list, marked as personal, and not in a classmate's list - -### Requirement: Each item shows one state -Each item in the list SHALL show exactly one state, chosen in this order: returned for a fix, late, waiting for a check, checked, handed in, in progress, not started. The state SHALL be given as text as well as by colour. The same state SHALL be used in the teacher's views of that item. - -#### Scenario: Handed in and waiting for the teacher -- **WHEN** a student handed in a worksheet that the teacher has not checked -- **THEN** the item shows "ממתין לבדיקה" - -#### Scenario: Late and not handed in -- **WHEN** the due date has passed (Jerusalem time) and the item is not done -- **THEN** the item shows "באיחור" - -#### Scenario: Returned work -- **WHEN** the teacher returned a submission for a fix -- **THEN** the item shows "הוחזר לתיקון" with the teacher's comment, even if it is past its due date - -### Requirement: Student adds a note when handing in -When handing in a worksheet, the student SHALL be able to add a note to the teacher of up to 300 characters. The teacher SHALL see the note with the submission. - -#### Scenario: Note sent with the photos -- **WHEN** a student hands in 2 photos with the note "לא הבנתי את שאלה 3" -- **THEN** the teacher sees the note above the pages of the submission - -#### Scenario: Note too long -- **WHEN** the note is longer than 300 characters -- **THEN** the server rejects the hand-in and nothing is stored - -### Requirement: Student gets a hand-in receipt -After a hand-in is stored, the student SHALL see a receipt naming the item, the number of pages, the time of hand-in and whether it was on time. The receipt SHALL stay visible on the item until the work is checked. - -#### Scenario: Receipt on time -- **WHEN** a student hands in 3 pages before the due date -- **THEN** the item shows "הוגש · 3 עמודים" with the time and no late mark - -#### Scenario: Failed hand-in has no receipt -- **WHEN** the upload of a page fails -- **THEN** no receipt is shown, the item keeps its earlier state, and the student can try again - -### Requirement: Student hands in a worksheet from the phone -A student SHALL be able to start a worksheet hand-in on the computer and take the photos on a phone signed in to the same account, using the same request, confirm and review steps as answer scans. Pages taken on the phone SHALL be attached only to the worksheet the request was made for. - -#### Scenario: Photos from the phone -- **WHEN** a student presses "צילום מהטלפון" on a worksheet and takes 2 photos on the phone -- **THEN** the computer shows the 2 pages under that worksheet, ready to send with an optional note - -#### Scenario: Another account -- **WHEN** a phone signed in to another account looks for pending requests -- **THEN** it sees no request of this student - -### Requirement: Student fixes returned work -When the teacher returns a worksheet submission for a fix, the student SHALL be able to hand in a new set of photos for it, with a note. The new set SHALL become the submission waiting for a check. The earlier set, its score and the teacher's return comment SHALL stay visible to the student and the teacher as an earlier version. - -#### Scenario: Resubmit after a return -- **WHEN** the teacher returned Dana's submission with "חסרה דרך פתרון בשאלה 2" and Dana hands in 2 new photos -- **THEN** the item shows "ממתין לבדיקה", and Dana's earlier version is listed with the return comment - -#### Scenario: Not returned -- **WHEN** a student tries to hand in again after the teacher checked the submission without returning it -- **THEN** the server refuses, as before diff --git a/openspec/changes/improve-student-teacher-loop/specs/teacher-submissions-inbox/spec.md b/openspec/changes/improve-student-teacher-loop/specs/teacher-submissions-inbox/spec.md deleted file mode 100644 index 092ff53d834065fb23e5cddcfe2411adfeb858cb..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/teacher-submissions-inbox/spec.md +++ /dev/null @@ -1,58 +0,0 @@ -# Spec Delta - -## Purpose - -Gives the class teacher one queue of everything students handed in that waits for them — worksheet submissions, quiz answers, requests to look again — and lets them check, return for a fix or release results from there. - -## ADDED Requirements - -### Requirement: Teacher sees one inbox of waiting work -The class teacher SHALL have an inbox listing, for their classes: worksheet submissions not checked, final and practice quiz answers whose check needs the teacher (no score, unreadable, needs review, or AI result not yet confirmed), and open requests to look again. Each entry SHALL show the student, the item, the hand-in time, whether it was late, and its state. A manager SHALL see the inbox of every class. - -#### Scenario: Mixed inbox -- **WHEN** a class has 3 unchecked worksheet submissions, 2 unreadable quiz answers and 1 request to look again -- **THEN** the inbox lists 6 entries, oldest first - -#### Scenario: Teacher of another class -- **WHEN** a teacher asks for the inbox of a class they do not teach -- **THEN** the server refuses with a forbidden error - -### Requirement: Inbox can be filtered -The teacher SHALL be able to filter the inbox by class, by assignment or final quiz, by kind (worksheet, quiz answer, request) and by state, and the home of the teacher's page SHALL show the number of open entries. - -#### Scenario: Filter by assignment -- **WHEN** the teacher filters by "חזרה לפני המבחן" -- **THEN** only entries of that assignment are listed - -### Requirement: Teacher checks in sequence -Opening an entry SHALL show the student's pages, the student's note, the AI suggestion when there is one, and the review form. Saving SHALL move to the next entry of the same filter. - -#### Scenario: Next entry -- **WHEN** the teacher saves a check on the first of 3 submissions of a worksheet -- **THEN** the second submission opens - -### Requirement: Teacher returns a worksheet for a fix -The teacher SHALL be able to return a worksheet submission for a fix with a comment of 1 to 1000 characters and an optional new due date. A returned submission SHALL not count as waiting for a check and SHALL let the student hand in again. The item SHALL count as done only when a later version is handed in. - -#### Scenario: Return with a comment -- **WHEN** the teacher returns Dana's submission with "חסרה דרך פתרון בשאלה 2" and a new due date of 16/11 -- **THEN** Dana's item shows "הוחזר לתיקון" with the comment and the new date, and the inbox no longer lists it - -#### Scenario: Return without a comment -- **WHEN** the teacher returns a submission with an empty comment -- **THEN** the server rejects it - -#### Scenario: Resubmitted version comes back -- **WHEN** Dana hands in a new version -- **THEN** it appears in the inbox as a new entry marked as a second version, with the earlier version reachable - -### Requirement: Teacher releases final quiz results -For each final-quiz window, the teacher SHALL see how many sittings are fully checked and SHALL be able to release the results. Releasing with sittings not fully checked SHALL ask for confirmation, and those sittings' results SHALL be shown to their students when their checks complete. - -#### Scenario: All checked -- **WHEN** 27 of 27 sittings are checked and the teacher presses "פרסום תוצאות" -- **THEN** all 27 students see their grades - -#### Scenario: Some still open -- **WHEN** 25 of 27 are checked and the teacher confirms the release -- **THEN** 25 students see their grades now, and the other 2 when their checks complete diff --git a/openspec/changes/improve-student-teacher-loop/specs/unit-quiz-modes/spec.md b/openspec/changes/improve-student-teacher-loop/specs/unit-quiz-modes/spec.md deleted file mode 100644 index 2c52b43b471cda1f522a77b270676d6366ca825e..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/specs/unit-quiz-modes/spec.md +++ /dev/null @@ -1,102 +0,0 @@ -# Spec Delta - -## Purpose - -Separates unit quizzes a student may retake for practice from final unit quizzes the teacher gives once for an official grade, and says which grade counts and how a student prepares for a retake. - -## ADDED Requirements - -### Requirement: Every sitting has a mode -Each unit-quiz sitting SHALL be either a practice sitting or a final sitting, fixed when the sitting starts. Sittings stored before this change SHALL be practice sittings. - -#### Scenario: Old sitting -- **WHEN** this change is deployed and a student has a sitting of unit `t` from last week -- **THEN** that sitting is a practice sitting, with its grade unchanged - -### Requirement: Practice quizzes can be retaken -A student SHALL be able to start a practice sitting of any unit quiz open to their class at any time, any number of times, except while a final sitting of the same unit is open to them and not yet handed in. - -#### Scenario: Third practice sitting -- **WHEN** a student has handed in two practice sittings of unit `t` -- **THEN** they can start a third practice sitting - -#### Scenario: Final quiz open -- **WHEN** a final quiz of unit `t` is open to the student and they have not handed it in -- **THEN** the practice quiz of unit `t` cannot be started, and the intro says the final quiz is open - -### Requirement: Teacher opens a final quiz -The class teacher or a manager SHALL be able to open a final quiz of a class unit for the class, with a start time and an end time. A student SHALL be able to start the final sitting only between them. One window per unit and class SHALL be open at a time. Any other account MUST be refused. - -#### Scenario: Window opened -- **WHEN** the teacher of 9א opens the final quiz of unit `g` from 10/11 08:00 to 10/11 09:30 -- **THEN** students of 9א see it in their task list, and can start it from 08:00 - -#### Scenario: Before the window -- **WHEN** a student tries to start the final sitting at 07:55 -- **THEN** the server refuses, and the intro shows when it opens - -#### Scenario: Not the class teacher -- **WHEN** a teacher of another class tries to open a final quiz for 9א -- **THEN** the server refuses with a forbidden error - -### Requirement: One final sitting per student -A student SHALL have at most one final sitting per window, unless the teacher granted them another one. Starting it SHALL be confirmed by the student after a notice that it cannot be retaken. - -#### Scenario: Second start refused -- **WHEN** a student who handed in the final sitting of unit `g` tries to start another one in the same window -- **THEN** the server refuses, and the intro shows the handed-in sitting - -#### Scenario: Confirmation -- **WHEN** a student presses "התחלת הבוחן הסופי" -- **THEN** the app asks them to confirm that the quiz is given once, before the clock starts - -### Requirement: The server keeps the final quiz clock -The server SHALL record when a final sitting starts and SHALL accept its answers until the quiz's minutes plus the photo grace time have passed, or until the window ends, whichever is first. Answers sent after that MUST be rejected; the sitting SHALL be handed in with the answers stored by then. - -#### Scenario: Closed after time -- **WHEN** a student started a 45-minute final sitting at 08:00 and sends a photo at 09:00, after the 10-minute grace time -- **THEN** the server rejects the photo, and the sitting is handed in with the answers it had - -#### Scenario: Page reloaded -- **WHEN** the student reloads the page during the sitting -- **THEN** the clock shows the time left from the server's start time - -### Requirement: Teacher grants another final sitting -The class teacher SHALL be able to grant a student one more final sitting of a unit, with an optional reason of up to 200 characters, also after the window ended. The extra sitting SHALL have its own end time set by the teacher. - -#### Scenario: Absent student -- **WHEN** a student was absent on 10/11 and the teacher grants them a final sitting of unit `g` until 13/11 -- **THEN** the student can start it until 13/11, and the report shows it was granted, with the reason - -### Requirement: Which grade counts -The official grade of a unit for a student SHALL be the grade of their latest handed-in final sitting of that unit. Practice sittings MUST NOT change the official grade. A unit with no final sitting SHALL have no official grade. - -#### Scenario: Practice after the final -- **WHEN** a student got 62 in the final sitting of `g` and 90 in a practice sitting afterwards -- **THEN** the official grade of `g` stays 62, and the practice grade is shown as practice - -#### Scenario: Granted second final -- **WHEN** the teacher granted a second final sitting and the student got 75 in it -- **THEN** the official grade becomes 75, and the first final sitting stays visible in the history - -### Requirement: Final results follow the teacher's release -Grades and solutions of a final quiz SHALL be shown to students only after the teacher releases the results for the window. Before that, the student SHALL see that the sitting was handed in and is waiting for results. - -#### Scenario: Before release -- **WHEN** all answers of a student's final sitting are checked but the teacher has not released results -- **THEN** the student sees "הוגש · התוצאות יפורסמו על ידי המורה" and no grade - -#### Scenario: Released -- **WHEN** the teacher releases the results of the window -- **THEN** every student of the window sees their grade, the feedback and the solutions - -### Requirement: Practise before a retake -After a practice sitting with questions that lost points, the result screen SHALL list the skills tagged on those questions with each skill's state for the student, and offer to practise them before a retake. The student SHALL be able to retake without practising. - -#### Scenario: Points lost on two questions -- **WHEN** a student lost points on questions tagged `g_pyth` and `g_pyth_word` -- **THEN** the result lists both skills with buttons to practise them, and a "ניסיון נוסף" button - -#### Scenario: Full marks -- **WHEN** the student got 100 in a practice sitting -- **THEN** no skills are suggested diff --git a/openspec/changes/improve-student-teacher-loop/tasks.md b/openspec/changes/improve-student-teacher-loop/tasks.md deleted file mode 100644 index edfd7aea7081aa682f5a88a64109a8cfc1c685c3..0000000000000000000000000000000000000000 --- a/openspec/changes/improve-student-teacher-loop/tasks.md +++ /dev/null @@ -1,94 +0,0 @@ -# Tasks - -## 1. Quiz question skill tags - -- [x] 1.1 Add `skills` (1–3 skills of the same unit) to every question of the 4 unit quizzes in `app/math_algebra9.json`; verify each tag by reading the question against the skill's description -- [x] 1.2 Validate quiz-question skills in `app/math_skills.py` (missing tag, foreign-unit tag, more than 3 fail with the unit and question named); verify with new cases in `tests/test_math_skills.py` -- [x] 1.3 Return per-question `skills`, earned and possible points from `sitting_view` in `app/quiz_grades.py`; verify in `tests/test_quiz_grades.py` - -## 2. Practice and final unit quizzes - -- [x] 2.1 Migration: `math_quiz_sittings.mode/started_at/window_id`, `math_quiz_windows`, `math_quiz_extra_sittings` (RLS on, service role only); verify it applies on a fresh database and old sittings read as `practice` -- [x] 2.2 Teacher routes to open, close and list final-quiz windows and to grant an extra sitting (class teacher or manager only); verify forbidden/overlap/foreign-unit cases in a new `tests/test_quiz_modes.py` -- [x] 2.3 `POST /api/math/quiz-sittings/start` for final sittings (window or unused grant, one per window, server `started_at`, returns deadline); verify before-window, second-start and grant cases in `tests/test_quiz_modes.py` -- [x] 2.4 Enforce the final deadline on photo upload and hand-in (quiz minutes + grace, capped by window/grant end); verify a late photo is rejected and the sitting is handed in with stored answers -- [x] 2.5 Block starting a practice sitting of a unit while the student has an open, not handed-in final; verify in `tests/test_quiz_modes.py` -- [x] 2.6 Official grade (latest final sitting) and release flag in `sitting_view`; withhold grade, points and solutions of an unreleased final from the student only; add the release route; verify both views in `tests/test_quiz_grades.py` -- [x] 2.7 Front end: quiz intro shows practice vs final, final confirmation dialog, server-driven clock on reload, "waiting for results" state; verify with a Playwright flow in `tests/test_unit_quiz.py` -- [x] 2.8 Practice result screen lists skills of questions that lost points with practise buttons and "ניסיון נוסף"; verify in the same Playwright file (lost points vs full marks) -- [x] 2.9 Class report labels sittings practice/final and shows the official grade; low-grade attention signal uses the official grade when present; verify in `tests/test_class_report.py` -- [x] 2.10 Update the user guide (`static/guide.js`) for students and teachers on practice vs final quizzes; verify the guide test still passes (`tests/test_guide_browser.py`) - -## 3. Focus practice assignments - -- [x] 3.1 Migration: `math_assignments.student_ids uuid[]` (null = whole class); verify existing rows read as class-wide -- [x] 3.2 Replace `worksheets_only()` with `allowed_items()` (teacher: worksheets for the class, or 1–5 skill items with an audience; manager: anything) and validate the audience is in the class; verify in `tests/test_assignments.py` -- [x] 3.3 Filter student assignment listings by audience on the server, and count report completion over the audience only; verify a non-chosen classmate gets nothing and the "1 מתוך 2" count -- [x] 3.4 Front end: focus-practice form (choose students, skills, due date), personal marker on the student's card, audience editing; verify with a Playwright flow -- [x] 3.5 Document focus practice in the teacher guide; verify the guide renders the new section - -## 4. Worksheet versions, notes and return-for-fix - -- [x] 4.1 Migration: versioned `math_worksheet_submissions` (`version`, `state`, `note`, `returned_at`, `return_comment`, `return_due_on`, unique per version) with existing rows as version 1; verify on a copy of current data -- [x] 4.2 One `current_submission()` helper used by completion, report and student views; verify all existing `tests/test_worksheets.py` cases still pass -- [x] 4.3 Hand-in accepts a note (≤300) and creates a new version after a return; refuses after a plain check; verify in `tests/test_worksheets.py` -- [x] 4.4 Return-for-fix route (comment 1–1000, optional new due date) and completion/late rules using the return due date; verify in `tests/test_worksheets.py` -- [x] 4.5 Front end: note field, receipt, returned state with comment, earlier versions list for student and teacher; verify in `tests/test_worksheets_browser.py` - -## 5. Worksheet hand-in from the phone - -- [x] 5.1 Keep the existing phone hand-in (each page a `worksheet:` answer attempt through the answer-scan flow, `POST /api/math/worksheet-attempts`) working with the note and versions of group 4; verify a phone page lands only under its worksheet in `tests/test_worksheets.py` -- [x] 5.2 The computer shows the phone's pages under the worksheet, ready to send with the note; verify with the existing phone Playwright flow in `tests/test_worksheets_browser.py` / `tests/test_phone_browser.py` - -## 6. Student task hub - -- [x] 6.1 `GET /api/math/my-tasks` (signed-in student only: audience-filtered assignments, open windows and grants, returned worksheets); verify in a new `tests/test_my_tasks.py` -- [x] 6.2 `Sky.taskState` with the spec's state order, used by the student list and teacher views; verify each state with unit cases in `tests/test_sky_browser.py` -- [x] 6.3 Front end: "המשימות שלי" list and the home-screen summary (count, nearest due); verify with a Playwright flow covering a mixed list and the empty state - -## 7. Student gradebook - -- [x] 7.1 `GET /api/math/my-grades` (server grades by unit: official final, practice best/latest, worksheet scores, waiting items, unseen teacher comments; ignores any student id); verify in a new `tests/test_my_grades.py` -- [x] 7.2 Front end: "הציונים שלי" page with kind labels, waiting states, new-comments block, links to results; verify with a Playwright flow -- [x] 7.3 Document the grades page in the student guide; verify the guide renders it - -## 8. Exam preparation - -- [x] 8.1 Accept optional `units` and `note` on exam entries in the class editor route, validating units against the class; verify in `tests/test_class_report.py` or the class editor tests -- [x] 8.2 `Sky.focus` helper (weakness score per skill from progress and sittings, constants in one table); verify with unit cases in `tests/test_sky_browser.py` -- [x] 8.3 Exam view: days left, units, note, per-skill readiness, misconceptions in the exam's units, latest grades; verify with a Playwright flow -- [x] 8.4 Preparation plan (ordered steps, daily amount, step completion derived from progress after the plan was opened, practice exam preset to the exam's units); verify the 6-steps/3-days and exam-tomorrow cases -- [x] 8.5 Teacher: class readiness per exam in the report; verify in `tests/test_class_report.py` -- [x] 8.6 Document exam preparation in the student and teacher guides; verify the guide renders it - -## 9. Student focus profile - -- [x] 9.1 Report data: include per-question skills and points of each student's sittings from the last 60 days; verify in `tests/test_class_report.py` -- [x] 9.2 "על מה לעבוד" section on the student card (top 5 skills with evidence in words, recurring misconceptions, source labels); verify with a Playwright flow -- [x] 9.3 Class-wide focus view (top 5 skills, top 3 misconceptions, student lists) with "לתת תרגול" opening the focus-practice form pre-filled; verify the pre-filled form in a Playwright flow - -## 10. AI check batches and class budget - -- [x] 10.1 Migration: `math_ai_requests.batch_id`, `math_ai_batches`, `math_class_ai_budget`, `classes.ai_daily_checks`, `classes.auto_send_practice`, AI-suggestion columns on worksheet submissions, and atomic `math_take_class_checks`/`math_give_class_checks` functions; verify concurrent takes never exceed the limit -- [x] 10.2 Class-budget accounting for student-work checks (grading, homework); teacher quota only for the teacher's own requests; give back on failure/unreadable; verify in `tests/test_ai_queue.py` and `tests/test_teacher_ai.py` -- [x] 10.3 `POST /api/ai-queue/batches` (scope: window, unit practice, worksheet; oldest first; partial when the budget is short) with a background worker of small concurrency and retry; verify partial batch and foreign-class exclusion in `tests/test_ai_queue.py` -- [x] 10.4 Worksheet AI checks (one or a batch) use the class budget and store the suggestion on the submission, where it only fills the review form; verify the student sees no score before the teacher saves -- [x] 10.5 Auto-send of practice-quiz checks per class (off by default); final and worksheet checks still wait; verify in `tests/test_ai_queue.py` -- [x] 10.6 Front end: batch button with count and budget left, per-class usage today/7 days, student-side check states; manager setting for the class budget; verify in `tests/test_ai_queue_browser.py` -- [x] 10.7 Update the AI-queue section of the teacher guide; verify the guide renders it - -## 11. Teacher submissions inbox - -- [x] 11.1 `GET /api/teacher/inbox?class_id=` (unchecked worksheet versions, quiz answers needing the teacher, open look-again requests; class teacher's classes, all for managers; filters); verify in a new `tests/test_inbox.py` -- [x] 11.2 Front end: inbox list with filters and open count, review in sequence (save → next), return-for-fix, and the report's "בחנים סופיים" tab (open/close a window, grant another sitting, release results with the open-checks confirmation); verify with a Playwright flow - -## 12. Integration checks - -- [x] 12.1 End-to-end Playwright scenario: teacher opens a final quiz → students sit it → teacher sends one batch → reviews an unreadable answer in the inbox → releases → student sees the grade on the grades page and the focus skills on the retake screen -- [x] 12.2 End-to-end Playwright scenario: teacher gives a worksheet → student hands in from the phone with a note → teacher returns it → student resubmits → teacher checks → both sides show the same states -- [ ] 12.3 Run the full test suite (`pytest`) and `openspec validate improve-student-teacher-loop --strict`; both pass - -## Workflow follow-up - -- Archive the predecessor changes (`add-class-assignments`, `add-assignment-worksheets`, `add-server-quiz-grades`, `add-teacher-grade-review`, `add-class-attention-view`, `add-misconception-patterns`, `add-open-question-phone-scan`) before archiving this one. -- Archive this change after review, and check the new main specs under `openspec/specs/`. diff --git a/openspec/changes/student-home-and-exam-quizzes/.openspec.yaml b/openspec/changes/student-home-and-exam-quizzes/.openspec.yaml deleted file mode 100644 index 8a94d769474a3542b8ac7f989d45e99fac30e0a8..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/.openspec.yaml +++ /dev/null @@ -1,2 +0,0 @@ -schema: spec-driven -created: 2026-11-06 diff --git a/openspec/changes/student-home-and-exam-quizzes/design.md b/openspec/changes/student-home-and-exam-quizzes/design.md deleted file mode 100644 index 1ff08617bf5099e93f23c7593ffc627af241645b..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/design.md +++ /dev/null @@ -1,115 +0,0 @@ -# Design - -## Context - -See proposal.md for the motivation. The current code that shapes the approach: - -- **One view for home and path.** `pathView()` in `static/math.js` returns every card and the trail in one string: `topBar`, `classesCard`, `tasksSummary`, `commentsCard`, `assignmentsCard`, `daily`, `reviewCard`, `patternsCard`, `examSoon`, `quizCard`, then the trail. `TABS` has `path` (labelled "בית") and `sky` ("האוסף"); `VIEW` starts as `"path"`. For a class teacher not in preview, `pathView` returns only `topBar` and `classesCard`. -- **Practice exam.** `quizSetup`/`quizStart`/`quizShow`/`quizSubmit` pick 12 multiple-choice questions from chosen units, give no feedback until hand-in, and push `{at,n,right,ms,units,weak}` to `P.quizzes` (last 20). `mergeProgress` joins `P.quizzes` across devices by `at`. -- **Per-topic data on the device.** `P.tries[id]` counts answers, `P.slips` keeps tagged wrong answers (last 500, with time and question index), `P.done`/`P.gold`/`Sky.fading` give mastery, `P.seen[id]` the last practice. There is no per-topic count of right answers, and untagged wrong answers are not in `P.slips`. -- **Weakness score.** `Sky.focus(P, sittings, ids)` in `static/math-sky.js` ranks topics (quiz points lost, recent wrong answers, unfinished, fading) with weights in `FOCUS`. -- **Exam preparation.** `prepExams`, `prepSteps`, `prepPlan`, `prepDone` and `drawPrep` build the per-exam plan. Its last step `{k:"exam"}` starts the practice exam preset to the exam's units. -- **Labels.** About 49 occurrences of "בוחן סופי", "בוחן תרגול" and "מבחן תרגול" across `static/*.js` and `app/*.py`. - -## Goals / Non-Goals - -**Goals:** -- Reuse the practice-exam engine for all three quizzes instead of adding a second quiz system. -- Keep everything on the device and in synced progress, as the practice exam is today. No new server routes or tables. -- Keep the expected-success estimate, its weights and the quiz targets in one constant table, tested. - -**Non-Goals:** -- Teacher views of the new quizzes, confidence marks or reflections (a later change can add them to the focus profile). -- Open-answer or photo questions in these quizzes. They stay multiple-choice; handwritten work stays in unit quizzes. -- New content. Topics with few questions limit fully fresh retakes (see Risks). -- Changing server field names (`mode: practice|final`) or stored grades. - -## Decisions - -### D1. Two views from one, chosen by `VIEW` -Split `pathView()` into `homeView()` and `pathView()`. -- `TABS` becomes `home` ("בית"), `path` ("מסלול"), `sky` ("האוסף"), and `VIEW` starts as `"home"`. -- `homeView` renders `topBar`, `classesCard` (only when it asks the student to act), the exam item, the quizzes, `tasksSummary`, `assignmentsCard`, `commentsCard` with only unseen comments, and the "continue the path" button. -- `pathView` keeps `topBar`, `daily`, `reviewCard`, `patternsCard` and the trail. -- `examSoon` and `quizCard` are replaced by the exam item and the quiz cards. -- Links that open the trail (`data-view="path"` from the collection, "continue") keep working because they already name `path`. -- A class teacher outside preview gets `home` showing their classes, and `path` is left out of `TABS`. - -*Alternative:* collapse cards on one long screen. Rejected: the screen still opens on the clutter, which is the problem. - -### D2. Expected success per topic: `Sky.chance(P, id)` -A small Bayesian estimate: -- wrong = the larger of `P.wrongs[id]` (D6) and the topic's entries in `P.slips`. Every wrong multiple-choice answer carries a mistake tag, so the slips hold the history from before `P.wrongs` existed (up to 500). -- chance = `(tries − wrong + 1) / (tries + 2)`, with wrong capped at tries. -- Adjustments: finished → at least 0.8; gold → at least 0.9; fading → minus 0.1. -- Fewer than 5 answers → "unknown" (`null`). -- Constants live in a `CHANCE` table next to `FOCUS`. - -*Alternative:* reuse `Sky.focus` scores. Rejected: a ranking is not a probability, and the quizzes need an expected score. - -### D3. Choosing questions for a target: `Sky.pickQuiz(P, ids, {target, n, seen})` -1. Eligible topics are those started (`P.tries` or `P.seen` or `P.missed`). Topics never practised are out. -2. Known topics (chance not `null`) are split into "close" (unfinished, or chance < 0.75) and "solid". -3. Greedy fill: take questions from close topics, at most 3 per topic, rotating so no topic dominates. Add solid topics while the running mean chance is below `target`. Stop at `n`. -4. If fewer than `n`, fill from unknown topics, most recently taught first (by `month`, then `ORDER`). -5. Inside a topic, choose multiple-choice questions not in `seen`. If none remain, choose the one seen longest ago. - -Targets are 0.70 (quiz 1) and 0.80 (quiz 2). The function returns the questions and their expected score, which tests check against the spec's bands. It lives in `math-sky.js` so it can be tested without the page. - -### D4. One quiz engine with a kind -`QZ` and the stored entries in `P.quizzes` gain: -- `kind` (`s1`, `s2`, `exam`), `exam` (the exam key or `null`) and `qs` (`"id:qi"` keys). -- for the exam-like quiz: `sure` (per-question confidence) and `note` (the reflection). - -The engine has two behaviours: -- **Feedback mode (`s1`, `s2`):** a pick is final. It shows right or wrong and the mistake's tip, and after a wrong answer offers the worked example (`exampleCard`), then "next". Skill names stay hidden. -- **Exam mode (`exam`):** the current practice-exam flow, plus a three-button confidence row under the choices and the reflection field on the result. - -The exam-like quiz draws questions spread over the exam's units with the current `quizStart` proportions, restricted to started topics and avoiding `seen`. - -`P.quizzes` grows from the last 20 entries to the last 60, so a few weeks of three quizzes are kept. `mergeProgress` already joins entries by `at`. The new fields ride along unchanged. - -*Alternative:* store quiz attempts on the server. Rejected for now: no grade here is official, and the practice exam already syncs through progress. - -### D5. Which quizzes home shows -`homeQuizzes()`: -- When `prepExams()[0]` is 7 days away or less, it returns `s1`, `s2` and `exam` for that exam's units. -- Otherwise it returns `s1` and `s2` over the units taught so far (the current `quizUnits()` rule without an exam). - -Each card shows: -- its recommended days and whether it is recommended today (the spec's day bands) -- the best `right/n` over attempts of that kind and exam (or with `exam: null`) -- the change from the previous attempt -- "can't start yet" with the topics to learn when fewer than 6 questions can be drawn - -`prepSteps` replaces `{k:"exam"}` with three steps `{k:"quiz", kind}`. `prepDone` checks for an attempt of that kind and exam after the plan was opened. Plans already stored with `{k:"exam"}` are rebuilt once when read (the step list is derived data). - -### D6. Small additions to answer recording -- `Sky.wrong` counts every wrong answer in `P.wrongs[id]`, and quiz answers update `P.tries` and `P.wrongs` like practice. -- `mergeProgress` merges `wrongs` with "most", like `tries`. - -### D7. Labels in one table -Add one `TERMS` table in `math.js` (`quiz: "בוחן"`, `exam: "מבחן"`, and the full phrases used) and replace the 49 occurrences, the guide texts and the teacher report's tab name ("בחנים סופיים" → "מבחנים"). Python strings seen by users (route error messages shown in the UI) are changed in place. The grades page shows a practice unit quiz's best grade first, then the latest when it differs; the server already returns all sittings, so this is front-end only. - -### Relation to in-flight changes -`improve-student-teacher-loop` is implemented but not archived. This change narrows its specs as follows, so its main specs should be synced before this one is archived: -- `exam-preparation` "Student gets a preparation plan": the last step becomes the three quizzes. -- `student-gradebook`: practice shows best first. The words "בוחן סופי" and "תרגול" in its scenarios become "מבחן" and "בוחן". -- `unit-quiz-modes` "Confirmation": the button text becomes "התחלת המבחן". -- `student-task-hub`: the home summary now lives on the new home tab. - -At archive time these become MODIFIED deltas against the synced main specs. - -## Risks / Trade-offs - -- [Topics have about 10 questions each, so fresh retakes run out after 2–3 attempts per topic] → fall back to the questions seen longest ago; the card says when questions start to repeat. More questions can be added to the content later without spec changes. -- [The estimate is rough, especially before `P.wrongs` has data] → targets are bands, not exact; the weights live in one tested table and can be tuned. -- [Students lose the cards they're used to seeing on home] → the tab bar names "מסלול", and the "continue" button leads there; the guide explains the split. -- [Renaming 49 strings breaks browser tests that look for old text] → change tests in the same task as the strings, and add a test that none of the old phrases appear. -- [Confidence and reflection go unused] → both are optional and cheap. Usage can be checked later in synced progress. - -## Migration Plan - -1. Front-end only; deploy as one release. Existing `P.quizzes` entries without `kind` are shown as earlier general quizzes and do not count toward the exam quizzes. -2. Stored prep plans with the old practice-exam step are rebuilt on first read. -3. Rollback: revert the front end. Extra fields in `P.quizzes` and `P.wrongs` are ignored by old code. diff --git a/openspec/changes/student-home-and-exam-quizzes/proposal.md b/openspec/changes/student-home-and-exam-quizzes/proposal.md deleted file mode 100644 index da6acbae89e94802ea55f8594e9b4c8d2ce5a1a8..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/proposal.md +++ /dev/null @@ -1,56 +0,0 @@ -# Proposal - -## Why - -The student home screen stacks about ten cards (tasks, comments, assignments, daily goal, review, mistake patterns, exam countdown, practice exam) above the learning path, so a student can't see what matters today. The app also uses "quiz" and "exam" inconsistently ("בוחן סופי", "בוחן תרגול", "מבחן תרגול"). And before a school exam, it offers one generic practice exam instead of practice matched to each student. The November Grade 9 exam (15–16.11.2026) is the first real case. - -## What Changes - -**Terms (shown to students and teachers, in Hebrew)** -- **בוחן (quiz):** can be retaken, the best grade counts, chosen for each student. -- **מבחן (exam):** handed in once. -- The practice unit-quiz sitting is shown as a בוחן, the final unit-quiz sitting as a מבחן, and the mixed "מבחן תרגול" becomes a בוחן. Server names (`mode: practice|final`) do not change. -- For a practice unit quiz, the best grade is the one shown as its grade; the latest stays visible. The official grade of a unit is still the latest final sitting. - -**Home and path** -- The student's **בית** (home) tab shows only things that have a date or need action: - - the next exam on the class exam table (countdown, link to its preparation) - - up to 3 quizzes - - work that is due - - new teacher comments - - a "continue the path" button, so home is never empty -- A new **מסלול** (path) tab holds the trail of units and topics, the daily goal, spaced review and the recurring-mistakes card. -- A teacher's home (their classes) does not change. - -**Three quizzes before an exam** -- When an exam that names units is 7 days away or less, the student gets three quizzes of 12 multiple-choice questions: - 1. **בוחן חיזוק**: topics chosen so the student is expected to get about 70% right, mostly topics they are close to mastering. - 2. **בוחן חיזוק**: about 80% expected, with more topics they already know. - 3. **בוחן כמו במבחן**: only the exam's units, mixed, with topic names hidden. -- Quizzes 1–2 give feedback after each answer, with the worked example after a wrong one. -- Quiz 3 gives feedback only at the end, with at most 3 things to fix. It also has an optional "how sure are you?" per answer and a one-line reflection. -- Every retake draws new questions, and the best grade counts. -- Recommended days before the exam: quiz 1 at 7–4, quiz 2 at 5–3, quiz 3 at 3–2. Home marks the one recommended for today. -- With no exam in the next 7 days, home offers the two strengthening quizzes over the units taught so far. -- Wording on screen never says "weakness". Results are compared only with the student's own earlier attempts. -- Topics a student has not started are not quizzed; they stay in the preparation plan as "to learn". A topic with fewer than 5 answers falls back to the topics taught most recently. -- The exam preparation plan's last step ("מבחן תרגול על החומר") becomes the three quizzes. - -Nothing here is **BREAKING** for stored data: existing practice-exam results (`P.quizzes`) stay and are shown as earlier quizzes. - -## Capabilities - -### New Capabilities -- `student-home`: what the student's home tab and path tab each show, their order and the empty state. -- `exam-quizzes`: the three quizzes before an exam (and the two without one): how questions are chosen for each student, feedback, retakes with new questions, best grade, recommended days, confidence and reflection. -- `assessment-terms`: the בוחן / מבחן names across student and teacher screens, and which grade a quiz shows. - -### Modified Capabilities -None under `openspec/specs/` (the main specs directory is empty). This change builds on capabilities still held in the unarchived `improve-student-teacher-loop` change: `exam-preparation` (the plan's last step is replaced by the three quizzes), `unit-quiz-modes` and `student-gradebook` (names and the best grade shown for practice), and `student-task-hub` (its home summary now sits on the new home). See design.md, "Relation to in-flight changes". - -## Impact - -- **Front end**: `static/math.js` (tabs and views, `pathView` split into home and path, the practice exam in `quizSetup`/`quizStart`/`quizSubmit` becomes the quiz engine, prep-plan steps, labels), `static/math-sky.js` (a per-topic expected-success estimate next to `Sky.focus`), `static/math.css` (home layout, quiz cards), `static/guide.js` (student and teacher guide). -- **Server**: no new routes or tables. Quiz results stay in the student's synced progress (`P.quizzes`, merged in `mergeProgress`). -- **Content**: none required. Topics with few questions limit how many retakes can be fully new (see design). -- **Tests**: `tests/test_sky_browser.py` (estimate and question choice), `tests/test_exam_prep_browser.py`, a new Playwright flow for home and path, and existing browser tests that open the home screen. diff --git a/openspec/changes/student-home-and-exam-quizzes/specs/assessment-terms/spec.md b/openspec/changes/student-home-and-exam-quizzes/specs/assessment-terms/spec.md deleted file mode 100644 index d1c78cd69c4682347f6bdcd80b8fc315de0c466c..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/specs/assessment-terms/spec.md +++ /dev/null @@ -1,33 +0,0 @@ -# Spec Delta - -## Purpose - -Uses one pair of names on every student and teacher screen: a בוחן (quiz) can be retaken and its best grade counts, a מבחן (exam) is handed in once. Students and teachers can then tell at a glance what kind of test they are looking at. - -## ADDED Requirements - -### Requirement: Quiz and exam names -Every test a student can retake SHALL be called "בוחן", and every test handed in once SHALL be called "מבחן", on student and teacher screens and in the user guide. A practice unit-quiz sitting SHALL be a בוחן, a final one a מבחן. The mixed practice test SHALL be a בוחן. School exams on the exam table SHALL stay "מבחן". - -#### Scenario: Final unit quiz -- **WHEN** the teacher opened the final unit quiz of `k` and a student sees it in their task list -- **THEN** it is named "מבחן: דלתון", and the start button reads "התחלת המבחן" - -#### Scenario: Practice unit quiz -- **WHEN** a student opens the practice unit quiz of `k` -- **THEN** it is titled "בוחן מסכם", with the unit's name "דלתון" next to the title - -#### Scenario: Old names gone -- **WHEN** any student or teacher screen is shown -- **THEN** none of "בוחן סופי", "בוחן תרגול" or "מבחן תרגול" appears - -### Requirement: A quiz shows its best grade -For a practice unit quiz, the grade shown to the student and on their grades page SHALL be their best handed-in grade, with the latest shown next to it when different. The official grade of a unit SHALL stay the grade of the latest handed-in final sitting. - -#### Scenario: Best and latest -- **WHEN** a student got 85 and then 70 in practice sittings of unit `k` -- **THEN** the grades page shows "בוחן: 85" with "אחרון: 70" - -#### Scenario: Official grade unchanged -- **WHEN** the student got 62 in the final sitting of `k` and 90 in a later practice sitting -- **THEN** the official grade of `k` stays 62, shown as "מבחן: 62" diff --git a/openspec/changes/student-home-and-exam-quizzes/specs/exam-quizzes/spec.md b/openspec/changes/student-home-and-exam-quizzes/specs/exam-quizzes/spec.md deleted file mode 100644 index 1398621c6f0ceed3d4e9f29094f707356578a6dd..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/specs/exam-quizzes/spec.md +++ /dev/null @@ -1,122 +0,0 @@ -# Spec Delta - -## Purpose - -Gives each student quizzes chosen for them before an exam: two strengthening quizzes aimed at a comfortable success rate, then a quiz like the exam, with fresh questions on every retake and the best grade counting. - -## ADDED Requirements - -### Requirement: Three quizzes before an exam -When the student's next exam names units and is 7 days away or less, home SHALL offer three quizzes for it: "בוחן חיזוק 1", "בוחן חיזוק 2" and "בוחן כמו במבחן". Each SHALL have 12 multiple-choice questions taken from the topics of the exam's units. - -#### Scenario: Exam in 6 days -- **WHEN** the math exam naming units `t`, `t2`, `k`, `l`, `o` is in 6 days -- **THEN** home shows the three quizzes, each with 12 questions from those units only - -#### Scenario: Exam in 10 days -- **WHEN** the next exam is 10 days away -- **THEN** home does not show the three exam quizzes - -### Requirement: Two quizzes without an exam -When no exam naming units is 7 days away or less, home SHALL offer the two strengthening quizzes over the units taught so far by the class schedule, and no exam-like quiz. - -#### Scenario: Quiet week -- **WHEN** the class has no exam in the next 7 days and it is November -- **THEN** home shows "בוחן חיזוק 1" and "בוחן חיזוק 2" over the units scheduled up to November - -### Requirement: Strengthening quizzes aim at a set success rate -Each topic SHALL have an estimated chance that the student answers it right, from their answers so far. Quiz 1 SHALL choose topics so the expected score is about 70%, quiz 2 about 80%. Both SHALL prefer topics the student has started but not mastered, and fill the rest with topics they finished. - -#### Scenario: Mostly near-mastered topics -- **WHEN** a student has 4 started-but-unfinished topics and 8 finished topics in the exam's units -- **THEN** quiz 1 draws most of its questions from the 4 started topics, and its expected score is between 65% and 75% - -#### Scenario: Easier second quiz -- **WHEN** the same student opens quiz 2 -- **THEN** it has more questions from finished topics than quiz 1, and its expected score is between 75% and 85% - -### Requirement: Topics not started are not quizzed -A topic the student has never practised MUST NOT appear in any of the three quizzes. If fewer than 6 questions remain, the quiz SHALL NOT start; it SHALL list the topics to learn first, each opening that topic. With 6 to 11, it SHALL be shorter. - -#### Scenario: Not started yet -- **WHEN** the student never opened the median-to-hypotenuse topics of unit `o` -- **THEN** none of the quizzes asks about them, and the preparation plan lists them as topics to learn - -#### Scenario: Too little practised -- **WHEN** only 4 questions can be drawn from the topics the student started -- **THEN** the quiz cannot be started, and it shows the topics to learn first - -### Requirement: Little data falls back to recent topics -A topic with fewer than 5 answers SHALL NOT be treated as known or as needing work. When a strengthening quiz cannot reach 12 questions from topics with enough answers, it SHALL fill the rest from the most recently taught topics the student has started. - -#### Scenario: New student -- **WHEN** a student has 2 answers in each of their started topics -- **THEN** quiz 1 is drawn from the most recently taught started topics, not ranked by their answers - -### Requirement: Strengthening quizzes give feedback right away -In both strengthening quizzes, the student SHALL see after each answer whether it was right, and the tip of a wrong answer's mistake. After a wrong answer, the topic's worked example SHALL be offered before moving on. - -#### Scenario: Wrong answer -- **WHEN** a student picks a wrong choice tagged with a mistake in quiz 1 -- **THEN** the choice is marked wrong, the right one is shown, the mistake's tip appears and "לראות דוגמה פתורה" is offered - -### Requirement: Exam-like quiz gives feedback at the end -The exam-like quiz SHALL hide topic names, mix questions from all the exam's units, and give no feedback until it is handed in. The result SHALL show the score, the score per unit and at most 3 things to fix, each linking to its topic. - -#### Scenario: Handing in -- **WHEN** a student hands in the exam-like quiz with mistakes of 5 different kinds -- **THEN** the result shows the score, the score per unit and the 3 most frequent mistakes, each with a button to practise its topic - -### Requirement: Confidence and reflection in the exam-like quiz -Each question of the exam-like quiz SHALL offer an optional "how sure are you?" with three levels. The result SHALL list answers marked sure that were wrong, and offer an optional one-line reflection (up to 140 characters) kept with the result. Neither SHALL be required to hand in. - -#### Scenario: Sure but wrong -- **WHEN** a student marked 2 answers "בטוח/ה" and both were wrong -- **THEN** the result lists those 2 questions under "הייתי בטוח/ה וטעיתי" - -#### Scenario: Skipping both -- **WHEN** a student answers without marking confidence and leaves the reflection empty -- **THEN** the quiz is handed in and scored as usual - -### Requirement: Retakes draw new questions -Each quiz SHALL be retakeable any number of times. A retake SHALL NOT repeat questions the student saw in that quiz's earlier attempts for the same exam, while unseen questions remain for the chosen topics. When none remain, the questions seen longest ago SHALL be used first. - -#### Scenario: Second attempt -- **WHEN** a student retakes quiz 1 for the November exam -- **THEN** none of its 12 questions appeared in their first attempt of quiz 1 - -### Requirement: The best grade counts -Each quiz SHALL show the student's best grade and how the latest attempt compares with their previous one. Results MUST NOT be compared with other students. - -#### Scenario: Improvement -- **WHEN** a student got 7 of 12, then 10 of 12 in quiz 1 -- **THEN** quiz 1 shows "הכי טוב: 10/12" and "+3 מהפעם הקודמת" - -#### Scenario: Lower retake -- **WHEN** the student then gets 8 of 12 -- **THEN** quiz 1 still shows "הכי טוב: 10/12" - -### Requirement: Recommended day for each quiz -Each quiz SHALL show its recommended days: quiz 1 from 7 to 4 days before the exam, quiz 2 from 5 to 3, the exam-like quiz from 3 to 2. Home SHALL mark the quizzes recommended for today. All three SHALL be available from 7 days before the exam until the exam day. - -#### Scenario: Three days before -- **WHEN** the exam is in 3 days -- **THEN** quiz 2 and the exam-like quiz are marked "מומלץ להיום", and quiz 1 can still be started - -### Requirement: No weakness wording -Quiz names, descriptions and results MUST NOT call topics or students weak. Topics to work on SHALL be named as topics to strengthen or practise. - -#### Scenario: Result wording -- **WHEN** a quiz result lists topics with lost points -- **THEN** they are introduced as "כדאי לחזק", never with the word "חולשה" or "חלש" - -### Requirement: Quizzes complete the preparation plan -The exam preparation plan's final step SHALL be the three quizzes instead of one practice exam. Each SHALL be checked off when the student hands in an attempt after the plan was opened. - -#### Scenario: Plan steps -- **WHEN** the student opens the plan of the November exam -- **THEN** its last three steps are "בוחן חיזוק 1", "בוחן חיזוק 2" and "בוחן כמו במבחן" - -#### Scenario: Step done -- **WHEN** the student hands in quiz 1 after opening the plan -- **THEN** that step is shown as done diff --git a/openspec/changes/student-home-and-exam-quizzes/specs/student-home/spec.md b/openspec/changes/student-home-and-exam-quizzes/specs/student-home/spec.md deleted file mode 100644 index 24ef1cd130f87e0e673f8f02ed85a1441e5378ec..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/specs/student-home/spec.md +++ /dev/null @@ -1,69 +0,0 @@ -# Spec Delta - -## Purpose - -Splits the student's screen into a home tab that shows only what has a date or needs action, and a path tab for self-paced learning, so a student sees at a glance what matters today. - -## ADDED Requirements - -### Requirement: Student has a home tab and a path tab -A signed-in student SHALL have a "בית" tab and a "מסלול" tab, next to the existing collection tab. The app SHALL open on "בית". A teacher looking at the app as a student SHALL see the same tabs. - -#### Scenario: Opening the app -- **WHEN** a student opens the math app -- **THEN** the "בית" tab is selected, and "מסלול" and "האוסף" are offered in the tab bar - -#### Scenario: Teacher preview -- **WHEN** a teacher opens the student preview -- **THEN** the preview shows the "בית" and "מסלול" tabs as a student sees them - -### Requirement: Home shows only dated or actionable items -The home tab SHALL show, in this order: the next exam on the student's class exam table, up to 3 quizzes, the work that is due (the task summary and open assignments), and teacher comments the student has not seen. It MUST NOT show the trail of units, the daily goal card, spaced review or the recurring-mistakes card. - -#### Scenario: Busy week -- **WHEN** a student has a math exam in 5 days, an assignment due tomorrow and one new teacher comment -- **THEN** home shows the exam countdown, then the quizzes, then the assignment, then the comment, and no trail - -#### Scenario: Comments already seen -- **WHEN** every teacher comment was already opened by the student -- **THEN** home shows no comments card - -### Requirement: Home links to the next exam -The exam item SHALL show the subject, the date and the days left. When the exam names units, it SHALL open the exam's preparation view. Only the nearest upcoming exam SHALL be shown on home. - -#### Scenario: Exam with units -- **WHEN** the nearest exam is math on 15/11, naming units, and today is 06/11 -- **THEN** home shows "מבחן במתמטיקה · עוד 9 ימים", and tapping it opens the preparation view - -#### Scenario: Exam without units -- **WHEN** the nearest exam names no units -- **THEN** home shows its subject, date and days left, without a link to a preparation view - -### Requirement: Home is never empty -Home SHALL always end with a button that continues the path at the student's next topic. When nothing else is shown, home SHALL say there is nothing due now, above that button. - -#### Scenario: Nothing due -- **WHEN** a student has no exam ahead, no open work, no new comments and no quiz offered -- **THEN** home says there is nothing due now and shows the "continue the path" button - -#### Scenario: Continue -- **WHEN** the student presses "continue the path" -- **THEN** the path tab opens, scrolled to their next topic - -### Requirement: Path tab holds self-paced learning -The path tab SHALL show the daily goal and streak, spaced review, the recurring-mistakes card and the trail of units, in that order. Everything that was on the student's old home screen and is not on the new home SHALL be on the path tab. - -#### Scenario: Review due -- **WHEN** a student has 3 topics due for spaced review -- **THEN** the review card is shown on the path tab, not on home - -#### Scenario: Jump to a unit -- **WHEN** a student taps a constellation in the collection tab -- **THEN** the path tab opens, scrolled to that unit - -### Requirement: Teacher home is unchanged -A class teacher who is not in student preview SHALL keep their current home (their classes) and SHALL NOT get a path tab. - -#### Scenario: Teacher opens the app -- **WHEN** a class teacher opens the math app -- **THEN** they see their classes as before, and the tab bar has no "מסלול" tab diff --git a/openspec/changes/student-home-and-exam-quizzes/tasks.md b/openspec/changes/student-home-and-exam-quizzes/tasks.md deleted file mode 100644 index a486b78689d5f4971bda34de3116886c31cac64d..0000000000000000000000000000000000000000 --- a/openspec/changes/student-home-and-exam-quizzes/tasks.md +++ /dev/null @@ -1,48 +0,0 @@ -# Tasks - -## 1. Quiz and exam names - -- [x] 1.1 Add a `TERMS` table to `static/math.js` and replace every "בוחן סופי", "בוחן תרגול" and "מבחן תרגול" on student and teacher screens (including the report tab "בחנים סופיים" → "מבחנים" and "התחלת הבוחן הסופי" → "התחלת המבחן"); change the user-visible Python strings in place; verify with a new test in `tests/test_sky_browser.py` that renders the student and teacher screens and finds none of the old phrases -- [x] 1.2 Grades page: a practice unit quiz shows its best grade first, then the latest when different; the official grade stays the latest final sitting; verify both scenarios of "A quiz shows its best grade" in the grades-page Playwright flow -- [x] 1.3 Update the existing browser tests that look for the old phrases (`tests/test_unit_quiz.py`, `tests/test_loop_browser.py`, `tests/test_exam_prep_browser.py` and others found by grep); verify `pytest tests -k browser` passes -- [x] 1.4 Update `static/guide.js` (student and teacher) with the בוחן / מבחן definitions; verify `tests/test_guide_browser.py` passes and the guide shows both terms - -## 2. Home and path tabs - -- [x] 2.1 Split `pathView()` into `homeView()` and `pathView()`, set `TABS` to בית / מסלול / האוסף, start on `home`, and leave `path` out of `TABS` for a class teacher outside preview; verify with a Playwright flow that the student opens on home, sees no trail there, and the teacher sees their classes with no "מסלול" tab -- [x] 2.2 Home content in order: the next-exam item (subject, date, days left; opens the prep view when the exam names units), the quiz cards (placeholder until group 4), due work (`tasksSummary`, `assignmentsCard`), and only unseen teacher comments; verify the "Busy week" and "Comments already seen" scenarios in the same flow -- [x] 2.3 "Continue the path" button and the empty state; the button opens the path tab scrolled to the next topic; verify both "Home is never empty" scenarios -- [x] 2.4 Path tab: daily goal, review, recurring mistakes, then the trail; collection links still jump to a unit; verify "Review due" and "Jump to a unit" -- [x] 2.5 Fix the existing browser tests that expect cards or the trail on the first screen (`tests/test_sky_browser.py`, `tests/test_focus_browser.py`, `tests/test_loop_browser.py` and others); verify the full browser suite passes -- [x] 2.6 Explain the home and path tabs in the student guide; verify the guide test passes - -## 3. Expected success and question choice - -- [x] 3.1 Record every wrong answer in `P.wrongs[id]` and merge it with "most" in `mergeProgress`; verify with a merge case in `tests/test_sky_browser.py` -- [x] 3.2 `Sky.chance(P, id)` with the `CHANCE` constants table (unknown under 5 answers, gold/finished/fading adjustments); verify with unit cases for each rule -- [x] 3.3 `Sky.pickQuiz(P, ids, {target, n, seen})` (started topics only, close before solid, at most 3 per topic, unknown topics most-recent-first, unseen questions first, oldest-seen fallback); verify with unit cases: expected score within 65–75% for target 0.70 and 75–85% for 0.80, no unstarted topic, the cold-start fallback, and no repeat while unseen questions remain - -## 4. The three quizzes - -- [x] 4.1 Extend the quiz engine with `kind`, `exam` and `qs`; raise `P.quizzes` to the last 60; verify an attempt is stored with its kind and questions and survives `mergeProgress` -- [x] 4.2 Feedback mode for `s1`/`s2`: a final pick, right/wrong with the mistake's tip, the worked example after a wrong answer, then next; verify the "Wrong answer" scenario with a Playwright flow -- [x] 4.3 Exam-like mode: exam units only, topic names hidden, no feedback until hand-in, result with per-unit score and at most 3 things to fix; verify the "Handing in" scenario -- [x] 4.4 Optional confidence row per question and the reflection field (≤140 characters) on the exam-like result; list "sure but wrong"; verify "Sure but wrong" and "Skipping both" -- [x] 4.5 `homeQuizzes()`: three quizzes when an exam naming units is ≤7 days away, otherwise two over the units taught so far; recommended-day bands and "מומלץ להיום"; best grade and change from the previous attempt; the "can't start yet" state with topics to learn (fewer than 6 questions); verify "Exam in 6 days", "Exam in 10 days", "Quiet week", "Three days before", "Improvement", "Lower retake" and "Too little practised" with a fixed clock -- [x] 4.6 Replace the old practice-exam card and setup entry points with the new quizzes (the assignment `exam` item still opens a quiz preset to its units); verify an existing practice-exam assignment still opens and counts as done -- [x] 4.7 Wording check: names, descriptions and results never use "חולשה" or "חלש"; verify with a test over the rendered quiz cards and results -- [x] 4.8 Explain the three quizzes, retakes and best grade in the student guide; verify the guide test passes - -## 5. Preparation plan - -- [x] 5.1 `prepSteps` ends with the three quiz steps instead of the practice exam, `prepDone` checks attempts of that kind and exam after the plan opened, and stored plans with the old step are rebuilt once; verify "Plan steps" and "Step done" in `tests/test_exam_prep_browser.py` -- [x] 5.2 Unstarted topics of the exam's units appear as "to learn" steps and are not quizzed; verify the "Not started yet" scenario - -## 6. Integration checks - -- [x] 6.1 End-to-end Playwright scenario with a fixed date 6 days before an exam naming `t`, `t2`, `k`, `l`, `o`: the student opens home → sees the exam and three quizzes → takes quiz 1 with feedback → retakes it with new questions → takes the exam-like quiz with confidence marks → the prep plan shows the quiz steps done → the path tab still shows review and the trail -- [ ] 6.2 Run the full test suite (`pytest`) and `openspec validate student-home-and-exam-quizzes --strict`; both pass - -## Workflow follow-up - -- Sync the specs of `improve-student-teacher-loop` into `openspec/specs/` (archive it) before archiving this change, then turn the narrowed requirements listed in design.md ("Relation to in-flight changes") into MODIFIED deltas. diff --git a/openspec/specs/accounts-and-classes/spec.md b/openspec/specs/accounts-and-classes/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..01cad127db53743fd629afa0bc2f36644ccbf689 --- /dev/null +++ b/openspec/specs/accounts-and-classes/spec.md @@ -0,0 +1,61 @@ +# accounts-and-classes Specification + +## Purpose + +Lets students and teachers sign in with their school Google accounts, and lets a teacher create classes and add students, so every other feature knows who the student is and which class they belong to. + +## Requirements + +### Requirement: Google sign-in +Students and teachers SHALL sign in with their Google account. The app MUST NOT show any student content before sign-in. + +#### Scenario: Signing in +- **WHEN** a student opens the app and signs in with Google +- **THEN** they see the app as a student + +#### Scenario: Not signed in +- **WHEN** someone opens the app without signing in +- **THEN** only the sign-in screen is shown + +### Requirement: Teacher accounts +Only accounts listed as teachers in the app's settings SHALL get the teacher screens. Every other signed-in account SHALL be treated as a student. + +#### Scenario: Listed teacher +- **WHEN** an account listed as a teacher signs in +- **THEN** they see the teacher screens + +#### Scenario: Not listed +- **WHEN** an account not listed as a teacher signs in +- **THEN** they see no teacher screens + +### Requirement: Teacher creates classes +A teacher SHALL be able to create a class with a name and see the classes they created. + +#### Scenario: New class +- **WHEN** a teacher creates the class "ט'3" +- **THEN** "ט'3" appears in their list of classes + +### Requirement: Teacher adds students by email +A teacher SHALL be able to add students to a class by their email addresses, one or many at once, and remove them. A student SHALL belong to one class at a time. + +#### Scenario: Adding a list +- **WHEN** a teacher pastes 25 email addresses into class "ט'3" +- **THEN** the 25 students are listed in "ט'3" + +#### Scenario: Student in another class +- **WHEN** a teacher adds a student who already belongs to another class +- **THEN** the teacher is told which class the student is in, and the student is not added twice + +### Requirement: Student not in a class +A signed-in student who is in no class SHALL see a message asking them to ask their teacher to add them, showing the email they signed in with. + +#### Scenario: Not added yet +- **WHEN** a student signs in before the teacher added their email +- **THEN** they see the message with their email, and no lessons + +### Requirement: Fresh start +The new app SHALL start with no students, classes or progress. Nothing SHALL be imported from the current app. + +#### Scenario: First teacher sign-in +- **WHEN** a teacher signs in to the new app for the first time +- **THEN** they have no classes, even if they had classes in the current app diff --git a/openspec/specs/app-basics/spec.md b/openspec/specs/app-basics/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..f4d055931e99acf25d9817c1366c2a79c8b8695f --- /dev/null +++ b/openspec/specs/app-basics/spec.md @@ -0,0 +1,21 @@ +# app-basics Specification + +## Purpose + +Sets the rules every Mathly screen follows: Hebrew right-to-left, phone first, and grades kept on the server. + +## Requirements + +### Requirement: Hebrew, right-to-left, phone first +Every screen SHALL be in Hebrew, laid out right-to-left, and designed for phones first. + +#### Scenario: Opening on a phone +- **WHEN** a student opens the app on a phone +- **THEN** the screen is in Hebrew, right-to-left, and fits the phone's width + +### Requirement: Grades that count are kept on the server +Quiz, exercise test and simulation grades SHALL be computed and stored on the server, so a student cannot change them from the device. + +#### Scenario: Tampered device +- **WHEN** a student changes a grade stored on their device +- **THEN** the grade shown to them and the teacher is still the server's grade diff --git a/openspec/specs/exercise-bank/spec.md b/openspec/specs/exercise-bank/spec.md new file mode 100644 index 0000000000000000000000000000000000000000..f6d1f1186363bedbaa2f19149c4e6fb60508e001 --- /dev/null +++ b/openspec/specs/exercise-bank/spec.md @@ -0,0 +1,28 @@ +# exercise-bank Specification + +## Purpose + +Defines the exercise bank kept from the current app as the source of lessons, skills, questions and mistakes, and how its math is shown. + +## Requirements + +### Requirement: Bank is the content source +Lessons, skills, multiple-choice questions and mistakes SHALL come from the exercise bank kept from the current app. Each wrong choice of a question SHALL point to a mistake with a name, a tip and the skill to go back to. + +#### Scenario: Wrong choice +- **WHEN** a student picks a wrong choice +- **THEN** the mistake it points to supplies the feedback's name and tip + +### Requirement: Math is rendered +Math written in LaTeX inside `$…$` in the bank SHALL be rendered as math in the app. + +#### Scenario: Question with math +- **WHEN** a question's text contains `$x^2+5x+6$` +- **THEN** the student sees it as a formatted formula + +### Requirement: Content gaps are filled before use +Worked examples, faded examples, "why this step?" choices and quizzes for every lesson SHALL be added to the bank, since it lacks them today. Each skill SHALL have enough questions for similar questions and for retakes that draw new questions. + +#### Scenario: Skill without a worked example +- **WHEN** a skill has no worked example in the bank yet +- **THEN** it is listed as a content gap to fill