fix: update course level names from "רמה" to "שלב" for consistency
Browse files- README.md +1 -1
- app/workbook.py +1 -1
- static/index.html +1 -1
- tests/test_scoring.py +1 -1
README.md
CHANGED
|
@@ -106,7 +106,7 @@ The page's "ההתקדמות שלי" button reads these rows back through `GET /
|
|
| 106 |
|
| 107 |
### Levels
|
| 108 |
|
| 109 |
-
The course has levels, each with a planned number of lessons (`LEVELS` in `app/workbook.py`:
|
| 110 |
|
| 111 |
A lesson's homework in the workbook, sentences of the student's own, is a topic of the kind `"write"`, the lesson's last ("כתיבת משפטים": `l1-hw`, `l2-hw`). It has no sentences to say: its task and the number of sentences are in `WRITING` in `app/workbook.py`, and on the path it opens a box with the task and a line for each sentence; it is done once every line is filled. Nothing is scored, so the lesson's count of practised sentences leaves it out.
|
| 112 |
|
|
|
|
| 106 |
|
| 107 |
### Levels
|
| 108 |
|
| 109 |
+
The course has levels, each with a planned number of lessons (`LEVELS` in `app/workbook.py`: שלב א and שלב ב, 10 lessons each). Every lesson in `LESSONS` is keyed by its level and number, `(level, lesson)`; one outside the plan stops the app at startup. The path shows each level under its name, and the lessons not written yet as "בקרוב". Level 1's lessons keep their first ids ("1", topics "l1-…") so recorded attempts and saved classes still match; later levels' are "2.1", topics "l2.1-…".
|
| 110 |
|
| 111 |
A lesson's homework in the workbook, sentences of the student's own, is a topic of the kind `"write"`, the lesson's last ("כתיבת משפטים": `l1-hw`, `l2-hw`). It has no sentences to say: its task and the number of sentences are in `WRITING` in `app/workbook.py`, and on the path it opens a box with the task and a line for each sentence; it is done once every line is filled. Nothing is scored, so the lesson's count of practised sentences leaves it out.
|
| 112 |
|
app/workbook.py
CHANGED
|
@@ -1558,7 +1558,7 @@ COMPARATIVES = [
|
|
| 1558 |
|
| 1559 |
# The course's levels: level -> (name, how many lessons it will have). A level's lessons that are not in LESSONS yet
|
| 1560 |
# are shown on the path as "בקרוב".
|
| 1561 |
-
LEVELS = {1: ("
|
| 1562 |
# A level whose workbook goes on counting from the one before: the number its first lesson is shown with. The
|
| 1563 |
# lessons' keys and ids still count from 1 within the level ((2, 1), "2.1").
|
| 1564 |
FIRST_LESSON = {2: 10}
|
|
|
|
| 1558 |
|
| 1559 |
# The course's levels: level -> (name, how many lessons it will have). A level's lessons that are not in LESSONS yet
|
| 1560 |
# are shown on the path as "בקרוב".
|
| 1561 |
+
LEVELS = {1: ("שלב א", 10), 2: ("שלב ב", 10)}
|
| 1562 |
# A level whose workbook goes on counting from the one before: the number its first lesson is shown with. The
|
| 1563 |
# lessons' keys and ids still count from 1 within the level ((2, 1), "2.1").
|
| 1564 |
FIRST_LESSON = {2: 10}
|
static/index.html
CHANGED
|
@@ -2201,7 +2201,7 @@ function drawManage(){
|
|
| 2201 |
}
|
| 2202 |
function showMode(mode){ mMode=mode; store.set("ihki.mmode",mode); drawManage(); }
|
| 2203 |
for(const b of $("mModes").children) b.onclick=()=>showMode(b.dataset.mode);
|
| 2204 |
-
const lessonsLine=ls=>byLevel(ls).map(g=>`${g.level.name}: ${lessonsWord(g.lessons)} (${g.lessons.filter(l=>!l.soon).length} מוכנים)`).join(" · "); // "
|
| 2205 |
/* The classes' part: a card per class with what it is made of, and its buttons: edit, delete, and on to its students' progress. */
|
| 2206 |
function drawClasses(classes){
|
| 2207 |
const box=$("mClasses"); box.innerHTML="";
|
|
|
|
| 2201 |
}
|
| 2202 |
function showMode(mode){ mMode=mode; store.set("ihki.mmode",mode); drawManage(); }
|
| 2203 |
for(const b of $("mModes").children) b.onclick=()=>showMode(b.dataset.mode);
|
| 2204 |
+
const lessonsLine=ls=>byLevel(ls).map(g=>`${g.level.name}: ${lessonsWord(g.lessons)} (${g.lessons.filter(l=>!l.soon).length} מוכנים)`).join(" · "); // "שלב א: שיעורים 1–10 (2 מוכנים)"
|
| 2205 |
/* The classes' part: a card per class with what it is made of, and its buttons: edit, delete, and on to its students' progress. */
|
| 2206 |
function drawClasses(classes){
|
| 2207 |
const box=$("mClasses"); box.innerHTML="";
|
tests/test_scoring.py
CHANGED
|
@@ -147,7 +147,7 @@ def test_api_end_to_end_with_stub_model():
|
|
| 147 |
shown = {c["id"] for c in ph["categories"]} # the phrases of no lesson are in the bank, not on the page
|
| 148 |
assert len(ph["phrases"]) == sum(p["cat"] in shown for p in PHRASES) and "ipa" not in ph["phrases"][0]
|
| 149 |
assert TOILET["cat"] not in shown and [l["id"] for l in ph["lessons"] if not l.get("soon")] == ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9"]
|
| 150 |
-
assert len(ph["lessons"]) == 20 and [v["name"] for v in ph["levels"]] == ["
|
| 151 |
pid = PHRASES.index(TOILET)
|
| 152 |
r = c.post("/api/score", data={"phrase_id": pid}, files={"audio": ("a.wav", buf.getvalue(), "audio/wav")})
|
| 153 |
assert r.status_code == 200, r.text
|
|
|
|
| 147 |
shown = {c["id"] for c in ph["categories"]} # the phrases of no lesson are in the bank, not on the page
|
| 148 |
assert len(ph["phrases"]) == sum(p["cat"] in shown for p in PHRASES) and "ipa" not in ph["phrases"][0]
|
| 149 |
assert TOILET["cat"] not in shown and [l["id"] for l in ph["lessons"] if not l.get("soon")] == ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9"]
|
| 150 |
+
assert len(ph["lessons"]) == 20 and [v["name"] for v in ph["levels"]] == ["שלב א", "שלב ב"]
|
| 151 |
pid = PHRASES.index(TOILET)
|
| 152 |
r = c.post("/api/score", data={"phrase_id": pid}, files={"audio": ("a.wav", buf.getvalue(), "audio/wav")})
|
| 153 |
assert r.status_code == 200, r.text
|