Rewrite the Turkish comments and doc comments in English
Browse files at this commit7fec8742a62d2f0ab5a3665d21f2e47a51a89796Parent: a39278e- docs
- rewrite the Turkish comments and doc comments in English
82 changed files +720 -705
- AGENTS.md +3 -0
- README.md +30 -30
- src/ai/insight.rs +2 -2
- src/ai/rag_chat.rs +8 -8
- src/constant.rs +17 -17
- src/db/academic_year.rs +8 -8
- src/db/class_course.rs +3 -3
- src/db/class_course_teacher.rs +1 -1
- src/db/class_group.rs +12 -12
- src/db/class_member.rs +4 -4
- src/db/class_pump.rs +9 -9
- src/db/course.rs +10 -10
- src/db/course_membership.rs +5 -5
- src/db/enrollment.rs +7 -7
- src/db/event.rs +1 -1
- src/db/exam.rs +13 -13
- src/db/exam_answer.rs +1 -1
- src/db/exam_attempt.rs +1 -1
- src/db/exam_audience.rs +5 -5
- src/db/exam_question.rs +1 -1
- src/db/exam_result.rs +14 -14
- src/db/karne.rs +10 -10
- src/db/term.rs +6 -6
- src/db/user.rs +2 -2
- src/domain/academic_year.rs +5 -6
- src/domain/class_blueprint.rs +5 -5
- src/domain/class_course.rs +6 -6
- src/domain/class_group.rs +6 -6
- src/domain/class_member.rs +2 -2
- src/domain/course.rs +7 -7
- src/domain/course_membership.rs +1 -1
- src/domain/event.rs +2 -2
- src/domain/meal_ledger.rs +2 -2
- src/domain/menu_dish.rs +4 -4
- src/domain/message.rs +1 -1
- src/domain/payment_ledger.rs +2 -2
- src/domain/settings.rs +12 -12
- src/domain/term.rs +1 -1
- src/domain/user.rs +2 -2
- src/lib.rs +2 -2
- src/service/academic_year.rs +38 -36
- src/service/class_blueprint.rs +2 -2
- src/service/class_course.rs +15 -13
- src/service/class_group.rs +1 -1
- src/service/class_member.rs +4 -4
- src/service/course.rs +11 -10
- src/service/enrollment.rs +10 -10
- src/service/exam.rs +34 -33
- src/service/exam_attempt.rs +3 -3
- src/service/exam_result.rs +1 -1
- src/service/homework.rs +3 -3
- src/service/instance.rs +12 -12
- src/service/karne.rs +50 -48
- src/service/payment_ledger.rs +6 -6
- src/service/rag_scope.rs +28 -27
- src/service/settings.rs +11 -10
- src/service/term.rs +12 -11
- src/service/user.rs +3 -2
- src/web/academic_years.rs +22 -20
- src/web/appointments.rs +1 -1
- src/web/attendance.rs +21 -21
- src/web/boards.rs +1 -1
- src/web/classes.rs +19 -19
- src/web/courses.rs +19 -19
- src/web/dto.rs +14 -15
- src/web/events.rs +1 -1
- src/web/exams/audience.rs +15 -15
- src/web/exams/mod.rs +2 -2
- src/web/homework.rs +2 -2
- src/web/insights.rs +2 -2
- src/web/instances.rs +30 -30
- src/web/limits.rs +5 -5
- src/web/marks.rs +39 -39
- src/web/meals.rs +4 -4
- src/web/messages.rs +1 -1
- src/web/mod.rs +1 -1
- src/web/payments.rs +6 -6
- src/web/rag.rs +1 -1
- src/web/sessions.rs +1 -1
- src/web/settings.rs +9 -9
- src/web/terms.rs +19 -19
- src/web/users.rs +8 -8
AGENTS.mdmodified+3 -0
| @@ -72,3 +72,6 @@ live `ls src/` win on conflict. | ||
| 72 | 72 | - Commits are emoji + conventional type. Vocabulary in use: `feat`, `fix`, |
| 73 | 73 | `docs`, `test`, `style`, `chore`. Never `refactor` (unused in this repo's |
| 74 | 74 | history). `🎨 style` is reserved for `cargo fmt` commits. |
| 75 | +- Code, comments and commit messages are English. Turkish survives only where | |
| 76 | + it is the data under test (test fixtures, fold tables) or user-visible | |
| 77 | + content (product defaults, OpenAPI examples and descriptions). |
README.mdmodified+30 -30
| @@ -1147,12 +1147,12 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1147 | 1147 | |--------|------------------------------------------------------------------|---------|-------------| |
| 1148 | 1148 | | GET | `/` | no | Same as `/health` | |
| 1149 | 1149 | | GET | `/academic-years` | teacher | List every academic year, newest first. Requires teacher+. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. | |
| 1150 | -| POST | `/academic-years` | manager | Create an academic year. Requires manager+. Past dates are allowed — years are calendar structure, not schedules. `grade_promotions` is the sınıf-geçme policy the rollover applies. | | |
| 1150 | +| POST | `/academic-years` | manager | Create an academic year. Requires manager+. Past dates are allowed — years are calendar structure, not schedules. `grade_promotions` is the grade-promotion policy the rollover applies. | | |
| 1151 | 1151 | | GET | `/academic-years/{id}` | teacher | Fetch a single academic year by id. Requires teacher+. | |
| 1152 | 1152 | | PATCH | `/academic-years/{id}` | manager | Update an academic year. Requires manager+. Omitted fields keep their value; `grade_promotions` is replaced as a whole when sent. An archived year is read-only. | |
| 1153 | -| DELETE | `/academic-years/{id}` | manager | Delete an academic year. Requires manager+. Refused with a 409 while any şube or dönem still links it — move or delete them first. An archived year must be re-opened (`PATCH` is not enough: there is no unarchive here, so the row is only deletable while open) like every other past-structure write. | | |
| 1154 | -| POST | `/academic-years/{id}/archive` | manager | Archive an academic year. Requires manager+. Stamps `archived_at`, and from then on the whole year is past structure: no new şube, no new dönem, no exam inside it, and no edit or delete of the year itself. Idempotent — a second archive answers `200` with the stamp that already stood. There is no unarchive route: the row is deletable only while open. | | |
| 1155 | -| POST | `/academic-years/{id}/rollover` | manager | Carry another year's şubeler into this one. Requires manager+. Each şube of `from_year` whose grade the target year promotes is planted afresh here — same name, mapped grade, and copies of its instances (`ders_saati`, karne policy, teachers) and of every live member, who are also enrolled into the new instances. A grade with no promotion entry stays behind: that is graduation, and `graduated` names it. The target must be empty (a second rollover into it is a 409, which is what makes the command idempotent), open, and different from the source. | | |
| 1153 | +| DELETE | `/academic-years/{id}` | manager | Delete an academic year. Requires manager+. Refused with a 409 while any section or term still links it — move or delete them first. An archived year must be re-opened (`PATCH` is not enough: there is no unarchive here, so the row is only deletable while open) like every other past-structure write. | | |
| 1154 | +| POST | `/academic-years/{id}/archive` | manager | Archive an academic year. Requires manager+. Stamps `archived_at`, and from then on the whole year is past structure: no new section, no new term, no exam inside it, and no edit or delete of the year itself. Idempotent — a second archive answers `200` with the stamp that already stood. There is no unarchive route: the row is deletable only while open. | | |
| 1155 | +| POST | `/academic-years/{id}/rollover` | manager | Carry another year's class sections into this one. Requires manager+. Each section of `from_year` whose grade the target year promotes is planted afresh here — same name, mapped grade, and copies of its instances (`ders_saati`, report-card policy, teachers) and of every live member, who are also enrolled into the new instances. A grade with no promotion entry stays behind: that is graduation, and `graduated` names it. The target must be empty (a second rollover into it is a 409, which is what makes the command idempotent), open, and different from the source. | | |
| 1156 | 1156 | | GET | `/ai/capabilities` | student | The capabilities connected AI services are serving right now, per capability, with the work in flight — a discovery read for an operator or a service deciding what it may ask this bridge to do. | |
| 1157 | 1157 | | GET | `/ai/certificate` | no | The AI bridge's certificate (PEM + SHA-256 fingerprint) for a service to pin; `404` when the bridge is off. | |
| 1158 | 1158 | | GET | `/api-docs/openapi.json` | no | Raw OpenAPI 3 spec | |
| @@ -1168,8 +1168,8 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1168 | 1168 | | PATCH | `/appointments/{id}/reschedule` | teacher | Counter-propose another time for a booking, on the same row (the reason and the history stay in one place). Requires teacher+ and ownership of the slot (or manager/admin). | |
| 1169 | 1169 | | PATCH | `/appointments/{id}/reschedule/accept` | student | Accept the teacher's counter-proposal. The requester's call alone — it is their commitment. Accepting *is* approval at the proposed time, so the double-booking guard runs again for both sides (`409` if the moved time now collides with something else, or has already started — agreeing to a window that began would mint a meeting nobody can cancel). | |
| 1170 | 1170 | | PATCH | `/appointments/{id}/reschedule/decline` | student | Refuse the teacher's counter-proposal. The requester's call alone, and it **cancels the booking**: the proposal replaced the time that was asked for, so there is nothing left to fall back to — book another slot instead. The slot frees up, and the original request stays readable as `cancelled` with the refused proposal still on it. Declining is a cancel, so it answers to the same deadline: `409` once the meeting's effective window has started. | |
| 1171 | -| GET | `/attendance/me` | student | The current user's attendance report: event tallies, lesson roll-call tallies, a per-instance breakdown with attendance rates, and the per-dönem devamsızlık. | | |
| 1172 | -| GET | `/attendance/{user}` | teacher | Any user's attendance report. Requires teacher+, or a parent tied to the target student. Managers, admins, and parents see every instance; a teacher sees the event tallies plus only the roll-call blocks — and the devamsızlık days — of the instances they run. | | |
| 1171 | +| GET | `/attendance/me` | student | The current user's attendance report: event tallies, lesson roll-call tallies, a per-instance breakdown with attendance rates, and the per-term absence breakdown. | | |
| 1172 | +| GET | `/attendance/{user}` | teacher | Any user's attendance report. Requires teacher+, or a parent tied to the target student. Managers, admins, and parents see every instance; a teacher sees the event tallies plus only the roll-call blocks — and the absence days — of the instances they run. | | |
| 1173 | 1173 | | POST | `/auth/login` | no | Log in with username + password — no school. Sets a `session` cookie on success: exactly one active membership enters that school right away (`<slug>.<token>` and the full [`UserResponse`], unchanged for single-school clients), several answer a [`SchoolChoiceResponse`] with a `person.<token>` cookie that `POST /auth/school` binds. | |
| 1174 | 1174 | | POST | `/auth/logout` | no | Log out: revoke the current session (if any) and clear the cookie. Idempotent — no session required; answers `204` either way. | |
| 1175 | 1175 | | GET | `/auth/me` | student | Return the currently authenticated user. | |
| @@ -1210,7 +1210,7 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1210 | 1210 | | GET | `/chatbot/threads/{id}/messages/{mid}` | student | Poll one turn. The non-SSE fallback for `/stream`, reading the same row — including the projection that presents a long-stale `pending` as `failed`, so the two can never disagree about a turn's state. | |
| 1211 | 1211 | | GET | `/chatbot/threads/{id}/messages/{mid}/stream` | student | Watch one turn as Server-Sent Events: `delta` chunks of the answer, then a single `done` carrying the finished message, or one `error`. The stream closes after `done`/`error` — one stream per turn, not per thread. | |
| 1212 | 1212 | | GET | `/classes` | teacher | List every class, newest first. Requires teacher+. `?grade=` narrows to one grade label, matched exactly as written — the label a blueprint is keyed by, so this is the read that shows which sections a `POST /classes/blueprints` pump covered (and `?grade=` on its own lists the sections with no grade at all). An unknown label is an empty page, not a `404`. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope whose `total` counts every class under the same filter, not just this page. | |
| 1213 | -| POST | `/classes` | manager | Create a class. Requires manager+ — a class is school structure, not a teacher's own room. `grade` is a free-text label for the year ("9", "10-A"), `year` links the academic year (which is what binds the şube to a karne and to the rollover), `teacher_id` names the homeroom teacher (sınıf öğretmeni, a teacher+ account); all optional. | | |
| 1213 | +| POST | `/classes` | manager | Create a class. Requires manager+ — a class is school structure, not a teacher's own room. `grade` is a free-text label for the year ("9", "10-A"), `year` links the academic year (which is what binds the class to a report card and to the rollover), `teacher_id` names the homeroom teacher (a teacher+ account); all optional. | | |
| 1214 | 1214 | | GET | `/classes/blueprints` | manager | List every grade blueprint, by grade label. Requires manager+. Paged via `?limit=&offset=` (omit `limit` for all of them). | |
| 1215 | 1215 | | POST | `/classes/blueprints` | manager | Create a grade's course blueprint and stock every class section already at that grade with it. Requires manager+. | |
| 1216 | 1216 | | GET | `/classes/blueprints/{grade}` | manager | Fetch one grade's blueprint. Requires manager+. | |
| @@ -1223,8 +1223,8 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1223 | 1223 | | PATCH | `/classes/{id}` | manager | Update a class. Requires manager+. Omitted fields keep their value; `grade`, `year` and `teacher_id` are nullable, so an explicit `null` clears them. | |
| 1224 | 1224 | | DELETE | `/classes/{id}` | manager | Delete a class. Requires manager+. Refused with a 409 while it still holds students or courses — nothing cascades, because dropping the class silently would leave the enrollments it pumped with nothing left to sweep them. | |
| 1225 | 1225 | | POST | `/classes/{id}/blueprint` | manager | Stock one class section from its grade's blueprint. Requires manager+ — this writes the roster of every course in the template, which is the office's call, not one course owner's. | |
| 1226 | -| GET | `/classes/{id}/instances` | teacher | List the instances a class carries — each a catalog course as this section teaches it, with its hours, karne policy and teachers — newest first, paged via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+. Returns a `{items, total, limit, offset}` envelope. `POST /instances/{id}` edits one; this is the read that names them. | | |
| 1227 | -| POST | `/classes/{id}/instances` | teacher | Attach a course to a class: this is what **mints the instance** — the class×course row every exam, session, lesson and roster under this class's course now keys on. Requires teacher+ and catalog rights on that course (its creator, or a manager/admin): attaching writes that course's roster for this section, and the weekly hours and karne policy the instance starts with. The class's whole roster is enrolled in one go, and students already enrolled by hand keep their own rows. Attaching the same course twice is a 409. | | |
| 1226 | +| GET | `/classes/{id}/instances` | teacher | List the instances a class carries — each a catalog course as this section teaches it, with its hours, report-card policy and teachers — newest first, paged via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+. Returns a `{items, total, limit, offset}` envelope. `POST /instances/{id}` edits one; this is the read that names them. | | |
| 1227 | +| POST | `/classes/{id}/instances` | teacher | Attach a course to a class: this is what **mints the instance** — the class×course row every exam, session, lesson and roster under this class's course now keys on. Requires teacher+ and catalog rights on that course (its creator, or a manager/admin): attaching writes that course's roster for this section, and the weekly hours and report-card policy the instance starts with. The class's whole roster is enrolled in one go, and students already enrolled by hand keep their own rows. Attaching the same course twice is a 409. | | |
| 1228 | 1228 | | DELETE | `/classes/{id}/instances/{instance}` | teacher | Detach an instance from a class: the instance and everything the class taught under it — exams (with results, questions and images), homework (with submissions and grades), sessions and roll call, the roster it pumped and its teacher links — are swept, and the uploaded files those rows named are unlinked from disk. Requires teacher+ and catalog rights on the course the instance teaches (its creator, or a manager/admin): this is the inverse of attaching. | |
| 1229 | 1229 | | GET | `/classes/{id}/members` | teacher | List a class's roster, newest first, paged via `?limit=&offset=` (omit `limit` for the whole roster). Requires teacher+. Returns a `{items, total, limit, offset}` envelope. | |
| 1230 | 1230 | | POST | `/classes/{id}/members` | manager | Put a student in a class. Requires manager+. They are enrolled into every instance the class already carries, in one go, and a student already enrolled by hand keeps the row they have (and it survives their removal from the class). Adding the same student twice is a 409; a student who *left* is added afresh — the roster is a history, and the partial index only holds one live stint per pair. | |
| @@ -1242,14 +1242,14 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1242 | 1242 | | POST | `/course-notes/{id}/rag/reindex` | teacher | Re-index a course note now, without waiting for its next write. | |
| 1243 | 1243 | | DELETE | `/course-notes/{id}/rag/{output_id}` | teacher | Delete one stored AI output. Requires teacher+ and management rights over the course. Dropping an output does not stop the next note or file change from regenerating one. | |
| 1244 | 1244 | | GET | `/courses` | student | List the catalog courses visible to the caller: every course for manager+, otherwise the courses they teach somewhere plus the ones they're enrolled in. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. | |
| 1245 | -| POST | `/courses` | teacher | Create a catalog course owned by the current user. Requires the `teacher` role or higher. `kind` picks the flavor — `course` (a regular class, the default), `study` (a supervised study session — etüt), or `club` (a student club — kulüp). A catalog row teaches nobody by itself: a şube attaches it into an instance (`POST /classes/{id}/instances`), and a `study`/`club` is joined school-wide (`POST /courses/{id}/members`). | | |
| 1245 | +| POST | `/courses` | teacher | Create a catalog course owned by the current user. Requires the `teacher` role or higher. `kind` picks the flavor — `course` (a regular class, the default), `study` (a supervised study session), or `club` (a student club). A catalog row teaches nobody by itself: a class section attaches it into an instance (`POST /classes/{id}/instances`), and a `study`/`club` is joined school-wide (`POST /courses/{id}/members`). | | |
| 1246 | 1246 | | GET | `/courses/me` | student | The catalog courses the current user is reached by, paged via `?limit=&offset=` (omit `limit` for all of them); returns a `{items, total, limit, offset}` envelope. | |
| 1247 | 1247 | | GET | `/courses/{id}` | student | Fetch a single catalog course by id. Visible to the people it reaches — students enrolled in any of its instances, members of the course itself — and to its creator and managers/admins while those accounts are still `teacher`+. | |
| 1248 | 1248 | | PATCH | `/courses/{id}` | teacher | Update a catalog course. Requires teacher+ and catalog rights — its creator, or a manager/admin. Omitted fields keep their value. | |
| 1249 | -| DELETE | `/courses/{id}` | teacher | Delete a catalog course. Requires teacher+; only its creator or a manager/admin may delete it. Refused with a 409 while the course is still taught anywhere — detach it from every şube (`DELETE /classes/{id}/instances/{instance}`) and remove its individual members first, so a course that carries teaching is never dropped by accident. Once free, it cascades the instances' exams (with their results, questions, answers, and question images), homework (with submissions, submission files, and grades), sessions and roll call, its individual memberships, its subjects, and the teacher links. It also strikes its id out of every class blueprint that named it — a template holding a course nothing can resolve is a stocking run that skips it and a `PATCH` that refuses the very list the template already holds. | | |
| 1250 | -| GET | `/courses/{id}/members` | teacher | List a club/etüt's members, newest first, paged via `?limit=&offset=` (omit `limit` for the whole list). Requires teacher+ and catalog rights. Returns a `{items, total, limit, offset}` envelope. An instance's roster is `GET /instances/{id}/enrollments`. | | |
| 1251 | -| POST | `/courses/{id}/members` | teacher | Add a user to a club or etüt — the **school-scoped** membership tier. Requires teacher+ and catalog rights (its creator, or a manager/admin). Only students can be added, and only to a `study` (etüt) or `club` (kulüp): a regular ders (`kind` `course`) has no school-wide roster — its students come from the şubeler that teach it, and that join is `POST /instances/{id}/enrollments` (400 here). Idempotent: a pair that already holds a membership is returned as-is. | | |
| 1252 | -| DELETE | `/courses/{id}/members/{user}` | teacher | Remove a user from a club or etüt. Requires teacher+ and catalog rights. Existing exam results and badges are untouched — the membership is a door, not a record of what happened inside. A pair holding no membership is a 404. | | |
| 1249 | +| DELETE | `/courses/{id}` | teacher | Delete a catalog course. Requires teacher+; only its creator or a manager/admin may delete it. Refused with a 409 while the course is still taught anywhere — detach it from every class section (`DELETE /classes/{id}/instances/{instance}`) and remove its individual members first, so a course that carries teaching is never dropped by accident. Once free, it cascades the instances' exams (with their results, questions, answers, and question images), homework (with submissions, submission files, and grades), sessions and roll call, its individual memberships, its subjects, and the teacher links. It also strikes its id out of every class blueprint that named it — a template holding a course nothing can resolve is a stocking run that skips it and a `PATCH` that refuses the very list the template already holds. | | |
| 1250 | +| GET | `/courses/{id}/members` | teacher | List a club/study's members, newest first, paged via `?limit=&offset=` (omit `limit` for the whole list). Requires teacher+ and catalog rights. Returns a `{items, total, limit, offset}` envelope. An instance's roster is `GET /instances/{id}/enrollments`. | | |
| 1251 | +| POST | `/courses/{id}/members` | teacher | Add a user to a club or study — the **school-scoped** membership tier. Requires teacher+ and catalog rights (its creator, or a manager/admin). Only students can be added, and only to a `study` (supervised study) or `club`: a regular course (`kind` `course`) has no school-wide roster — its students come from the class sections that teach it, and that join is `POST /instances/{id}/enrollments` (400 here). Idempotent: a pair that already holds a membership is returned as-is. | | |
| 1252 | +| DELETE | `/courses/{id}/members/{user}` | teacher | Remove a user from a club or study. Requires teacher+ and catalog rights. Existing exam results and badges are untouched — the membership is a door, not a record of what happened inside. A pair holding no membership is a 404. | | |
| 1253 | 1253 | | GET | `/courses/{id}/subjects` | student | List a course's subjects in creation order, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to its creator, to managers/admins, and to anyone the course reaches (a student enrolled in one of its instances, or a member of it). Returns a `{items, total, limit, offset}` envelope. | |
| 1254 | 1254 | | POST | `/courses/{id}/subjects` | teacher | Create a subject inside a course. Requires teacher+ and catalog rights (its creator, or a manager/admin). Subjects are the curriculum topics of the *catalog* row — every exam of every instance teaching it tags its questions with one of them. | |
| 1255 | 1255 | | GET | `/events` | student | List all events, newest first. Paged via `?limit=&offset=` (omit `limit` for every event); returns a `{items, total, limit, offset}` envelope. | |
| @@ -1264,7 +1264,7 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1264 | 1264 | | DELETE | `/events/{id}/register/{user}` | teacher | Take a user off the signup list — the register rules mirrored: teacher+, students' seats or your own (another *staff* member's seat only if their account no longer exists), and only while the list is open (the event hasn't started or, ends_at-only, passed). A seat held by a `parent` is freeable by any teacher+ as well: no route lets that account free it itself, so a stranded seat needs a door. Attendance already marked stays recorded. | |
| 1265 | 1265 | | GET | `/events/{id}/roster` | teacher | The event's expected-attendee roster joined with its attendance marks — the who-came/who-missed report. Resolved live from the audience (today's role holders, current enrollment, the current class roster, the current signup list), so it always reflects the present roster; attendance rows for people no longer in the audience are omitted here (they remain in `GET /events/{id}/attendance`). Requires teacher+. Paged via `?limit=&offset=` (omit `limit` for the whole roster). | |
| 1266 | 1266 | | GET | `/exams` | student | List the exams visible to the caller: every exam for manager+, otherwise the exams of the instances they teach or are enrolled in — minus other people's drafts (a draft shows only to its instance's managers). Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. | |
| 1267 | -| GET | `/exams/{id}` | student | Fetch a single exam by id. Visible to **any instance the exam is addressed to** — its owner's enrolled students and teachers, and, for an announced exam (ortak sınav), each addressed section's alike — plus managers/admins; drafts only show to the managers of an addressed instance (everyone else gets a `404`, as if the exam doesn't exist yet — because it doesn't, officially). | | |
| 1267 | +| GET | `/exams/{id}` | student | Fetch a single exam by id. Visible to **any instance the exam is addressed to** — its owner's enrolled students and teachers, and, for an announced exam (a shared exam), each addressed section's alike — plus managers/admins; drafts only show to the managers of an addressed instance (everyone else gets a `404`, as if the exam doesn't exist yet — because it doesn't, officially). | | |
| 1268 | 1268 | | PATCH | `/exams/{id}` | teacher | Update an exam. Requires teacher+ and management rights over the exam's instance (an assigned teacher, its class's homeroom teacher, or a manager/admin). Omitted fields keep their value; an explicit `null` clears a schedule field; the instance an exam hangs off is not updatable here. The schedule must stay consistent as a whole (see the create endpoint), and `mode` is frozen once anyone has started an attempt — times, duration, `max_attempts`, and `allow_rejoin` stay editable so a running exam can be extended, granted retakes, or have its rejoin door opened live. `draft: false` publishes a draft; `draft: true` re-hides an exam, but only while it has no attempts and no results (`409` otherwise) — students never lose sight of an exam they've already sat or been graded on. | |
| 1269 | 1269 | | DELETE | `/exams/{id}` | teacher | Delete an exam. Requires teacher+ and management rights over the exam's instance (an assigned teacher, its class's homeroom teacher, or a manager/admin). Cascades the exam's results, attempts, questions, answers, and question + answer images (blobs included). | |
| 1270 | 1270 | | GET | `/exams/{id}/attempt` | student | The caller's own (latest) attempt: status, deadline, remaining time, and mark once graded — everything a student's live exam screen needs, judged by the server clock. `404` until an attempt is started. | |
| @@ -1278,8 +1278,8 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1278 | 1278 | | GET | `/exams/{id}/attempt/ws` | student | **WebSocket** exam room (students only): state ticks, autosave, finish; entering clears `left_at`, leaving stamps it (see "Taking an exam") | |
| 1279 | 1279 | | GET | `/exams/{id}/attempts/{user}/answers` | teacher | One student's answer sheet with correctness flags — always the *latest* sitting's answers (a retake starts from a blank sheet). Every row carries the saved answer plus `is_correct` (`null` for text questions — those are the grader's call), and the machine's `auto_score` over the choice questions is attached as a *suggestion*: the final mark stays human, via `POST /exams/{id}/results`. Requires teacher+ and management rights over the exam's instance. | |
| 1280 | 1280 | | GET | `/exams/{id}/attempts/{user}/answers/{qid}/image` | teacher | One student's drawn-answer bytes, for the grader. Requires teacher+ and management rights over the exam's instance — the `attempt_answers` gate. | |
| 1281 | -| GET | `/exams/{id}/audience` | student | List the instances an exam is announced to, its owner included — the read behind the announce routes' answer, useful on its own to a client that wants to show where else an exam is sat. Visible to the exam's own audience: an addressed instance's enrolled students, its teachers (or its şube's homeroom teacher), and managers/admins — except drafts, which stay a `404` to everyone but an addressed instance's managers. | | |
| 1282 | -| POST | `/exams/{id}/audience` | teacher | Announce an exam to another instance — the **ortak sınav** write: one exam addressed to a sibling şube, so it and its marks stand in that section's exam list, marks report and karne. Requires teacher+ and management rights over the exam's **owner** instance (an assigned teacher, its şube's homeroom teacher, or a manager/admin) — the target instance's teachers have no say. The target must teach the exam's own catalog course and sit under the same academic year (`400` otherwise), the owner itself is refused (`400`), and an archived target year is a `409`. Announcing a pair that already stands is a no-op answering `200` with the audience unchanged. | | |
| 1281 | +| GET | `/exams/{id}/audience` | student | List the instances an exam is announced to, its owner included — the read behind the announce routes' answer, useful on its own to a client that wants to show where else an exam is sat. Visible to the exam's own audience: an addressed instance's enrolled students, its teachers (or its class section's homeroom teacher), and managers/admins — except drafts, which stay a `404` to everyone but an addressed instance's managers. | | |
| 1282 | +| POST | `/exams/{id}/audience` | teacher | Announce an exam to another instance — the **shared exam** write: one exam addressed to a sibling class section, so it and its marks stand in that section's exam list, marks report and report card. Requires teacher+ and management rights over the exam's **owner** instance (an assigned teacher, its class section's homeroom teacher, or a manager/admin) — the target instance's teachers have no say. The target must teach the exam's own catalog course and sit under the same academic year (`400` otherwise), the owner itself is refused (`400`), and an archived target year is a `409`. Announcing a pair that already stands is a no-op answering `200` with the audience unchanged. | | |
| 1283 | 1283 | | DELETE | `/exams/{id}/audience/{instance}` | teacher | Withdraw an exam from one instance's audience. Requires teacher+ and management rights over the exam's **owner** instance, like the announce itself. The owner's own pair is not withdrawable (`400`) — that is the instance the exam belongs to, and deleting the exam is what ends it; an archived year refuses the withdrawal with the same `409` its other writes answer. A pair that holds no audience row is a `404`. | |
| 1284 | 1284 | | GET | `/exams/{id}/live` | teacher | A one-shot live snapshot of the exam: who's in, who's still writing (and on which sitting), who walked out of the room (`left_at`), who never showed at all (`absent`, once the window is over), time each student has left, and marks as they land — the roster of every instance the exam is addressed to, so an announced-to section's sitters are here too. Requires teacher+ and management rights over the exam's instance. Poll it to keep a monitor up to date. | |
| 1285 | 1285 | | GET | `/exams/{id}/questions` | teacher | The exam's question list, `correct` choice ids included — the answer key, paged via `?limit=&offset=` (omit `limit` for the whole list). Requires teacher+ and management rights over the exam's instance. Students read questions through `GET /exams/{id}/attempt/questions`. Returns a `{items, total, limit, offset}` envelope. | |
| @@ -1297,7 +1297,7 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1297 | 1297 | | POST | `/exams/{id}/questions/{qid}/to-bank` | teacher | Save one of this exam's questions into the school-wide bank as a reusable template. Requires teacher+ and management rights over the exam's instance. The caller becomes the template's owner; the question's subject rides along as origin metadata. A full copy — text, points, spec, illustration, and option pictures — lands under a new bank id. Provenance rides both ways: the origin exam is recorded on the template as `source_exam`, and the exam question's `banked_as` is pointed at the new template (a repeat save is allowed and repoints it at the newest one). `from_bank` is left alone — it records the other direction and a save never changes where a question came from. | |
| 1298 | 1298 | | GET | `/exams/{id}/result` | student | The current user's own result for an exam. Any authenticated user may read their own mark; `404` while ungraded (or when the exam doesn't exist). | |
| 1299 | 1299 | | GET | `/exams/{id}/results` | teacher | List an exam's results, paged via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+ and management rights over an instance the exam is addressed to — students read only their own via `GET /exams/{id}/result`. Returns a `{items, total, limit, offset}` envelope. | |
| 1300 | -| POST | `/exams/{id}/results` | teacher | Record (or overwrite) a student's mark for an exam. Requires teacher+ and management rights over **an instance the exam is addressed to** (the announced-to section's teacher grades its own students on an ortak sınav); the target must be a student enrolled in one of them. Only students carry marks; students never grade — and nobody grades themselves. A draft can't be graded (`409`) — a mark would point at an exam its student can't see. | | |
| 1300 | +| POST | `/exams/{id}/results` | teacher | Record (or overwrite) a student's mark for an exam. Requires teacher+ and management rights over **an instance the exam is addressed to** (the announced-to section's teacher grades its own students on a shared exam); the target must be a student enrolled in one of them. Only students carry marks; students never grade — and nobody grades themselves. A draft can't be graded (`409`) — a mark would point at an exam its student can't see. | | |
| 1301 | 1301 | | DELETE | `/exams/{id}/results/{user}` | teacher | Remove a student's result from an exam. Requires teacher+ and management rights over an instance the exam is addressed to. | |
| 1302 | 1302 | | GET | `/exams/{id}/review/attempts` | student | The caller's own sitting numbers at an exam — every seq that carries answers or a mark, ascending. Own-scoped review view; opens once the teacher enables review and has marked the caller, and closes again (409) while the caller can still sit the exam. | |
| 1303 | 1303 | | GET | `/exams/{id}/review/attempts/{seq}/answers` | student | One of the caller's own sittings, judged — the `seq`th attempt's answers, drawing refs, correctness flags, and auto-score suggestion. Own-scoped review view; 409 while the caller can still sit the exam, so a retake can't read its own correctness off an earlier seq. | |
| @@ -1310,8 +1310,8 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1310 | 1310 | | GET | `/exams/{id}/students/{user}/marks` | teacher | A student's full mark history at an exam — every sitting's mark, oldest first (the grade-of-record is the latest). Requires teacher+ and management rights over the exam's instance. | |
| 1311 | 1311 | | GET | `/health` | no | Health probe: the database verdict and the AI bridge, `503` when degraded. | |
| 1312 | 1312 | | GET | `/homework` | student | List the homework across the caller's instances — their "my homework" view — paged via `?limit=&offset=` (omit `limit` for all of it). Manager+ see every instance's homework; a teacher sees the homework of instances they run; a student sees only the homework they are assigned (whole-roster ones plus any subset that names them, each with its `assigned` narrowed to themselves). Returns a `{items, total, limit, offset}` envelope. | |
| 1313 | -| GET | `/homework/report/{user}` | teacher | A student's homework report across the instances their şube carries, paged via `?limit=&offset=` (omit `limit` for all of it): one row per homework in their audience — submitted/late/missing state plus the grade once one exists. Statuses and marks, never the submitted files (observers get the report, not the bytes). Requires teacher+, or a parent linked to the target student. Managers, admins, and parents see every instance; a teacher sees only the target's instances they manage. Returns a `{items, total, limit, offset}` envelope. | | |
| 1314 | -| GET | `/homework/{id}` | student | Fetch a single homework by id. Visible to whoever can view its instance (its enrolled students, its teachers, its şube's homeroom teacher, and managers/admins). A student the homework is *not* assigned to gets a 404 — the same no-leak an unseen exam draft gets, so a subset assignment never reveals itself to the students left out of it. To a caller without instance-management rights the `assigned` subset comes back narrowed to their own id: being named is theirs to know, the rest of the roster is not. | | |
| 1313 | +| GET | `/homework/report/{user}` | teacher | A student's homework report across the instances their class section carries, paged via `?limit=&offset=` (omit `limit` for all of it): one row per homework in their audience — submitted/late/missing state plus the grade once one exists. Statuses and marks, never the submitted files (observers get the report, not the bytes). Requires teacher+, or a parent linked to the target student. Managers, admins, and parents see every instance; a teacher sees only the target's instances they manage. Returns a `{items, total, limit, offset}` envelope. | | |
| 1314 | +| GET | `/homework/{id}` | student | Fetch a single homework by id. Visible to whoever can view its instance (its enrolled students, its teachers, its class section's homeroom teacher, and managers/admins). A student the homework is *not* assigned to gets a 404 — the same no-leak an unseen exam draft gets, so a subset assignment never reveals itself to the students left out of it. To a caller without instance-management rights the `assigned` subset comes back narrowed to their own id: being named is theirs to know, the rest of the roster is not. | | |
| 1315 | 1315 | | PATCH | `/homework/{id}` | teacher | Edit a homework's title, description, due date, subject, or assigned subset. Requires teacher+ and management rights over its instance. Omitted fields keep their value; a newly set `due_at` is re-checked against now and a new `subject_id` re-checked against the instance's course. Narrowing `assigned` is refused (409) while it would orphan an existing submission or result. | |
| 1316 | 1316 | | DELETE | `/homework/{id}` | teacher | Delete a homework and everything under it — submissions, their files, and results — then unlink the file blobs from disk. Requires teacher+ and management rights over its instance. The cascade is one transaction whose homework-row lock keeps a submission from landing under the homework mid-delete; the blob names are collected inside that transaction, before the rows are wiped, and removed after, so a crash in between strands at worst an unreachable file. | |
| 1317 | 1317 | | GET | `/homework/{id}/result` | student | The caller's own grade for a homework. Any authenticated user may read their own; `404` while ungraded (or when the homework doesn't exist). This is the one read a student graded `missing` *without* ever submitting has — their submission endpoints 404 while nothing is submitted. | |
| @@ -1339,13 +1339,13 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1339 | 1339 | | POST | `/insights/summaries` | manager | Store a batch of ZEKA's student summaries (and their attention items). | |
| 1340 | 1340 | | POST | `/insights/sweep` | manager | Delete every `zeka_*` row whose retention window has closed. | |
| 1341 | 1341 | | GET | `/instances/me` | student | The instances the caller may act in or see, paged via `?limit=&offset=` (omit `limit` for all of them), newest first; returns a `{items, total, limit, offset}` envelope. The route a student reads to find the courses their section is being taught, and a teacher the ones they run. | |
| 1342 | -| GET | `/instances/{id}` | student | Fetch one instance by id. Visible to its enrolled students, its assigned teachers, its şube's homeroom teacher, and managers/admins. | | |
| 1343 | -| PATCH | `/instances/{id}` | teacher | Update one instance's own policy. Requires teacher+ and a right over this instance: manager+, one of its assigned teachers, or its şube's homeroom teacher. Omitted fields keep their value; both are non-clearable. | | |
| 1342 | +| GET | `/instances/{id}` | student | Fetch one instance by id. Visible to its enrolled students, its assigned teachers, its section's homeroom teacher, and managers/admins. | | |
| 1343 | +| PATCH | `/instances/{id}` | teacher | Update one instance's own policy. Requires teacher+ and a right over this instance: manager+, one of its assigned teachers, or its section's homeroom teacher. Omitted fields keep their value; both are non-clearable. | | |
| 1344 | 1344 | | GET | `/instances/{id}/enrollments` | teacher | List this instance's roster, paged via `?limit=&offset=` (omit `limit` for the whole roster). Requires teacher+ and a right over the instance — students see their own instances via `GET /instances/me`. Returns a `{items, total, limit, offset}` envelope. | |
| 1345 | -| POST | `/instances/{id}/enrollments` | teacher | Enroll a student into this instance (idempotent upsert). Requires teacher+ and a right over the instance. Only students can be enrolled — enrollment is student membership, and it gates sitting exams, being graded, and the roster. The row is hand-placed (`source` `null`), so no şube sweep can take it back. | | |
| 1345 | +| POST | `/instances/{id}/enrollments` | teacher | Enroll a student into this instance (idempotent upsert). Requires teacher+ and a right over the instance. Only students can be enrolled — enrollment is student membership, and it gates sitting exams, being graded, and the roster. The row is hand-placed (`source` `null`), so no section sweep can take it back. | | |
| 1346 | 1346 | | DELETE | `/instances/{id}/enrollments/{user}` | teacher | Unenroll a student from this instance. Requires teacher+ and a right over the instance. Existing exam results are kept (they disappear from the student's marks report until re-enrolled). | |
| 1347 | -| GET | `/instances/{id}/exams` | student | List one instance's exams, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to the instance's enrolled students, its teachers, its şube's homeroom teacher, and managers/admins — but drafts appear only to the instance's managers. Returns a `{items, total, limit, offset}` envelope. | | |
| 1348 | -| POST | `/instances/{id}/exams` | teacher | Create an exam inside one instance. Requires teacher+ and a right over the instance; the exam's marks count into the instance's average with its kind's weight (`GET /settings`) and into the dönem's karne named by `term`. Omit `mode` for an offline-graded exam nobody can sit; `sync`/`async` take a window (async also `duration_ms`), `open` is sittable anytime with an optional per-attempt `duration_ms`. `max_attempts` (default 1, `0` = unlimited) meters retakes and `allow_rejoin` (default `true`) is the exam-room door — both stay editable while the exam runs. Send `draft: true` to keep the exam private while it's still being written: only the instance's managers see it, and sitting and grading are blocked until it's published (`PATCH` `draft: false`). Only a class-delivered course (`kind` `course`) carries exams. | | |
| 1347 | +| GET | `/instances/{id}/exams` | student | List one instance's exams, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to the instance's enrolled students, its teachers, its section's homeroom teacher, and managers/admins — but drafts appear only to the instance's managers. Returns a `{items, total, limit, offset}` envelope. | | |
| 1348 | +| POST | `/instances/{id}/exams` | teacher | Create an exam inside one instance. Requires teacher+ and a right over the instance; the exam's marks count into the instance's average with its kind's weight (`GET /settings`) and into the term's report card named by `term`. Omit `mode` for an offline-graded exam nobody can sit; `sync`/`async` take a window (async also `duration_ms`), `open` is sittable anytime with an optional per-attempt `duration_ms`. `max_attempts` (default 1, `0` = unlimited) meters retakes and `allow_rejoin` (default `true`) is the exam-room door — both stay editable while the exam runs. Send `draft: true` to keep the exam private while it's still being written: only the instance's managers see it, and sitting and grading are blocked until it's published (`PATCH` `draft: false`). Only a class-delivered course (`kind` `course`) carries exams. | | |
| 1349 | 1349 | | GET | `/instances/{id}/homework` | student | List one instance's homework, newest first, paged via `?limit=&offset=` (omit `limit` for all of it). Visible to the instance's enrolled students, its teachers, and managers/admins — but a student sees only the homework they are assigned (whole-roster ones plus subsets that name them, each with its `assigned` narrowed to themselves). Returns a `{items, total, limit, offset}` envelope. | |
| 1350 | 1350 | | POST | `/instances/{id}/homework` | teacher | Assign homework inside one instance. Requires teacher+ and a right over the instance. The homework is tagged with one of the catalog course's subjects and given a future `due_at`; `assigned` optionally narrows it to a subset of the enrolled students (omit or empty = the whole roster). | |
| 1351 | 1351 | | GET | `/instances/{id}/sessions` | student | List one instance's lesson sessions, most recent first, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to the instance's enrolled students, its teachers, and managers/admins. Returns a `{items, total, limit, offset}` envelope. | |
| @@ -1353,8 +1353,8 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1353 | 1353 | | POST | `/instances/{id}/teachers` | manager | Assign a teacher to this instance (idempotent). Manager+ only — staffing is the office's call. The assignee must already hold the `teacher` role or higher; the assignment gives them full management of the instance (exams, sessions, homework, roster, grading) but they keep no catalog rights over the course itself. | |
| 1354 | 1354 | | DELETE | `/instances/{id}/teachers/{user}` | manager | Unassign a teacher from this instance. Manager+ only. The instance, its exams, sessions, and roster are untouched — the teacher just loses their management rights over it. A user who was never assigned is a 404. | |
| 1355 | 1355 | | GET | `/limits` | no | Every fixed validation bound the API enforces. Unauthenticated: the registration and login forms need the username and password bounds before a session exists, and none of these values are secrets — they are the same rules a 400 would spell out. | |
| 1356 | -| GET | `/marks/karne` | student | The current user's karne for one dönem: every instance of their şubeler that counts toward the karne, the `ders_saati`-weighted average across them, and the verdict. An archived dönem serves the snapshot the school froze when it was closed; an open one computes live. | | |
| 1357 | -| GET | `/marks/karne/{user}` | teacher | Any user's karne for one dönem. Requires teacher+, or a parent tied to the target student. A linked parent and manager+ read the whole karne; an exactly-teacher caller sees only the lines of the instances they run, with the dönem average recomputed over those and no verdict (see [`narrow_karne`]). | | |
| 1356 | +| GET | `/marks/karne` | student | The current user's report card for one term: every instance of their sections that counts toward the report card, the `ders_saati`-weighted average across them, and the verdict. An archived term serves the snapshot the school froze when it was closed; an open one computes live. | | |
| 1357 | +| GET | `/marks/karne/{user}` | teacher | Any user's report card for one term. Requires teacher+, or a parent tied to the target student. A linked parent and manager+ read the whole report card; an exactly-teacher caller sees only the lines of the instances they run, with the term average recomputed over those and no verdict (see [`narrow_karne`]). | | |
| 1358 | 1358 | | GET | `/marks/me` | student | The current user's mark report: every instance they sit, with its graded exams, weighted instance averages, and the overall average. | |
| 1359 | 1359 | | GET | `/marks/{user}` | teacher | Any user's mark report. Requires teacher+, or a parent tied to the target student. Managers, admins, and parents see every instance; a teacher sees only the target's instances they run — the rest of the report (other sections) stays out of reach. | |
| 1360 | 1360 | | GET | `/meals/attendance/{user}` | teacher | One student's meal-attendance history, newest mark first. Requires teacher+, or a parent linked to them — the caller's own id always passes, like the balance and ledger reads. Narrow to a date range with `?from=&to=` (inclusive `YYYY-MM-DD` bounds on the menu's day, each held to the same real-calendar-day rule the menu's own date is). Paged via `?limit=&offset=`. | |
| @@ -1465,11 +1465,11 @@ window filtering, before paging; negative values are a `400` naming the field. | ||
| 1465 | 1465 | | DELETE | `/subjects/{id}` | teacher | Delete a subject. Requires teacher+ and management rights over its course. Refused with a 409 while any exam question or homework still references it — re-tag or delete those first, so nothing is left pointing at a subject that no longer exists. | |
| 1466 | 1466 | | GET | `/swagger` | no | Interactive API docs (Swagger UI) | |
| 1467 | 1467 | | GET | `/terms` | student | List every term, newest first. Any authenticated user — students need the calendar to make sense of their courses. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. | |
| 1468 | -| POST | `/terms` | manager | Create a dönem inside an academic year. Requires manager+. Past dates are allowed — dönemler are calendar structure, not schedules; an *archived* year refuses the new dönem (`409`), because past years take no new structure. | | |
| 1468 | +| POST | `/terms` | manager | Create a term inside an academic year. Requires manager+. Past dates are allowed — terms are calendar structure, not schedules; an *archived* year refuses the new term (`409`), because past years take no new structure. | | |
| 1469 | 1469 | | GET | `/terms/{id}` | student | Fetch a single term by id. | |
| 1470 | 1470 | | PATCH | `/terms/{id}` | manager | Update a term. Requires manager+. Omitted fields keep their value; the merged range must stay ordered. | |
| 1471 | -| DELETE | `/terms/{id}` | manager | Delete a dönem. Requires manager+. Refused with a 409 while anything still hangs off it — an exam filed in it, or a karne frozen for it — so a dönem is never dropped out from under marks that name it; move or delete those first. The dönem's own academic year is untouched (that is `DELETE /academic-years/{id}`, which refuses while a dönem still links it). | | |
| 1472 | -| POST | `/terms/{id}/archive` | manager | Archive a dönem. Requires manager+. Archiving **freezes the karnes**: every student with a roster row under the dönem's year gets a snapshot of their report, and from then on `GET /marks/karne` serves that record instead of recomputing — a mark corrected after the fact no longer rewrites what a family holds. An archived dönem takes no edits and no delete; exams may still be created in it while its *year* is open (the archive is a record, not a wall). Idempotent — archiving an already-archived dönem answers `200` with the stamp it already had and never re-freezes. | | |
| 1471 | +| DELETE | `/terms/{id}` | manager | Delete a term. Requires manager+. Refused with a 409 while anything still hangs off it — an exam filed in it, or a report card frozen for it — so a term is never dropped out from under marks that name it; move or delete those first. The term's own academic year is untouched (that is `DELETE /academic-years/{id}`, which refuses while a term still links it). | | |
| 1472 | +| POST | `/terms/{id}/archive` | manager | Archive a term. Requires manager+. Archiving **freezes the report cards**: every student with a roster row under the term's year gets a snapshot of their report, and from then on `GET /marks/karne` serves that record instead of recomputing — a mark corrected after the fact no longer rewrites what a family holds. An archived term takes no edits and no delete; exams may still be created in it while its *year* is open (the archive is a record, not a wall). Idempotent — archiving an already-archived term answers `200` with the stamp it already had and never re-freezes. | | |
| 1473 | 1473 | | POST | `/terms/{id}/unarchive` | manager | Re-open an archived term. Requires manager+. Idempotent the same way as archiving: an already-open term answers `200`. | |
| 1474 | 1474 | | GET | `/time` | no | Server clock: `{now}` UTC unix-millis, for a frontend to sync against. | |
| 1475 | 1475 | | GET | `/users` | admin | List every user with their role, newest first. Admin only. Paged: pass `?limit=&offset=` to take a window (omit `limit` for the whole list); the response is a `{items, total, limit, offset}` envelope where `total` counts every user. | |
src/ai/insight.rsmodified+2 -2
| @@ -89,13 +89,13 @@ pub struct StudentResponse { | ||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /// What the backend would ask a service to compute for one class (a course |
| 92 | -/// as one şube teaches it). Defined for the contract; nothing dispatches it | |
| 92 | +/// as one section teaches it). Defined for the contract; nothing dispatches it | |
| 93 | 93 | /// yet — see the module docs. |
| 94 | 94 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 95 | 95 | pub struct ClassRequest { |
| 96 | 96 | /// The course or class the analysis is about. |
| 97 | 97 | pub course_id: String, |
| 98 | - /// The dönem to read; omitted, the service uses the current one. | |
| 98 | + /// The term to read; omitted, the service uses the current one. | |
| 99 | 99 | #[serde(default, skip_serializing_if = "Option::is_none")] |
| 100 | 100 | pub term: Option<String>, |
| 101 | 101 | /// Length of the attention list. |
src/ai/rag_chat.rsmodified+8 -8
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 | //! The service answers *about* a school's course-note corpus, so the request |
| 10 | 10 | //! carries both who is asking (so the service can read that person's own data |
| 11 | 11 | //! back through the bridge's api reads, as `on_behalf_of`) and the |
| 12 | -//! `(sınıf, ders)` scope the corpus is routed by. The reply returns the answer | |
| 12 | +//! `(class, course)` scope the corpus is routed by. The reply returns the answer | |
| 13 | 13 | //! text plus the citations behind it, so the backend can resolve each cited |
| 14 | 14 | //! passage to the course-note file it came from. |
| 15 | 15 | |
| @@ -20,20 +20,20 @@ use crate::constant::{ | ||
| 20 | 20 | AI_RAG_CHAT_CAPABILITY, AI_RAG_CHAT_TIMEOUT_SECS, MAX_RAG_CITATIONS, MAX_RAG_CITATION_PAGES, |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | -/// One `(sınıf, ders)` pair the question is scoped to. | |
| 23 | +/// One `(class, course)` pair the question is scoped to. | |
| 24 | 24 | /// |
| 25 | 25 | /// The corpus is routed by the **pair**: a grade and a subject list sent |
| 26 | 26 | /// separately would cross-product into combinations the asker never named, so |
| 27 | -/// each pair is one scope the service may retrieve from. `sinif` is optional — | |
| 28 | -/// a question about a subject across every grade names `ders` alone — and | |
| 29 | -/// `ders` is required, since a subject-less scope retrieves nothing. | |
| 27 | +/// each pair is one scope the service may retrieve from. The class is optional — | |
| 28 | +/// a question about a subject across every grade names the course alone — and | |
| 29 | +/// the course is required, since a subject-less scope retrieves nothing. | |
| 30 | 30 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 31 | 31 | pub struct RagScopePair { |
| 32 | 32 | /// The class/grade the subject is taught in (`"9"`, `"10"`), or omitted to |
| 33 | 33 | /// scope the subject across grades. |
| 34 | 34 | #[serde(default)] |
| 35 | 35 | pub sinif: Option<String>, |
| 36 | - /// The subject/course name the pair is scoped to (Matematik, Fizik). The | |
| 36 | + /// The subject/course name the pair is scoped to (Mathematics, Physics). The | |
| 37 | 37 | /// one field a pair cannot go without. |
| 38 | 38 | pub ders: String, |
| 39 | 39 | } |
| @@ -66,7 +66,7 @@ pub struct RagChatRequestPayload { | ||
| 66 | 66 | /// request's copy, so a service may answer on it: a student must not be |
| 67 | 67 | /// handed an answer scoped for a manager. |
| 68 | 68 | pub asker_role: String, |
| 69 | - /// The `(sınıf, ders)` pairs the question is scoped to — one entry per pair, | |
| 69 | + /// The `(class, course)` pairs the question is scoped to — one entry per pair, | |
| 70 | 70 | /// because the RAG routes corpora by the pair. At most |
| 71 | 71 | /// [`MAX_RAG_SCOPE_PAIRS`](crate::constant::MAX_RAG_SCOPE_PAIRS); a request |
| 72 | 72 | /// carrying more is refused rather than narrowed. |
| @@ -434,7 +434,7 @@ mod tests { | ||
| 434 | 434 | ); |
| 435 | 435 | |
| 436 | 436 | // The three optional fields default to empty on a minimal service |
| 437 | - // reply, and a scope pair may omit `sinif`. | |
| 437 | + // reply, and a scope pair may omit the class. | |
| 438 | 438 | let bare: RagChatReplyPayload = |
| 439 | 439 | serde_json::from_value(json!({ "text": "bilmiyorum", "abstained": true })).unwrap(); |
| 440 | 440 | assert_eq!(bare.reason, ""); |
src/constant.rsmodified+17 -17
| @@ -63,7 +63,7 @@ pub const MAX_COURSE_NOTE_FILES: usize = 10; | ||
| 63 | 63 | |
| 64 | 64 | pub const MAX_MESSAGE_SUBJECT_LEN: usize = 200; |
| 65 | 65 | pub const MAX_MESSAGE_BODY_LEN: usize = 10_000; |
| 66 | -/// A message's optional sender-chosen tag ("Etüt", "Sınav", …) — free text, | |
| 66 | +/// A message's optional sender-chosen tag ("Study", "Exam", …) — free text, | |
| 67 | 67 | /// rendered as a badge by the UI. |
| 68 | 68 | pub const MAX_MESSAGE_LABEL_LEN: usize = 50; |
| 69 | 69 | |
| @@ -105,8 +105,8 @@ pub const MAX_EXAM_DESCRIPTION_LEN: usize = 2_000; | ||
| 105 | 105 | pub const MAX_COURSE_TITLE_LEN: usize = 200; |
| 106 | 106 | pub const MAX_COURSE_DESCRIPTION_LEN: usize = 2_000; |
| 107 | 107 | |
| 108 | -/// A class section (şube) is named like a course, but its optional `grade` is | |
| 109 | -/// a free-text label the school picks ("9", "10-A", "anaokulu") — a line of | |
| 108 | +/// A class section is named like a course, but its optional `grade` is | |
| 109 | +/// a free-text label the school picks ("9", "10-A", "kindergarten") — a line of | |
| 110 | 110 | /// display text, so it is bounded like the other short labels, not like a |
| 111 | 111 | /// description. |
| 112 | 112 | pub const MAX_CLASS_NAME_LEN: usize = 200; |
| @@ -130,14 +130,14 @@ pub const MAX_CLASS_GRADE_LEN: usize = 20; | ||
| 130 | 130 | pub const MAX_CLASS_MEMBERS: i64 = 200; |
| 131 | 131 | pub const MAX_CLASS_COURSES: i64 = 50; |
| 132 | 132 | |
| 133 | -/// Weekly lesson hours of a class×course instance (D8's karne weight). Bounded | |
| 133 | +/// Weekly lesson hours of a class×course instance (D8's report-card weight). Bounded | |
| 134 | 134 | /// so a typo cannot make one instance dominate the year average. |
| 135 | 135 | pub const MIN_DERS_SAATI: i64 = 1; |
| 136 | 136 | pub const MAX_DERS_SAATI: i64 = 40; |
| 137 | 137 | |
| 138 | -/// The default grade-display bands: the Türkiye 5-point scale (85–100 = 5, | |
| 139 | -/// … 0–44 = 1). Schools edit the list via `PATCH /settings`; the karne verdict | |
| 140 | -/// reads the band labelled `"2"` as the pass boundary. | |
| 138 | +/// The default grade-display bands: the Turkish 5-point scale (85–100 = 5, | |
| 139 | +/// … 0–44 = 1). Schools edit the list via `PATCH /settings`; the report-card | |
| 140 | +/// verdict reads the band labelled `"2"` as the pass boundary. | |
| 141 | 141 | pub const DEFAULT_GRADE_BANDS: [(i64, &str); 5] = |
| 142 | 142 | [(85, "5"), (70, "4"), (55, "3"), (45, "2"), (0, "1")]; |
| 143 | 143 | |
| @@ -168,7 +168,7 @@ pub const MAX_SESSION_TOPIC_LEN: usize = 200; | ||
| 168 | 168 | /// `PATCH /settings`. An exam's kind decides how heavily it counts into the |
| 169 | 169 | /// course average — the defaults all weigh 1 (a plain average) so weighting |
| 170 | 170 | /// is opt-in policy, not baked-in opinion. The defaults are the Turkish K12 |
| 171 | -/// classroom's own: yazılı, sözlü, uygulama. | |
| 171 | +/// classroom's own: written, oral, practice. | |
| 172 | 172 | pub const DEFAULT_EXAM_KINDS: [(&str, i64); 3] = [("yazili", 1), ("sozlu", 1), ("uygulama", 1)]; |
| 173 | 173 | |
| 174 | 174 | /// Bounds for the school-editable lists in settings (exam kinds, attendance |
| @@ -192,7 +192,7 @@ pub const MAX_TERM_NAME_LEN: usize = 100; | ||
| 192 | 192 | /// An academic year is named like a term ("2026-2027"). |
| 193 | 193 | pub const MAX_ACADEMIC_YEAR_NAME_LEN: usize = 100; |
| 194 | 194 | |
| 195 | -/// The per-dönem devamsızlık limits a school may configure; a bound so a typo | |
| 195 | +/// The per-term absence limits a school may configure; a bound so a typo | |
| 196 | 196 | /// cannot disable the rule or make it absurd. |
| 197 | 197 | pub const MAX_ABSENCE_DAYS: i64 = 365; |
| 198 | 198 | |
| @@ -248,7 +248,7 @@ pub const MAX_MENU_CAPACITY: i64 = 10_000; | ||
| 248 | 248 | pub const MAX_DIETARY_TAGS: usize = 10; |
| 249 | 249 | pub const MAX_DIETARY_NOTE_LEN: usize = 500; |
| 250 | 250 | |
| 251 | -/// Money is **minor units** (kuruş) as `i64` everywhere — never a decimal and | |
| 251 | +/// Money is **minor units** as `i64` everywhere — never a decimal and | |
| 252 | 252 | /// never a float. `MAX_DISH_PRICE_MINOR` caps one dish (10 000 ₺); |
| 253 | 253 | /// `MAX_LEDGER_AMOUNT_MINOR` caps one ledger line (100 000 ₺), which is wide |
| 254 | 254 | /// enough for a term's prepayment. |
| @@ -287,8 +287,8 @@ pub const MAX_MEAL_CANCEL_CUTOFF_MINUTES: i64 = 7 * 24 * 60; | ||
| 287 | 287 | /// school sets its hour. |
| 288 | 288 | pub const MAX_MEAL_SERVING_MINUTE: i64 = 24 * 60 - 1; |
| 289 | 289 | |
| 290 | -/// The only accepted course kinds. `course`: a regular class (ders). `study`: | |
| 291 | -/// a supervised study session (etüt). Behaviorally identical — the kind is a | |
| 290 | +/// The only accepted course kinds. `course`: a regular class. `study`: a | |
| 291 | +/// supervised study session. Behaviorally identical — the kind is a | |
| 292 | 292 | /// label for the UI, everything else (enrollment, exams, sessions, marks) |
| 293 | 293 | /// works the same. |
| 294 | 294 | pub const COURSE_KINDS: [&str; 3] = ["course", "study", "club"]; |
| @@ -356,7 +356,7 @@ pub const MAX_FEE_PLAN_ASSIGN_WRITES: usize = 3_000; | ||
| 356 | 356 | /// charge, the refunds under a payment, and every reversal among them. The |
| 357 | 357 | /// over-payment cap folds that whole subtree one query per line while holding |
| 358 | 358 | /// the process-global payment lock, so an unbounded subtree is an unbounded |
| 359 | -/// stall for every other payment in the school: 2 000 one-kuruş payments make | |
| 359 | +/// stall for every other payment in the school: 2 000 one-minor-unit payments make | |
| 360 | 360 | /// the next one issue 2 001 queries with the lock held. Twenty pieces is |
| 361 | 361 | /// already a pathological way to settle a single installment. |
| 362 | 362 | pub const MAX_LEDGER_APPLIED_LINES: usize = 20; |
| @@ -596,7 +596,7 @@ pub const AI_RAG_CHAT_TIMEOUT_SECS: u64 = 90; | ||
| 596 | 596 | |
| 597 | 597 | /// The capability an AI service declares to analyse one student (ZEKA, |
| 598 | 598 | /// `hezarfen_zeka`). It is the on-demand half of ZEKA — the service also |
| 599 | -/// recomputes on its own schedule — and it is what a teacher's "hesapla" is | |
| 599 | +/// recomputes on its own schedule — and it is what a teacher's "calculate" is | |
| 600 | 600 | /// routed to. The service reads the student's own data back through the |
| 601 | 601 | /// bridge's api reads and has the backend write its `zeka_*` rows — no AI |
| 602 | 602 | /// service holds a school database credential here (see the storage-surface |
| @@ -612,7 +612,7 @@ pub const AI_INSIGHT_STUDENT_CAPABILITY: &str = "insight.student"; | ||
| 612 | 612 | pub const AI_INSIGHT_STUDENT_TIMEOUT_SECS: u64 = 120; |
| 613 | 613 | |
| 614 | 614 | /// The capability an AI service declares to analyse one class×course (a |
| 615 | -/// şube's own instance of a course). Declared here so the name exists in one | |
| 615 | +/// section's own instance of a course). Declared here so the name exists in one | |
| 616 | 616 | /// place, but **no door dispatches it yet**: the request would name a course |
| 617 | 617 | /// the service has to enumerate a roster for, and the bridge's read allowlist |
| 618 | 618 | /// carries no member listing — that half of the contract is still open |
| @@ -784,7 +784,7 @@ pub const PODCAST_JOB_STALE_ETA_FACTOR: i64 = 3; | ||
| 784 | 784 | /// a client sees one vocabulary however the job died. |
| 785 | 785 | pub const PODCAST_INTERRUPTED_CODE: &str = "interrupted"; |
| 786 | 786 | |
| 787 | -/// The most `(sınıf, ders)` scope pairs one `rag.chat` request may carry. The | |
| 787 | +/// The most `(class, course)` scope pairs one `rag.chat` request may carry. The | |
| 788 | 788 | /// corpus is routed by the **pair** — a grade and a subject list sent |
| 789 | 789 | /// separately would cross-product into combinations the asker never named — so |
| 790 | 790 | /// this is the number of pairs handed to the service in one call, bounding |
| @@ -1229,7 +1229,7 @@ pub const POMODORO_COUNTED_TODAY_FIELD: &str = "pomodoro_counted_today"; | ||
| 1229 | 1229 | pub const MIN_COUNTED_POMODORO_MS: i64 = 300_000; |
| 1230 | 1230 | pub const MAX_COUNTED_POMODORO_PER_DAY: i64 = 16; |
| 1231 | 1231 | /// A stint's optional student-given label — the student's own name for what |
| 1232 | -/// the stint is for ("math", "TYT denemesi"), free text rather than a subject | |
| 1232 | +/// the stint is for ("math", "mock exam"), free text rather than a subject | |
| 1233 | 1233 | /// link, bounded like the other short labels. |
| 1234 | 1234 | pub const MAX_POMODORO_LABEL_LEN: usize = 100; |
| 1235 | 1235 | /// The staff-side and second student-side totals, same shape and same rules: |
src/db/academic_year.rsmodified+8 -8
| @@ -2,12 +2,12 @@ | ||
| 2 | 2 | //! field-scoped PATCH whose `WHERE` re-checks the merged range, and the 0/0 |
| 3 | 3 | //! delete guard. |
| 4 | 4 | //! |
| 5 | -//! The year is the top of the academic calendar (D3): a şube belongs to a year | |
| 6 | -//! and a dönem ([`crate::db::term`]) is a grading slice inside it. Its two | |
| 7 | -//! counters are the delete guard — a year that still carries a şube or a dönem | |
| 8 | -//! is refused outright, because dropping it silently would strand the year's | |
| 9 | -//! structure. The rollover that reads and writes the şubeler lives one layer | |
| 10 | -//! up ([`crate::service::academic_year::rollover`]). | |
| 5 | +//! The year is the top of the academic calendar (D3): a section belongs to a | |
| 6 | +//! year and a term ([`crate::db::term`]) is a grading slice inside it. Its two | |
| 7 | +//! counters are the delete guard — a year that still carries a section or a | |
| 8 | +//! term is refused outright, because dropping it silently would strand the | |
| 9 | +//! year's structure. The rollover that reads and writes the sections lives one | |
| 10 | +//! layer up ([`crate::service::academic_year::rollover`]). | |
| 11 | 11 | |
| 12 | 12 | use sqlx::types::Json; |
| 13 | 13 | |
| @@ -175,7 +175,7 @@ pub async fn archive(db: &Database, id: &AcademicYearId) -> Result<Option<Academ | ||
| 175 | 175 | Ok(written) |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | -/// Delete the year, but only while no şube and no dönem links it — nothing | |
| 178 | +/// Delete the year, but only while no section and no term links it — nothing | |
| 179 | 179 | /// here unlinks or cascades. `false` = refused, nothing was written. |
| 180 | 180 | /// |
| 181 | 181 | /// Both counts are read off the year's own row, so the check and the delete |
| @@ -205,7 +205,7 @@ pub async fn delete(db: &Database, year: AcademicYear) -> Result<bool, AppError> | ||
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /// A real academic year for the fixtures of the tables that hang off one: a |
| 208 | -/// dönem ([`crate::db::term::a_test_term`]) and, through it, every exam. Minted | |
| 208 | +/// term ([`crate::db::term::a_test_term`]) and, through it, every exam. Minted | |
| 209 | 209 | /// per call — the name is unique — with a creator that is a real `app_user` |
| 210 | 210 | /// row, because `creator` is a foreign key. |
| 211 | 211 | #[cfg(test)] |
src/db/class_course.rsmodified+3 -3
| @@ -5,7 +5,7 @@ | ||
| 5 | 5 | //! [`crate::db::class_pump`]. |
| 6 | 6 | //! |
| 7 | 7 | //! An instance is the academic anchor now: it carries the weekly hours |
| 8 | -//! (`ders_saati`), whether it counts toward the karne, the roster counter and | |
| 8 | +//! (`ders_saati`), whether it counts toward the report card, the roster counter | |
| 9 | 9 | //! its own teachers ([`crate::db::class_course_teacher`]). Reads speak the |
| 10 | 10 | //! *bare uuid* id of the instance; the (class, course) pair survives as the |
| 11 | 11 | //! UNIQUE key the attach gates on. |
| @@ -82,7 +82,7 @@ pub async fn list_for_class( | ||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /// The instances one catalog course is taught in, newest first — the read |
| 85 | -/// behind "which şubeler run this course". | |
| 85 | +/// behind "which sections run this course". | |
| 86 | 86 | pub async fn list_for_course( |
| 87 | 87 | db: &Database, |
| 88 | 88 | course: &CourseId, |
| @@ -183,7 +183,7 @@ pub async fn read(db: &Database, id: &ClassCourseId) -> Result<Option<ClassCours | ||
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /// The class this instance belongs to, or `None` when the id names no row — |
| 186 | -/// the seam every instance-scoped route reads the şube (and, through it, the | |
| 186 | +/// the seam every instance-scoped route reads the section (and, through it, the | |
| 187 | 187 | /// year) off. |
| 188 | 188 | pub async fn class_of(db: &Database, id: &ClassCourseId) -> Result<Option<ClassGroupId>, AppError> { |
| 189 | 189 | let row = sqlx::query!( |
src/db/class_course_teacher.rsmodified+1 -1
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | //! The `class_course_teacher` junction: who teaches one instance. |
| 2 | 2 | //! |
| 3 | 3 | //! D6 moved teacher assignment off the catalog course and onto the instance — |
| 4 | -//! two şubeler teaching the same course may legitimately have different | |
| 4 | +//! two sections teaching the same course may legitimately have different | |
| 5 | 5 | //! teachers — so this is the table every instance-membership gate reads |
| 6 | 6 | //! ([`crate::service::class_course::ensure_instance_teacher`]) and the one the |
| 7 | 7 | //! demotion sweep strips ([`crate::db::user::set_role_cascade`]). |
src/db/class_group.rsmodified+12 -12
| @@ -12,7 +12,7 @@ use crate::domain::class_group::{ClassGrade, ClassGroup, ClassGroupId, ClassName | ||
| 12 | 12 | use crate::domain::user::UserId; |
| 13 | 13 | use crate::error::{AppError, ValidationError}; |
| 14 | 14 | |
| 15 | -/// The refusal a şube write naming a year that is not there gets — the mirror | |
| 15 | +/// The refusal a section write naming a year that is not there gets — the mirror | |
| 16 | 16 | /// of [`crate::domain::term::gone_error`], one layer up the calendar. |
| 17 | 17 | fn year_gone() -> AppError { |
| 18 | 18 | AppError::Validation(ValidationError::Invalid { |
| @@ -268,11 +268,11 @@ pub async fn list_for_year( | ||
| 268 | 268 | Ok(classes) |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | -/// Every class `user` is the homeroom teacher (sınıf öğretmeni) of, newest | |
| 272 | -/// first — the same order [`list_all`] gives, since this is a narrowing of | |
| 273 | -/// that list and not a second one. | |
| 271 | +/// Every class `user` is the homeroom teacher of, newest first — the same | |
| 272 | +/// order [`list_all`] gives, since this is a narrowing of that list and not a | |
| 273 | +/// second one. | |
| 274 | 274 | /// |
| 275 | -/// It is the read behind "which şubeler do I run": the homeroom teacher of a | |
| 275 | +/// It is the read behind "which sections do I run": the homeroom teacher of a | |
| 276 | 276 | /// section may act on every instance of it (D10, the third arm of |
| 277 | 277 | /// [`crate::service::class_course::ensure_instance_teacher`]) without being a |
| 278 | 278 | /// member of it or assigned to the instance — and without a read like this the |
| @@ -321,7 +321,7 @@ pub async fn unassign_everywhere(db: &Database, user: &UserId) -> Result<(), App | ||
| 321 | 321 | /// the delete as a `23503`), plus the provenance tags naming it from rows that |
| 322 | 322 | /// outlive it — a rollover copy's `source_class_group` and a handed-over |
| 323 | 323 | /// enrollment's `source`, both hard foreign keys into this table. Dropping a |
| 324 | -/// şube takes its own history with it; a row that merely *remembers* the şube | |
| 324 | +/// section takes its own history with it; a row that merely *remembers* the section | |
| 325 | 325 | /// keeps standing, untagged. An event aimed at the class keeps standing with |
| 326 | 326 | /// `audience_class` cleared — the course twin's documented outcome |
| 327 | 327 | /// (`db::course::delete`): the roster resolves live, so it simply reads empty. |
| @@ -363,7 +363,7 @@ pub async fn delete(db: &Database, class: ClassGroup) -> Result<bool, AppError> | ||
| 363 | 363 | ) |
| 364 | 364 | .execute(&mut *tx) |
| 365 | 365 | .await?; |
| 366 | - // The roster history goes with the şube. The 0/0 guard counts *live* | |
| 366 | + // The roster history goes with the section. The 0/0 guard counts *live* | |
| 367 | 367 | // stints, so a class whose last student soft-left passes it with the |
| 368 | 368 | // history row still standing — and `class_member.class` is a hard |
| 369 | 369 | // foreign key, which would answer the delete below as a `23503`. |
| @@ -373,11 +373,11 @@ pub async fn delete(db: &Database, class: ClassGroup) -> Result<bool, AppError> | ||
| 373 | 373 | ) |
| 374 | 374 | .execute(&mut *tx) |
| 375 | 375 | .await?; |
| 376 | - // …and the same key from the *other* side: a stint another şube holds | |
| 376 | + // …and the same key from the *other* side: a stint another section holds | |
| 377 | 377 | // remembers where it came from (a rollover copy's `source_class_group`) |
| 378 | 378 | // and an enrollment a class wrote remembers which class pumped it |
| 379 | 379 | // (its `source`). Both are hard keys into this row, so both would |
| 380 | - // refuse the delete. The rows outlive the şube and stay; only the tag | |
| 380 | + // refuse the delete. The rows outlive the section and stay; only the tag | |
| 381 | 381 | // goes. |
| 382 | 382 | sqlx::query!( |
| 383 | 383 | r#"UPDATE class_member SET source_class_group = NULL WHERE source_class_group = $1"#, |
| @@ -442,7 +442,7 @@ mod tests { | ||
| 442 | 442 | UserId::from_key(&id.to_string()) |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | - /// A real academic year: the şube's year link is a foreign key now, and | |
| 445 | + /// A real academic year: the section's year link is a foreign key now, and | |
| 446 | 446 | /// the class-count claim it carries is what these tests are about. |
| 447 | 447 | async fn a_year(name: &str, db: &Database) -> AcademicYear { |
| 448 | 448 | let at = crate::domain::timestamp::Timestamp::from_millis; |
| @@ -617,7 +617,7 @@ mod tests { | ||
| 617 | 617 | } |
| 618 | 618 | |
| 619 | 619 | /// The bite test for the class half of the academic-year delete guard |
| 620 | - /// (D3): a year is undeletable while a *şube* links it, on its own | |
| 620 | + /// (D3): a year is undeletable while a *section* links it, on its own | |
| 621 | 621 | /// column, and every way that link can end gives the reference back. |
| 622 | 622 | /// Claiming into `term_count` instead would pass the first assert and |
| 623 | 623 | /// fail the roundtrip through the year's own delete. |
| @@ -871,7 +871,7 @@ mod tests { | ||
| 871 | 871 | /// none — so the class passes it with the history row still standing, and |
| 872 | 872 | /// `class_member.class` (a hard foreign key) is what used to answer this |
| 873 | 873 | /// delete, as a `23503` the route turns into a 500. The roster history |
| 874 | - /// goes with the şube it belongs to. | |
| 874 | + /// goes with the section it belongs to. | |
| 875 | 875 | #[tokio::test] |
| 876 | 876 | async fn a_soft_left_member_does_not_block_the_delete_and_goes_with_it() { |
| 877 | 877 | use crate::db::class_pump::{self, Attached}; |
src/db/class_member.rsmodified+4 -4
| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | //! [`crate::service::class_member`]. |
| 5 | 5 | //! |
| 6 | 6 | //! The table is a history: `left_at` NULL is the live stint, and every read |
| 7 | -//! here filters on it — a student who left the şube holds no seat and appears | |
| 8 | -//! on no roster, while their earlier row survives for the record (and for the | |
| 9 | -//! karne's attribution). | |
| 7 | +//! here filters on it — a student who left the section holds no seat and | |
| 8 | +//! appears on no roster, while their earlier row survives for the record (and | |
| 9 | +//! for the report card's attribution). | |
| 10 | 10 | |
| 11 | 11 | use crate::constant::CLASS_MEMBER_TABLE; |
| 12 | 12 | use crate::database::Database; |
| @@ -34,7 +34,7 @@ pub async fn list_for_class( | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /// The classes one student is currently in, newest stint first — the read |
| 37 | -/// behind "which class section (şube) am I in". A left stint is history and | |
| 37 | +/// behind "which class section am I in". A left stint is history and | |
| 38 | 38 | /// does not appear. |
| 39 | 39 | pub async fn list_for_user( |
| 40 | 40 | db: &Database, |
src/db/class_pump.rsmodified+9 -9
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | //! The pump behind the class layer: one link row changed, and every |
| 2 | 2 | //! `enrollment` row that link implies reconciled with it, in one transaction. |
| 3 | 3 | //! |
| 4 | -//! A class section (şube) has two link tables — `class_member` (a student in | |
| 4 | +//! A class section has two link tables — `class_member` (a student in | |
| 5 | 5 | //! it) and `class_course` (a course attached to it, as that class×course |
| 6 | 6 | //! *instance*) — and the *product* of the two is the roster it owes: every |
| 7 | 7 | //! live member is enrolled in every instance the class carries, in real |
| @@ -387,7 +387,7 @@ pub(crate) async fn add_member( | ||
| 387 | 387 | add_member_sourced(db, class, user, by, None).await |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | -/// [`add_member`] carrying the stint's *provenance*: the şube the student was | |
| 390 | +/// [`add_member`] carrying the stint's *provenance*: the section the student was | |
| 391 | 391 | /// copied from, written into `source_class_group` in the same statement as |
| 392 | 392 | /// the row. `None` is the hand add — a student someone put here, who came |
| 393 | 393 | /// from nowhere (the pump is the only writer of this column, and a rollover |
| @@ -508,13 +508,13 @@ pub(crate) async fn add_member_sourced( | ||
| 508 | 508 | /// |
| 509 | 509 | /// The instance's own id is minted here (v7, so a class's instances list in |
| 510 | 510 | /// creation order) and its policy columns take the schema defaults: one weekly |
| 511 | -/// hour, counted toward the karne, an empty roster. A PATCH on `/instances` | |
| 511 | +/// hour, counted toward the report card, an empty roster. A PATCH on `/instances` | |
| 512 | 512 | /// changes them afterwards. |
| 513 | 513 | /// |
| 514 | 514 | /// Two counters ride the write, both in this one transaction: the class's |
| 515 | 515 | /// `class_course_count` (claimed by the conditional CTE, so a full or gone |
| 516 | 516 | /// class writes nothing) and the *catalog's* `class_course_count` — how many |
| 517 | -/// şubeler teach this course, which is what [`crate::db::course::delete`]'s | |
| 517 | +/// sections teach this course, which is what [`crate::db::course::delete`]'s | |
| 518 | 518 | /// guard reads. This is the only insert path into `class_course`; every layer |
| 519 | 519 | /// above it (hand attach, blueprint pump, rollover copy) reaches the counter |
| 520 | 520 | /// through here. |
| @@ -583,7 +583,7 @@ pub(crate) async fn attach_course( | ||
| 583 | 583 | Attached::Gone |
| 584 | 584 | }); |
| 585 | 585 | } |
| 586 | - // The catalog's own counter: how many şubeler teach this course. It is | |
| 586 | + // The catalog's own counter: how many sections teach this course. It is | |
| 587 | 587 | // what [`crate::db::course::delete`]'s guard reads — a course a class |
| 588 | 588 | // still teaches may not go — and this insert is the only place it can |
| 589 | 589 | // be claimed. It is a *count*, not a capacity (D5: nothing is refused |
| @@ -788,7 +788,7 @@ pub(crate) async fn leave_member( | ||
| 788 | 788 | /// The sweep's rule, and it is the whole rule: **every row the ended stint |
| 789 | 789 | /// owned goes, and each instance gets its roster count back**. An enrollment |
| 790 | 790 | /// is keyed `(class_course, app_user)` — one row per *instance* — so a student |
| 791 | -/// in two şubeler that teach the same course holds two rows, one on each | |
| 791 | +/// in two sections that teach the same course holds two rows, one on each | |
| 792 | 792 | /// section's instance, and the seat they keep is the other section's own row, |
| 793 | 793 | /// written when they joined it. Handing this row over to a rival class (the |
| 794 | 794 | /// pre-remodel rule, when one school-wide course carried one roster) would |
| @@ -875,7 +875,7 @@ async fn drop_member( | ||
| 875 | 875 | .collect::<Vec<_>>(); |
| 876 | 876 | // Every row this class's tag owns goes, and each instance gets its |
| 877 | 877 | // roster count back — see the doc above: the student's seat in a |
| 878 | - // second şube teaching the same course is that şube's *own* row, so | |
| 878 | + // second section teaching the same course is that section's *own* row, so | |
| 879 | 879 | // there is no heir to hand this one over to. |
| 880 | 880 | for (instance, member) in rows { |
| 881 | 881 | release(tx, instance, member).await?; |
| @@ -969,7 +969,7 @@ pub(crate) async fn detach_course( | ||
| 969 | 969 | .execute(&mut *tx) |
| 970 | 970 | .await?; |
| 971 | 971 | // …and the catalog's own counter: the course is taught in one fewer |
| 972 | - // şube from this commit. Same transaction as the delete, so the link | |
| 972 | + // section from this commit. Same transaction as the delete, so the link | |
| 973 | 973 | // and its count move together — `course::delete`'s guard reads this, |
| 974 | 974 | // and a course whose last instance was just detached is deletable the |
| 975 | 975 | // moment this lands. `GREATEST` for the same reason the class counter |
| @@ -988,7 +988,7 @@ pub(crate) async fn detach_course( | ||
| 988 | 988 | |
| 989 | 989 | /// The row goes, and the instance's roster count with it. It is the *only* |
| 990 | 990 | /// fate for an enrollment a section's exit owns: the roster is per instance |
| 991 | -/// (D4), so a student who is also in another şube teaching the same course | |
| 991 | +/// (D4), so a student who is also in another section teaching the same course | |
| 992 | 992 | /// keeps their seat there through that section's own row — see |
| 993 | 993 | /// [`drop_member`]. |
| 994 | 994 | /// |
src/db/course.rsmodified+10 -10
| @@ -3,7 +3,7 @@ | ||
| 3 | 3 | //! Listed newest first; deleted with its whole subtree in one guarded cascade. |
| 4 | 4 | //! |
| 5 | 5 | //! The catalog is a template since the K12 remodel (D1): the academic work — |
| 6 | -//! roster, exams, timetable, teachers — lives on the instances a şube attaches, | |
| 6 | +//! roster, exams, timetable, teachers — lives on the instances a section attaches, | |
| 7 | 7 | //! so this row carries only what every instance shares (title, description, |
| 8 | 8 | //! kind) and two counters. The catalog is Manager+-owned (D6): there is no |
| 9 | 9 | //! per-teacher ownership list, and the two counters are the delete guard. |
| @@ -46,7 +46,7 @@ impl CourseRow { | ||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /// Mint a catalog course. No term is claimed any more: the catalog is not |
| 49 | -/// bound to a dönem (exams are, through their instance), and no capacity is | |
| 49 | +/// bound to a term (exams are, through their instance), and no capacity is | |
| 50 | 50 | /// stored — the roster counter lives on the instance and gates nothing. |
| 51 | 51 | pub async fn create( |
| 52 | 52 | db: &Database, |
| @@ -464,12 +464,12 @@ pub(crate) async fn sweep_instance_subtree( | ||
| 464 | 464 | .await?; |
| 465 | 465 | // Both directions of the audience table, and each has to go before the |
| 466 | 466 | // row it names. The rows *addressed to* this instance (an exam owned by |
| 467 | - // another instance may be announced here — an ortak sınav) reference the | |
| 467 | + // another instance may be announced here — a shared exam) reference the | |
| 468 | 468 | // `class_course` row the caller deletes right after this sweep and would |
| 469 | 469 | // otherwise refuse it with a `23503`. The rows *of* the exams this sweep |
| 470 | 470 | // deletes reference *those* exams the same way (`exam_audience.exam` is |
| 471 | 471 | // `NO ACTION` too), so they block the `DELETE FROM exam` below wherever |
| 472 | - // they point — an audience of a swept exam in a şube that is *not* being | |
| 472 | + // they point — an audience of a swept exam in a section that is *not* being | |
| 473 | 473 | // detached included. |
| 474 | 474 | // |
| 475 | 475 | // The instance row is held `FOR UPDATE` by the caller from before this |
| @@ -543,12 +543,12 @@ pub(crate) async fn sweep_instance_subtree( | ||
| 543 | 543 | ) |
| 544 | 544 | .execute(&mut *tx) |
| 545 | 545 | .await?; |
| 546 | - // The swept exams give their dönem's reference back off the rows this | |
| 546 | + // The swept exams give their term's reference back off the rows this | |
| 547 | 547 | // statement removed, per term (the mirror of `Exam::delete`'s |
| 548 | 548 | // single-exam release): `db::exam::create` claimed `term.exam_count` for |
| 549 | - // each of them, and a claim nothing releases leaves the dönem's | |
| 549 | + // each of them, and a claim nothing releases leaves the term's | |
| 550 | 550 | // `exam_count = 0` delete guard permanently failing — which takes the |
| 551 | - // term, and the academic year whose own guard counts its dönems, down | |
| 551 | + // term, and the academic year whose own guard counts its terms, down | |
| 552 | 552 | // with it. Fused with the delete for the same reason the two releases |
| 553 | 553 | // above are: a concurrent single-exam delete releases its own claim, so a |
| 554 | 554 | // count taken before this statement could give one back twice. |
| @@ -848,7 +848,7 @@ mod tests { | ||
| 848 | 848 | } |
| 849 | 849 | |
| 850 | 850 | /// A catalog course, minted per call. The catalog is a school-wide |
| 851 | - /// template since the remodel: no dönem to link, no capacity to store. | |
| 851 | + /// template since the remodel: no term to link, no capacity to store. | |
| 852 | 852 | async fn a_course(db: &Database) -> Course { |
| 853 | 853 | create( |
| 854 | 854 | db, |
| @@ -861,7 +861,7 @@ mod tests { | ||
| 861 | 861 | .unwrap() |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | - /// A şube, for the tests that need an instance attached to it. | |
| 864 | + /// A section, for the tests that need an instance attached to it. | |
| 865 | 865 | async fn a_class( |
| 866 | 866 | on: &UserId, |
| 867 | 867 | name: &str, |
| @@ -993,7 +993,7 @@ mod tests { | ||
| 993 | 993 | async fn a_delete_racing_an_attach_never_answers_500() { |
| 994 | 994 | let (db, _leases) = crate::database::init_test_db().await; |
| 995 | 995 | let manager = a_person(&db, "mgr", "manager").await; |
| 996 | - // One şube per racer; each round attaches them all into one fresh | |
| 996 | + // One section per racer; each round attaches them all into one fresh | |
| 997 | 997 | // catalog course, so the round's delete has six rival claims to meet. |
| 998 | 998 | let mut classes = Vec::new(); |
| 999 | 999 | for seat in 0..6 { |
src/db/course_membership.rsmodified+5 -5
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | //! The `course_membership` table: a student's individual membership in a |
| 2 | -//! *school-scoped* course (D9) — a kulüp or an etüt, joined directly rather | |
| 3 | -//! than through a şube's instance. | |
| 2 | +//! *school-scoped* course (D9) — a club or a supervised study, joined directly | |
| 3 | +//! rather than through a section's instance. | |
| 4 | 4 | //! |
| 5 | 5 | //! It is the `enrollment` table's twin minus two things: the instance key (a |
| 6 | 6 | //! club has no class to belong to) and the roster pump's `source` tag (a |
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | //! |
| 11 | 11 | //! Whether a given course *may* be joined this way is |
| 12 | 12 | //! [`crate::service::enrollment::join_activity`]'s decision: a class-delivered |
| 13 | -//! ders ([`crate::domain::course::CourseKind::is_class_delivered`]) is joined | |
| 13 | +//! course ([`crate::domain::course::CourseKind::is_class_delivered`]) is joined | |
| 14 | 14 | //! through its instance, never here. |
| 15 | 15 | |
| 16 | 16 | use crate::database::{Database, tx_with_retry, unique_violation}; |
| @@ -174,8 +174,8 @@ pub async fn list_for_course( | ||
| 174 | 174 | .await |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | -/// Every membership `user` holds, newest first — the "my clubs and etüts" | |
| 178 | -/// read. | |
| 177 | +/// Every membership `user` holds, newest first — the "my clubs and supervised | |
| 178 | +/// studies" read. | |
| 179 | 179 | pub async fn list_for_user( |
| 180 | 180 | db: &Database, |
| 181 | 181 | user: &UserId, |
src/db/enrollment.rsmodified+7 -7
| @@ -42,7 +42,7 @@ enum Verdict { | ||
| 42 | 42 | /// records. |
| 43 | 43 | /// |
| 44 | 44 | /// `source` is the class the roster pump wrote this row on behalf of, or |
| 45 | -/// `None` for a hand-placed (seçmeli) enrollment. The two halves of that | |
| 45 | +/// `None` for a hand-placed (elective) enrollment. The two halves of that | |
| 46 | 46 | /// rule: only a row carrying the key is a class's to take back |
| 47 | 47 | /// ([`crate::db::class_pump`]), and a hand unenroll wins permanently. |
| 48 | 48 | /// |
| @@ -260,7 +260,7 @@ pub async fn list_for_exam_audience( | ||
| 260 | 260 | /// behind an event addressed at a course. |
| 261 | 261 | /// |
| 262 | 262 | /// The two membership tiers again: an enrollment in any of the course's |
| 263 | -/// instances, or an individual club/etüt membership. Both are existence | |
| 263 | +/// instances, or an individual club/supervised-study membership. Both are existence | |
| 264 | 264 | /// probes on their own indexes; one entity's audience must not fold a whole |
| 265 | 265 | /// roster to answer yes. |
| 266 | 266 | pub async fn user_is_in_course( |
| @@ -289,11 +289,11 @@ pub async fn user_is_in_course( | ||
| 289 | 289 | /// instances' rosters and its own individual memberships. |
| 290 | 290 | /// |
| 291 | 291 | /// One course's "students" is two populations since D9 split the two tiers: a |
| 292 | -/// ders reaches them through the instance a şube teaches (enrollment), and a | |
| 293 | -/// club/etüt through the school-scoped membership. A reader that wants the | |
| 294 | -/// course's audience — an event addressed at the course, a who-missed report — | |
| 295 | -/// means both, and deduping in SQL keeps a student who is in two of its | |
| 296 | -/// instances on the list once. | |
| 292 | +/// course reaches them through the instance a section teaches (enrollment), and | |
| 293 | +/// a club or supervised study through the school-scoped membership. A reader | |
| 294 | +/// that wants the course's audience — an event addressed at the course, a | |
| 295 | +/// who-missed report — means both, and deduping in SQL keeps a student who is | |
| 296 | +/// in two of its instances on the list once. | |
| 297 | 297 | pub async fn list_users_for_course( |
| 298 | 298 | db: &Database, |
| 299 | 299 | course: &CourseId, |
src/db/event.rsmodified+1 -1
| @@ -35,7 +35,7 @@ pub async fn includes(db: &Database, event: &Event, user: &User) -> Result<bool, | ||
| 35 | 35 | // The (class, user) pair is the membership row's own key, so the point |
| 36 | 36 | // check is one existence probe — and `left_at IS NULL` makes it the |
| 37 | 37 | // *live* stint's, the row the partial unique index |
| 38 | - // `class_member_live_pair` carries: a student who left the şube is | |
| 38 | + // `class_member_live_pair` carries: a student who left the section is | |
| 39 | 39 | // history, not audience, and a stale probe would let them be marked |
| 40 | 40 | // present at (and counted by) an event their section no longer |
| 41 | 41 | // attends. |
src/db/exam.rsmodified+13 -13
| @@ -35,11 +35,11 @@ pub async fn create( | ||
| 35 | 35 | draft: bool, |
| 36 | 36 | ) -> Result<Exam, AppError> { |
| 37 | 37 | // A missing parent is refused by the real foreign keys: an instance, a |
| 38 | - // dönem or a creator that is gone is `SQLSTATE 23503`, and this call | |
| 38 | + // term or a creator that is gone is `SQLSTATE 23503`, and this call | |
| 39 | 39 | // site's parent-gone answer is the same `NotFound` the old |
| 40 | 40 | // existence-proof touch answered with. |
| 41 | 41 | // |
| 42 | - // The dönem is *claimed* in the same statement as the row (`exam_count` | |
| 42 | + // The term is *claimed* in the same statement as the row (`exam_count` | |
| 43 | 43 | // +1, a conditional write on the term row), the shape the old course |
| 44 | 44 | // create used against `term.course_count`: the count is what the term's |
| 45 | 45 | // own delete guard reads, and claim-and-insert in one CTE means no crash |
| @@ -47,8 +47,8 @@ pub async fn create( | ||
| 47 | 47 | // |
| 48 | 48 | // The owner's `exam_audience` row is written in the same transaction, |
| 49 | 49 | // *always*: the audience is what every listing reads through, so an exam |
| 50 | - // with no audience row would be invisible to its own instance. An ortak | |
| 51 | - // sınav is extra audience rows on this one exam (D2), never a second | |
| 50 | + // with no audience row would be invisible to its own instance. A shared | |
| 51 | + // exam is extra audience rows on this one exam (D2), never a second | |
| 52 | 52 | // shape. |
| 53 | 53 | let id = ExamId::generate(); |
| 54 | 54 | let creator = *creator; |
| @@ -104,7 +104,7 @@ pub async fn create( | ||
| 104 | 104 | /// future type rustc can check, exactly as |
| 105 | 105 | /// [`crate::db::answer_image::upsert_in`] does for the same reason. |
| 106 | 106 | /// |
| 107 | -/// Everything it decides is the closure's own: a claim that matched no dönem | |
| 107 | +/// Everything it decides is the closure's own: a claim that matched no term | |
| 108 | 108 | /// row is [`crate::domain::term::gone_error`], any other foreign key is the |
| 109 | 109 | /// parent-gone `NotFound`, and the audience row is written in the same |
| 110 | 110 | /// transaction as the row it names. |
| @@ -171,7 +171,7 @@ pub(crate) async fn insert_in( | ||
| 171 | 171 | .await; |
| 172 | 172 | let exam = match written { |
| 173 | 173 | Ok(Some(exam)) => exam, |
| 174 | - // The conditional claim matched no dönem row: the term is gone. | |
| 174 | + // The conditional claim matched no term row: the term is gone. | |
| 175 | 175 | Ok(None) => return Err(crate::domain::term::gone_error()), |
| 176 | 176 | Err(err) if foreign_key_violation(&err) => return Err(AppError::NotFound), |
| 177 | 177 | Err(err) => return Err(err.into()), |
| @@ -229,7 +229,7 @@ pub async fn list_all(db: &Database) -> Result<Vec<Exam>, AppError> { | ||
| 229 | 229 | /// |
| 230 | 230 | /// It reads through `exam_audience` rather than off `exam.class_course`: the |
| 231 | 231 | /// owner's row is always there (the create writes it), so the two agree for |
| 232 | -/// every exam this instance owns, and the join is what lets an ortak sınav be | |
| 232 | +/// every exam this instance owns, and the join is what lets a shared exam be | |
| 233 | 233 | /// one exam addressed to several instances (D2) without a second read path. |
| 234 | 234 | pub async fn list_for_class_course( |
| 235 | 235 | db: &Database, |
| @@ -258,12 +258,12 @@ pub async fn list_for_class_course( | ||
| 258 | 258 | .await?) |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | -/// Every exam of every instance in `instances` (one query) — the karne and | |
| 261 | +/// Every exam of every instance in `instances` (one query) — the report card and | |
| 262 | 262 | /// marks reports' cross-instance read, and the list behind a caller's visible |
| 263 | 263 | /// courses. |
| 264 | 264 | /// |
| 265 | 265 | /// `DISTINCT ON (e.id)` because an exam may be addressed to several instances |
| 266 | -/// at once (an ortak sınav): the filters ask "is this exam visible here", not | |
| 266 | +/// at once (a shared exam): the filters ask "is this exam visible here", not | |
| 267 | 267 | /// "how many audiences does it have", so each exam is returned once with its |
| 268 | 268 | /// own owner instance. |
| 269 | 269 | pub async fn list_for_class_course_courses( |
| @@ -536,7 +536,7 @@ pub async fn delete(db: &Database, target: Exam) -> Result<Deleted, AppError> { | ||
| 536 | 536 | true, |
| 537 | 537 | async move |conn| { |
| 538 | 538 | // The row lock every other exam-child writer contends on. The |
| 539 | - // dönem rides out of the same read: the term's `exam_count` is | |
| 539 | + // term rides out of the same read: the term's `exam_count` is | |
| 540 | 540 | // given back in this transaction, and the row that names it is |
| 541 | 541 | // the one being deleted. |
| 542 | 542 | let locked = sqlx::query!( |
| @@ -653,7 +653,7 @@ pub async fn delete(db: &Database, target: Exam) -> Result<Deleted, AppError> { | ||
| 653 | 653 | let Some(exam) = deleted else { |
| 654 | 654 | return Err(AppError::NotFound); |
| 655 | 655 | }; |
| 656 | - // The dönem gets its exam reference back inside the same | |
| 656 | + // The term gets its exam reference back inside the same | |
| 657 | 657 | // transaction — the other half of the claim `create` makes. |
| 658 | 658 | sqlx::query!( |
| 659 | 659 | r#"UPDATE term SET exam_count = GREATEST(exam_count - 1, 0) |
| @@ -696,7 +696,7 @@ pub(crate) async fn published_exam(db: &Database) -> Exam { | ||
| 696 | 696 | .execute(db) |
| 697 | 697 | .await |
| 698 | 698 | .unwrap(); |
| 699 | - // The exam hangs off the *instance* and carries the dönem it is graded in | |
| 699 | + // The exam hangs off the *instance* and carries the term it is graded in | |
| 700 | 700 | // (both foreign keys): both are real rows, minted per call — |
| 701 | 701 | // [`crate::db::course::a_test_instance`] mints the class, the course and |
| 702 | 702 | // the link, [`crate::db::term::a_test_term`] the year under the term. |
| @@ -761,7 +761,7 @@ mod tests { | ||
| 761 | 761 | .execute(&db) |
| 762 | 762 | .await |
| 763 | 763 | .unwrap(); |
| 764 | - // The exam's parents: a dönem, and an instance of *this* | |
| 764 | + // The exam's parents: a term, and an instance of *this* | |
| 765 | 765 | // course. Attaching it is the claim the racing delete |
| 766 | 766 | // contends on, so the round where the course is gone refuses |
| 767 | 767 | // here — which is the refusal this test wants to see answered. |
src/db/exam_answer.rsmodified+1 -1
| @@ -312,7 +312,7 @@ mod tests { | ||
| 312 | 312 | let kinds = crate::domain::settings::Settings::defaults() |
| 313 | 313 | .get_exam_kinds() |
| 314 | 314 | .to_vec(); |
| 315 | - // The instance and the dönem are foreign keys now: real rows the | |
| 315 | + // The instance and the term are foreign keys now: real rows the | |
| 316 | 316 | // fixture mints. |
| 317 | 317 | let (instance, _course) = crate::db::course::a_test_instance(&db).await; |
| 318 | 318 | let term = crate::db::term::a_test_term(&db).await; |
src/db/exam_attempt.rsmodified+1 -1
| @@ -400,7 +400,7 @@ mod tests { | ||
| 400 | 400 | .execute(db) |
| 401 | 401 | .await |
| 402 | 402 | .unwrap(); |
| 403 | - // The instance and the dönem are foreign keys now: real rows the | |
| 403 | + // The instance and the term are foreign keys now: real rows the | |
| 404 | 404 | // fixture mints. |
| 405 | 405 | let (instance, _course) = crate::db::course::a_test_instance(db).await; |
| 406 | 406 | let term = crate::db::term::a_test_term(db).await; |
src/db/exam_audience.rsmodified+5 -5
| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | //! Every exam is *owned* by exactly one instance — the `class_course` column |
| 4 | 4 | //! on its own row — and [`crate::db::exam::insert_in`] writes that owner's |
| 5 | 5 | //! audience row in the same transaction as the exam. The rows beyond it are |
| 6 | -//! the **ortak sınav**'s (D2): one exam announced to another şube's instance, | |
| 6 | +//! the **shared exam**'s (D2): one exam announced to another section's instance, | |
| 7 | 7 | //! sat and graded once, standing in every addressed instance's marks and |
| 8 | -//! karne. Every exam read goes through this table | |
| 8 | +//! report card. Every exam read goes through this table | |
| 9 | 9 | //! ([`crate::db::exam::list_for_class_course`] and the marks reports' joins), |
| 10 | 10 | //! so the audience set is the single answer to "which instances does this |
| 11 | 11 | //! exam belong to" and the owner column is only the join's tie-break. |
| @@ -27,7 +27,7 @@ use crate::domain::user::UserId; | ||
| 27 | 27 | use crate::error::AppError; |
| 28 | 28 | |
| 29 | 29 | /// One audience row, resolved to what a client needs to name it: the |
| 30 | -/// instance, the şube it belongs to and the catalog course it teaches. | |
| 30 | +/// instance, the section it belongs to and the catalog course it teaches. | |
| 31 | 31 | #[derive(Debug, sqlx::FromRow)] |
| 32 | 32 | pub struct Audience { |
| 33 | 33 | class_course: ClassCourseId, |
| @@ -41,7 +41,7 @@ impl Audience { | ||
| 41 | 41 | &self.class_course |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - /// The şube that instance belongs to. | |
| 44 | + /// The section that instance belongs to. | |
| 45 | 45 | pub fn get_class(&self) -> &ClassGroupId { |
| 46 | 46 | &self.class |
| 47 | 47 | } |
| @@ -141,7 +141,7 @@ pub async fn list_for_instance( | ||
| 141 | 141 | /// The enrollment predicate the sitting and grading gates ask once one exam |
| 142 | 142 | /// can be announced to several instances (D2): for an exam nobody was |
| 143 | 143 | /// announced to this is the owner-only check those gates used to run, row for |
| 144 | -/// row, and for an ortak sınav it admits the addressed sections' students — | |
| 144 | +/// row, and for a shared exam it admits the addressed sections' students — | |
| 145 | 145 | /// who sit and are graded at their own instance exactly like the owner's. |
| 146 | 146 | pub async fn enrolled(db: &Database, exam: &ExamId, user: &UserId) -> Result<bool, AppError> { |
| 147 | 147 | Ok(sqlx::query_scalar!( |
src/db/exam_question.rsmodified+1 -1
| @@ -458,7 +458,7 @@ mod tests { | ||
| 458 | 458 | .await |
| 459 | 459 | .unwrap(); |
| 460 | 460 | let kinds = Settings::defaults().get_exam_kinds().to_vec(); |
| 461 | - // The instance and the dönem are foreign keys now: real rows the | |
| 461 | + // The instance and the term are foreign keys now: real rows the | |
| 462 | 462 | // fixture mints, per call. |
| 463 | 463 | let (instance, _course) = crate::db::course::a_test_instance(db).await; |
| 464 | 464 | let term = crate::db::term::a_test_term(db).await; |
src/db/exam_result.rsmodified+14 -14
| @@ -207,7 +207,7 @@ pub async fn grade( | ||
| 207 | 207 | /// behind the per-instance block of the marks report. |
| 208 | 208 | /// |
| 209 | 209 | /// It reads `exam_audience`, not `exam.class_course`: an exam addressed to |
| 210 | -/// several instances (an ortak sınav) is *each* of their exams, and its marks | |
| 210 | +/// several instances (a shared exam) is *each* of their exams, and its marks | |
| 211 | 211 | /// count in every one of them, not only in the owner's. The owner's audience |
| 212 | 212 | /// row is always written with the exam, so for an exam nobody else was |
| 213 | 213 | /// addressed to this is the same set the owner column used to give. |
| @@ -264,14 +264,14 @@ impl AttributedResult { | ||
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | -/// The user's graded results inside one dönem, each paired with the instance it | |
| 268 | -/// counts under — the karne's input slice (D8: a karne is per dönem, and an | |
| 269 | -/// exam belongs to the dönem it was sat in). | |
| 267 | +/// The user's graded results inside one term, each paired with the instance it | |
| 268 | +/// counts under — the report card's input slice (D8: a report card is per term, | |
| 269 | +/// and an exam belongs to the term it was sat in). | |
| 270 | 270 | /// |
| 271 | 271 | /// A mark comes back once per *queried* instance the exam is addressed to |
| 272 | -/// (`exam_audience`), not only under its owner: an ortak sınav announced to | |
| 272 | +/// (`exam_audience`), not only under its owner: a shared exam announced to | |
| 273 | 273 | /// several instances is each of their exams, and this is what puts its mark in |
| 274 | -/// every one of their karnes. Only the latest sitting per (instance, exam) | |
| 274 | +/// every one of their report cards. Only the latest sitting per (instance, exam) | |
| 275 | 275 | /// comes back, the grade-of-record the per-instance read folds to as well. |
| 276 | 276 | pub async fn list_for_user_in_term( |
| 277 | 277 | db: &Database, |
| @@ -481,23 +481,23 @@ pub(crate) mod tests { | ||
| 481 | 481 | pub(crate) const ORTAK_MARK: i64 = 85; |
| 482 | 482 | pub(crate) const OWNER_MARK: i64 = 45; |
| 483 | 483 | |
| 484 | - /// The shape the audience attribution is read against: two şubeler, one | |
| 484 | + /// The shape the audience attribution is read against: two sections, one | |
| 485 | 485 | /// catalog course and one student who is a live member of both, so the |
| 486 | - /// karne and the marks report each carry a line for *both* instances. | |
| 486 | + /// report card and the marks report each carry a line for *both* instances. | |
| 487 | 487 | pub(crate) struct OrtakExam { |
| 488 | 488 | pub student: UserId, |
| 489 | 489 | pub term: TermId, |
| 490 | 490 | /// The instance both exams were created in — their owner. |
| 491 | 491 | pub owner: ClassCourseId, |
| 492 | - /// The other instance the ortak exam was addressed to. | |
| 492 | + /// The other instance the shared exam was addressed to. | |
| 493 | 493 | pub addressed: ClassCourseId, |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | - /// A year with one dönem, two şubeler of it carrying the same catalog | |
| 496 | + /// A year with one term, two sections of it carrying the same catalog | |
| 497 | 497 | /// course, and one student who sits both. Two exams are created in the |
| 498 | - /// first şube's instance and graded: one owned there but **addressed to | |
| 498 | + /// first section's instance and graded: one owned there but **addressed to | |
| 499 | 499 | /// both** (the second `exam_audience` row is written directly, which is |
| 500 | - /// what a school-wide ortak sınav is), the other addressed to its owner | |
| 500 | + /// what a school-wide shared exam is), the other addressed to its owner | |
| 501 | 501 | /// alone. |
| 502 | 502 | /// |
| 503 | 503 | /// That is what tells the two conclusions apart: read through |
| @@ -590,7 +590,7 @@ pub(crate) mod tests { | ||
| 590 | 590 | .await |
| 591 | 591 | .unwrap(); |
| 592 | 592 | if addressed_to_both { |
| 593 | - // The ortak half: the create wrote the owner's audience row, | |
| 593 | + // The shared-exam half: the create wrote the owner's audience row, | |
| 594 | 594 | // and the school announces the exam to the second section too. |
| 595 | 595 | sqlx::query("INSERT INTO exam_audience (exam, class_course) VALUES ($1, $2)") |
| 596 | 596 | .bind(exam.get_id().uuid()) |
| @@ -740,7 +740,7 @@ pub(crate) mod tests { | ||
| 740 | 740 | async fn an_exam(db: &Database, exam: &ExamId, kind: &str) { |
| 741 | 741 | // The exam has to be real: a mark is refused on one that isn't. Its |
| 742 | 742 | // creator is a real row (idempotently — [`the_two_people`] re-runs it) |
| 743 | - // and so are its parents: the instance it is taught in and the dönem it | |
| 743 | + // and so are its parents: the instance it is taught in and the term it | |
| 744 | 744 | // is graded in, both through the shared fixtures. |
| 745 | 745 | let teacher = UserId::from_key(TEACHER); |
| 746 | 746 | sqlx::query( |
src/db/karne.rsmodified+10 -10
| @@ -1,14 +1,14 @@ | ||
| 1 | -//! The `karne_snapshot` table: the frozen per-student, per-dönem report | |
| 1 | +//! The `karne_snapshot` table: the frozen per-student, per-term report card | |
| 2 | 2 | //! written when a term is archived. |
| 3 | 3 | //! |
| 4 | -//! Karne is a *computed* read (D8) — per-instance weighted average, graded | |
| 5 | -//! against the school's bands, then a `ders_saati`-weighted year average. The | |
| 6 | -//! snapshot exists for the moment that computation must stop moving: once a | |
| 7 | -//! dönem is archived, the report is a record of what the school issued, and a | |
| 8 | -//! later correction to a mark must not silently rewrite a karne a family | |
| 9 | -//! already holds. [`crate::service::karne::freeze`] writes the rows; | |
| 10 | -//! [`crate::service::karne::build`] serves the snapshot back for an archived | |
| 11 | -//! term and computes live for an open one. | |
| 4 | +//! A report card is a *computed* read (D8) — per-instance weighted average, | |
| 5 | +//! graded against the school's bands, then a `ders_saati`-weighted year | |
| 6 | +//! average. The snapshot exists for the moment that computation must stop | |
| 7 | +//! moving: once a term is archived, the report is a record of what the school | |
| 8 | +//! issued, and a later correction to a mark must not silently rewrite a report | |
| 9 | +//! card a family already holds. [`crate::service::karne::freeze`] writes the | |
| 10 | +//! rows; [`crate::service::karne::build`] serves the snapshot back for an | |
| 11 | +//! archived term and computes live for an open one. | |
| 12 | 12 | |
| 13 | 13 | use sqlx::types::Json; |
| 14 | 14 | |
| @@ -47,7 +47,7 @@ pub async fn snapshot( | ||
| 47 | 47 | Ok(()) |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -/// `user`'s frozen report for `term`, or `None` when that dönem was never | |
| 50 | +/// `user`'s frozen report for `term`, or `None` when that term was never | |
| 51 | 51 | /// frozen (or they had no roster row to freeze). |
| 52 | 52 | pub async fn read_snapshot( |
| 53 | 53 | db: &Database, |
src/db/term.rsmodified+6 -6
| @@ -113,10 +113,10 @@ pub async fn update( | ||
| 113 | 113 | /// refcount, claimed by [`crate::db::exam::create`] *before* it writes the |
| 114 | 114 | /// link, so the check and the delete are one conditional write on one record: |
| 115 | 115 | /// an exam write racing this either claims first (and the delete is refused) |
| 116 | -/// or finds the row gone (and is refused itself). A frozen karne | |
| 116 | +/// or finds the row gone (and is refused itself). A frozen report card | |
| 117 | 117 | /// ([`crate::db::karne`]) has no counter — it is written once per archived |
| 118 | -/// dönem — so its existence is the `NOT EXISTS` half of the same guard: a | |
| 119 | -/// dönem a family holds a karne for is history, not a calendar entry. | |
| 118 | +/// term — so its existence is the `NOT EXISTS` half of the same guard: a | |
| 119 | +/// term a family holds a report card for is history, not a calendar entry. | |
| 120 | 120 | /// |
| 121 | 121 | /// The referencing foreign keys (`exam.term`, `karne_snapshot.term`, both |
| 122 | 122 | /// `NO ACTION`) are the backstop behind the guard, not a second one: while |
| @@ -127,7 +127,7 @@ pub async fn update( | ||
| 127 | 127 | /// The year is handed its reference back in the *same statement* — a |
| 128 | 128 | /// `DELETE … RETURNING year` feeding the decrement, the shape |
| 129 | 129 | /// [`crate::db::course::delete`] uses for its classes — so a year whose last |
| 130 | -/// dönem was just deleted is deletable the moment this lands. The counter | |
| 130 | +/// term was just deleted is deletable the moment this lands. The counter | |
| 131 | 131 | /// lives on the year row and only this statement may release it: without the |
| 132 | 132 | /// release the year's own `term_count = 0` delete guard could never pass |
| 133 | 133 | /// again, and a year nobody links would be undeletable forever. |
| @@ -202,7 +202,7 @@ pub async fn unarchive(db: &Database, term: Term) -> Result<Term, AppError> { | ||
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | -/// A real dönem behind a real academic year — the parent every exam names and | |
| 205 | +/// A real term behind a real academic year — the parent every exam names and | |
| 206 | 206 | /// the grading slice every term-keyed read scopes to. Minted per call. |
| 207 | 207 | #[cfg(test)] |
| 208 | 208 | pub(crate) async fn a_test_term(db: &Database) -> TermId { |
| @@ -313,7 +313,7 @@ mod tests { | ||
| 313 | 313 | /// 500 instead of the 404 or 409 the request owes. |
| 314 | 314 | /// |
| 315 | 315 | /// The racer is [`crate::db::exam::create`] against this |
| 316 | - /// dönem: it claims `exam_count` on the term row before it writes the | |
| 316 | + /// term: it claims `exam_count` on the term row before it writes the | |
| 317 | 317 | /// link, which is the same record and the same column the guard reads. Both |
| 318 | 318 | /// sides are swept across each other sub-millisecond, exactly as in |
| 319 | 319 | /// [`crate::db::subject::delete`]'s race test — a whole |
src/db/user.rsmodified+2 -2
| @@ -469,7 +469,7 @@ pub async fn set_role_cascade( | ||
| 469 | 469 | ) |
| 470 | 470 | .execute(&mut *tx) |
| 471 | 471 | .await?; |
| 472 | - // The individual club/etüt memberships go with them: a demoted | |
| 472 | + // The individual club/supervised-study memberships go with them: a demoted | |
| 473 | 473 | // account may hold no seat in a school-scoped course either, and |
| 474 | 474 | // each course gets its membership count back. |
| 475 | 475 | sqlx::query!( |
| @@ -711,7 +711,7 @@ pub async fn set_profile( | ||
| 711 | 711 | "bio", |
| 712 | 712 | text(bio.as_ref().map(|n| n.as_ref().map(|x| x.as_str()))), |
| 713 | 713 | ) |
| 714 | - // The branş is plain text, not a newtype: the school's own list is | |
| 714 | + // The subject area is plain text, not a newtype: the school's own list is | |
| 715 | 715 | // settings data, so its membership check belongs to the write path |
| 716 | 716 | // that holds that list (the web layer), not to a row type. |
| 717 | 717 | .set( |
src/domain/academic_year.rsmodified+5 -6
| @@ -1,8 +1,7 @@ | ||
| 1 | -//! An academic year (eğitim yılı): the container a şube and its dönemler | |
| 2 | -//! belong to. Above [`crate::domain::term::Term`], which is a grading slice | |
| 3 | -//! inside it. | |
| 1 | +//! An academic year: the container a class section and its terms belong to. | |
| 2 | +//! Above [`crate::domain::term::Term`], which is a grading slice inside it. | |
| 4 | 3 | //! |
| 5 | -//! The year carries the sınıf geçme policy (`grade_promotions`): a mapping | |
| 4 | +//! The year carries the grade-promotion policy (`grade_promotions`): a mapping | |
| 6 | 5 | //! from one grade label to the next, applied by the explicit, idempotent |
| 7 | 6 | //! rollover command ([`crate::service::academic_year::rollover`]). A grade |
| 8 | 7 | //! absent from the list is not rolled over — that is how graduation is |
| @@ -81,7 +80,7 @@ impl AcademicYearName { | ||
| 81 | 80 | } |
| 82 | 81 | } |
| 83 | 82 | |
| 84 | -/// One sınıf-geçme mapping: a student who finished `from_grade` moves to | |
| 83 | +/// One grade-promotion mapping: a student who finished `from_grade` moves to | |
| 85 | 84 | /// `to_grade` at rollover. |
| 86 | 85 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
| 87 | 86 | pub struct GradePromotion { |
| @@ -187,7 +186,7 @@ impl AcademicYear { | ||
| 187 | 186 | &self.grade_promotions.0 |
| 188 | 187 | } |
| 189 | 188 | |
| 190 | - /// The grade a şube of `grade` rolls into, or `None` when the grade has no | |
| 189 | + /// The grade a section at `grade` rolls into, or `None` when the grade has no | |
| 191 | 190 | /// promotion entry (graduation). |
| 192 | 191 | pub fn promotion_for(&self, grade: &str) -> Option<&str> { |
| 193 | 192 | self.grade_promotions |
src/domain/class_blueprint.rsmodified+5 -5
| @@ -1,13 +1,13 @@ | ||
| 1 | -//! A grade's course template: the courses every class section (şube) at one | |
| 2 | -//! grade carries. | |
| 1 | +//! A grade's course template: the courses every class section at one grade | |
| 2 | +//! carries. | |
| 3 | 3 | //! |
| 4 | -//! A school runs many şube at grade "9" and stocks each of them by hand, one | |
| 4 | +//! A school runs many sections at grade "9" and stocks each of them by hand, one | |
| 5 | 5 | //! attach at a time. A blueprint is that list said once. It is a layer *above* |
| 6 | 6 | //! [`crate::db::class_pump`], never a replacement for it: applying a |
| 7 | 7 | //! blueprint calls the same [`crate::service::class_course::attach`] a manager's own call does, |
| 8 | 8 | //! so the rows it lands are ordinary `class_course` links and ordinary |
| 9 | -//! `enrollment` rows, and an elective (seçmeli) placed by hand next to them is | |
| 10 | -//! still an individual enrollment nothing here can see. | |
| 9 | +//! `enrollment` rows, and an elective placed by hand next to them is still an | |
| 10 | +//! individual enrollment nothing here can see. | |
| 11 | 11 | //! |
| 12 | 12 | //! This module is the pure shape: the id (the grade label *is* the primary |
| 13 | 13 | //! key, so "one blueprint per grade" holds by construction), the row, the |
src/domain/class_course.rsmodified+6 -6
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | //! A course as taught in one class: the academic *instance*. |
| 2 | 2 | //! |
| 3 | 3 | //! The anchor of the K12 model. A course in the school catalog is a template; |
| 4 | -//! attaching it to a şube mints one of these rows, and exams, sessions, | |
| 4 | +//! attaching it to a class section mints one of these rows, and exams, sessions, | |
| 5 | 5 | //! roll-call, homework and enrollments all key on the instance — so two |
| 6 | -//! şubeler teaching the same course have separate rosters, exams, timetables | |
| 7 | -//! and teachers. The row carries the weekly hours (`ders_saati`, the karne | |
| 8 | -//! weight) and whether it counts toward the karne. | |
| 6 | +//! sections teaching the same course have separate rosters, exams, timetables | |
| 7 | +//! and teachers. The row carries the weekly hours (`ders_saati`, the report-card | |
| 8 | +//! weight) and whether it counts toward the report card. | |
| 9 | 9 | //! |
| 10 | 10 | //! The attach/detach workflows live in [`crate::service::class_course`]; the |
| 11 | 11 | //! row's reads in [`crate::db::class_course`] — this file is the row shape and |
| @@ -51,7 +51,7 @@ impl ClassCourseId { | ||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /// Weekly lesson hours of an instance: the weight the instance carries in the |
| 54 | -/// year's karne average, and the count a timetable grid would lay out. | |
| 54 | +/// year's report-card average, and the count a timetable grid would lay out. | |
| 55 | 55 | #[derive(Debug, Clone, Copy, PartialEq, Eq, sqlx::Type)] |
| 56 | 56 | #[sqlx(transparent)] |
| 57 | 57 | pub struct DersSaati(i64); |
| @@ -74,7 +74,7 @@ impl DersSaati { | ||
| 74 | 74 | |
| 75 | 75 | /// One course taught in one class. `attached_by` is who attached it, `source` |
| 76 | 76 | /// the blueprint that placed it (absent for a hand attach). `ders_saati` and |
| 77 | -/// `counts_toward_karne` are the instance's own policy — what two şubeler | |
| 77 | +/// `counts_toward_karne` are the instance's own policy — what two sections | |
| 78 | 78 | /// teaching the same catalog course may legitimately differ on. |
| 79 | 79 | #[derive(Debug, Clone, sqlx::FromRow)] |
| 80 | 80 | pub struct ClassCourse { |
src/domain/class_group.rsmodified+6 -6
| @@ -1,11 +1,11 @@ | ||
| 1 | -//! A class section (şube): a named set of students the school manages as one, | |
| 2 | -//! so a course attach enrolls the whole set at once. The membership and the | |
| 1 | +//! A class section: a named set of students the school manages as one, so a | |
| 2 | +//! course attach enrolls the whole set at once. The membership and the | |
| 3 | 3 | //! attachments live in their own tables (`class_member`, `class_course`) and are |
| 4 | 4 | //! counted on this row — a class may only be deleted at zero on both, the same |
| 5 | 5 | //! stored guard shape courses and terms use. |
| 6 | 6 | //! |
| 7 | 7 | //! A class belongs to an academic year ([`crate::domain::academic_year`]), not |
| 8 | -//! to a term: the şube keeps the same roster all year and the dönem is a | |
| 8 | +//! to a term: the section keeps the same roster all year and the term is a | |
| 9 | 9 | //! grading slice inside it. It claims a reference on its year before the link |
| 10 | 10 | //! is written; the reference is its *own* column |
| 11 | 11 | //! ([`crate::constant::ACADEMIC_YEAR_CLASS_COUNT_FIELD`]) rather than the |
| @@ -65,7 +65,7 @@ impl ClassName { | ||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /// The school's own label for the year a class sits in ("9", "10-A", |
| 68 | -/// "anaokulu"). Free text on purpose — no school's grade ladder is the next | |
| 68 | +/// "kindergarten"). Free text on purpose — no school's grade ladder is the next | |
| 69 | 69 | /// one's — and optional: a club-shaped class has no grade at all. |
| 70 | 70 | #[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)] |
| 71 | 71 | #[sqlx(transparent)] |
| @@ -86,7 +86,7 @@ impl ClassGrade { | ||
| 86 | 86 | /// guard are database-side columns only, so no whole-row save can clobber one |
| 87 | 87 | /// (see [`crate::db::cap`]). |
| 88 | 88 | /// |
| 89 | -/// `teacher` is the section's homeroom teacher (sınıf öğretmeni): optional, not | |
| 89 | +/// `teacher` is the section's homeroom teacher: optional, not | |
| 90 | 90 | /// refcounted, and merely a label pointing at a teacher-or-higher account — the |
| 91 | 91 | /// web layer holds that bar, and a demotion sweeps the column |
| 92 | 92 | /// ([`crate::db::class_group::unassign_everywhere`]). |
| @@ -121,7 +121,7 @@ impl ClassGroup { | ||
| 121 | 121 | self.year.as_ref() |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - /// The homeroom teacher (sınıf öğretmeni), if one is assigned. | |
| 124 | + /// The homeroom teacher, if one is assigned. | |
| 125 | 125 | pub fn get_teacher(&self) -> Option<&UserId> { |
| 126 | 126 | self.teacher.as_ref() |
| 127 | 127 | } |
src/domain/class_member.rsmodified+2 -2
| @@ -44,8 +44,8 @@ impl ClassMemberId { | ||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /// One student's stint in one class. `added_by` is who put them there; |
| 47 | -/// `source_class_group` names the şube a rollover copied them from (absent for | |
| 48 | -/// a hand-added member). | |
| 47 | +/// `source_class_group` names the section a rollover copied them from (absent | |
| 48 | +/// for a hand-added member). | |
| 49 | 49 | #[derive(Debug, Clone, sqlx::FromRow)] |
| 50 | 50 | pub struct ClassMember { |
| 51 | 51 | pub(crate) id: ClassMemberId, |
src/domain/course.rsmodified+7 -7
| @@ -63,9 +63,9 @@ impl CourseDescription { | ||
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | -/// A validated course kind: `course` (a regular class — ders), `study` (a | |
| 67 | -/// supervised study session — etüt), or `club` (a student club — kulüp). | |
| 68 | -/// Only `course` is class-delivered (a şube attaches it as an instance); | |
| 66 | +/// A validated course kind: `course` (a regular class), `study` (a supervised | |
| 67 | +/// study session), or `club` (a student club). | |
| 68 | +/// Only `course` is class-delivered (a section attaches it as an instance); | |
| 69 | 69 | /// `study`/`club` are school-scoped and joined individually. |
| 70 | 70 | #[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)] |
| 71 | 71 | #[sqlx(transparent)] |
| @@ -86,9 +86,9 @@ impl CourseKind { | ||
| 86 | 86 | &self.0 |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - /// Whether a şube attaches this kind as an instance. Only a regular ders | |
| 90 | - /// (`course`) is class-delivered; clubs and etüt are school-scoped and | |
| 91 | - /// joined individually ([`crate::domain::course_membership`]). | |
| 89 | + /// Whether a section attaches this kind as an instance. Only a regular | |
| 90 | + /// course (`course`) is class-delivered; clubs and supervised studies are | |
| 91 | + /// school-scoped and joined individually ([`crate::domain::course_membership`]). | |
| 92 | 92 | pub fn is_class_delivered(&self) -> bool { |
| 93 | 93 | self.0 == "course" |
| 94 | 94 | } |
| @@ -143,7 +143,7 @@ impl Course { | ||
| 143 | 143 | self.class_course_count |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - /// How many users hold an individual (club/etüt) membership. | |
| 146 | + /// How many users hold an individual (club/study) membership. | |
| 147 | 147 | pub fn get_course_membership_count(&self) -> i64 { |
| 148 | 148 | self.course_membership_count |
| 149 | 149 | } |
src/domain/course_membership.rsmodified+1 -1
| @@ -27,7 +27,7 @@ impl CourseMembershipId { | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /// A user's individual membership in a *school-scoped* course (D9): a club or |
| 30 | -/// an etüt a student joins directly. A class-delivered course | |
| 30 | +/// a supervised study a student joins directly. A class-delivered course | |
| 31 | 31 | /// ([`crate::domain::course::CourseKind::is_class_delivered`]) is joined |
| 32 | 32 | /// through its instance instead, never here — that gate lives in the service. |
| 33 | 33 | #[derive(Debug, Clone, sqlx::FromRow)] |
src/domain/event.rsmodified+2 -2
| @@ -91,8 +91,8 @@ pub enum EventAudienceKind { | ||
| 91 | 91 | /// A course's enrolled students. Staff running the course are not implied |
| 92 | 92 | /// members — a mixed gathering wants a registration or role audience. |
| 93 | 93 | Course, |
| 94 | - /// A class section's (şube) students, read live off `class_member` — the | |
| 95 | - /// same live resolution `Course` and `Role` get, so adding a student to the | |
| 94 | + /// A class section's students, read live off `class_member` — the same live | |
| 95 | + /// resolution `Course` and `Role` get, so adding a student to the | |
| 96 | 96 | /// class puts them on every one of its events' rosters at once. The |
| 97 | 97 | /// homeroom teacher is not implied, matching `Course`. A deleted class |
| 98 | 98 | /// leaves the event standing with an empty roster, exactly as a deleted |
src/domain/meal_ledger.rsmodified+2 -2
| @@ -48,7 +48,7 @@ | ||
| 48 | 48 | //! nothing in this file reads or writes it. Do not add a no-show penalty |
| 49 | 49 | //! here: the seat was reserved and the food was cooked. |
| 50 | 50 | //! |
| 51 | -//! Money is `i64` minor units (kuruş) end to end. No float, no decimal, ever. | |
| 51 | +//! Money is `i64` minor units end to end. No float, no decimal, ever. | |
| 52 | 52 | //! |
| 53 | 53 | //! The ledger row ids are **derived TEXT keys**, not minted uuids — they are |
| 54 | 54 | //! the identity the store's uniqueness check enforces (`id TEXT PRIMARY |
| @@ -185,7 +185,7 @@ impl LedgerAmount { | ||
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | -/// How the money arrived ("cash", "havale", …). Free text: the backend never | |
| 188 | +/// How the money arrived ("cash", "bank transfer", …). Free text: the backend never | |
| 189 | 189 | /// speaks to a payment gateway and stores no card data, ever. |
| 190 | 190 | #[derive(Debug, Clone, PartialEq, Eq, Type)] |
| 191 | 191 | #[sqlx(transparent)] |
src/domain/menu_dish.rsmodified+4 -4
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | //! One dish on a published [`Menu`](crate::domain::menu::Menu): what it is, |
| 2 | 2 | //! what it costs, and which dietary tags it carries. |
| 3 | 3 | //! |
| 4 | -//! Money is **minor units** (kuruş) as `i64` — never a float, never a decimal, | |
| 5 | -//! at any layer. `tags` are validated against the school's `dietary_tags` | |
| 4 | +//! Money is **minor units** as `i64` — never a float, never a decimal, at any | |
| 5 | +//! layer. `tags` are validated against the school's `dietary_tags` | |
| 6 | 6 | //! list, the same contract a menu's `slot` has with `meal_slots`. |
| 7 | 7 | //! |
| 8 | 8 | //! The queries live in [`crate::db::menu_dish`]; the dish-cap gate in |
| @@ -87,8 +87,8 @@ impl DishDescription { | ||
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | -/// What one serving costs, in **minor units** (kuruş). Never negative — a | |
| 91 | -/// giveaway dish is `0`, and money that flows the other way is a ledger line. | |
| 90 | +/// What one serving costs, in **minor units**. Never negative — a giveaway | |
| 91 | +/// dish is `0`, and money that flows the other way is a ledger line. | |
| 92 | 92 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Type)] |
| 93 | 93 | #[sqlx(transparent)] |
| 94 | 94 | pub struct DishPrice(i64); |
src/domain/message.rsmodified+1 -1
| @@ -156,7 +156,7 @@ impl MessageBody { | ||
| 156 | 156 | } |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | -/// A sender-chosen tag ("Etüt", "Sınav", …) the UI renders as a badge. | |
| 159 | +/// A sender-chosen tag ("Study", "Exam", …) the UI renders as a badge. | |
| 160 | 160 | /// Required-and-bounded here; "no label" is `Option<MessageLabel>` on the row. |
| 161 | 161 | #[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)] |
| 162 | 162 | #[sqlx(transparent)] |
src/domain/payment_ledger.rsmodified+2 -2
| @@ -15,8 +15,8 @@ | ||
| 15 | 15 | //! |
| 16 | 16 | //! so a *negative* balance means the family owes the school. Every amount on a |
| 17 | 17 | //! row is stored positive; the sign lives in the `kind`, so a line's meaning |
| 18 | -//! never depends on how it was read. Money is `i64` minor units (kuruş) end to | |
| 19 | -//! end. No float, no decimal, ever. | |
| 18 | +//! never depends on how it was read. Money is `i64` minor units end to end. | |
| 19 | +//! No float, no decimal, ever. | |
| 20 | 20 | //! |
| 21 | 21 | //! The rules the rest of the code depends on: |
| 22 | 22 | //! |
src/domain/settings.rsmodified+12 -12
| @@ -215,16 +215,16 @@ pub struct Settings { | ||
| 215 | 215 | /// for both deadlines; `None` = no cutoff at all, which is also what an |
| 216 | 216 | /// unset column reads as. |
| 217 | 217 | pub(crate) meal_cancel_cutoff_minutes: Option<i64>, |
| 218 | - /// Öğretmen branş lists (D6): the school's subject specialisations a | |
| 218 | + /// Teacher branch lists (D6): the school's subject specialisations a | |
| 219 | 219 | /// teacher profile may name. `None`-while-unset; an empty list is legal |
| 220 | - /// (a school that never configured branş). | |
| 220 | + /// (a school that never configured one). | |
| 221 | 221 | pub(crate) branches: Option<Json<Vec<String>>>, |
| 222 | - /// What an absence may be excused as (raporlu/izinli/…): the vocabulary | |
| 223 | - /// pointed at by an excused roll-call row. `None`-while-unset, like | |
| 224 | - /// `branches`. | |
| 222 | + /// What an absence may be excused as (with a report / on leave / …): the | |
| 223 | + /// vocabulary pointed at by an excused roll-call row. `None`-while-unset, | |
| 224 | + /// like `branches`. | |
| 225 | 225 | pub(crate) excuse_kinds: Option<Json<Vec<String>>>, |
| 226 | - /// Devamsızlık policy (D7): the per-dönem excused/unexcused day limits a | |
| 227 | - /// student may exceed. `None` = no limit configured. | |
| 226 | + /// Absence policy (D7): the per-term excused/unexcused day limits a student | |
| 227 | + /// may exceed. `None` = no limit configured. | |
| 228 | 228 | pub(crate) max_excused_absent_days: Option<i64>, |
| 229 | 229 | pub(crate) max_unexcused_absent_days: Option<i64>, |
| 230 | 230 | /// The school's IANA timezone, used to bucket attendance days. `None` |
| @@ -439,7 +439,7 @@ impl Settings { | ||
| 439 | 439 | )?; |
| 440 | 440 | } |
| 441 | 441 | |
| 442 | - // Branş and excuse-kind lists follow the same rules as the kinds and | |
| 442 | + // Branch and excuse-kind lists follow the same rules as the kinds and | |
| 443 | 443 | // statuses above, but empty is legal on both — a school that never |
| 444 | 444 | // configured either is not forced to invent one. |
| 445 | 445 | let branches = if branches.is_empty() { |
| @@ -580,7 +580,7 @@ impl Settings { | ||
| 580 | 580 | self.meal_cancel_cutoff_minutes |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | - /// The branş (subject specialisation) vocabulary a teacher profile may | |
| 583 | + /// The branch (subject specialisation) vocabulary a teacher profile may | |
| 584 | 584 | /// name; empty while the school never configured one. |
| 585 | 585 | pub fn get_branches(&self) -> Vec<String> { |
| 586 | 586 | self.branches |
| @@ -598,12 +598,12 @@ impl Settings { | ||
| 598 | 598 | .unwrap_or_default() |
| 599 | 599 | } |
| 600 | 600 | |
| 601 | - /// The per-dönem excused-absence day limit; `None` = no limit configured. | |
| 601 | + /// The per-term excused-absence day limit; `None` = no limit configured. | |
| 602 | 602 | pub fn get_max_excused_absent_days(&self) -> Option<i64> { |
| 603 | 603 | self.max_excused_absent_days |
| 604 | 604 | } |
| 605 | 605 | |
| 606 | - /// The per-dönem unexcused-absence day limit; `None` = no limit configured. | |
| 606 | + /// The per-term unexcused-absence day limit; `None` = no limit configured. | |
| 607 | 607 | pub fn get_max_unexcused_absent_days(&self) -> Option<i64> { |
| 608 | 608 | self.max_unexcused_absent_days |
| 609 | 609 | } |
| @@ -717,7 +717,7 @@ mod tests { | ||
| 717 | 717 | let defaults = Settings::defaults(); |
| 718 | 718 | let rebuilt = Settings::try_new(defaults.params()).unwrap(); |
| 719 | 719 | assert_eq!(rebuilt.get_exam_kinds(), defaults.get_exam_kinds()); |
| 720 | - // The Türkiye 5-point scale ships by default, so a mark always labels. | |
| 720 | + // The Turkish 5-point scale ships by default, so a mark always labels. | |
| 721 | 721 | assert_eq!(defaults.get_grade_bands().len(), DEFAULT_GRADE_BANDS.len()); |
| 722 | 722 | assert_eq!(defaults.grade_label(90.0), Some("5")); |
| 723 | 723 | assert_eq!(defaults.grade_label(0.0), Some("1")); |
src/domain/term.rsmodified+1 -1
| @@ -93,7 +93,7 @@ impl TermName { | ||
| 93 | 93 | #[derive(Debug, Clone, sqlx::FromRow)] |
| 94 | 94 | pub struct Term { |
| 95 | 95 | pub(crate) id: TermId, |
| 96 | - /// The academic year this dönem is a grading slice of. | |
| 96 | + /// The academic year this term is a grading slice of. | |
| 97 | 97 | pub(crate) year: AcademicYearId, |
| 98 | 98 | pub(crate) name: TermName, |
| 99 | 99 | pub(crate) starts_at: Timestamp, |
src/domain/user.rsmodified+2 -2
| @@ -233,7 +233,7 @@ pub struct User { | ||
| 233 | 233 | // type and size live on the row. |
| 234 | 234 | pub(crate) display_name: Option<DisplayName>, |
| 235 | 235 | pub(crate) bio: Option<Bio>, |
| 236 | - /// The staff member's branş (subject area), free text validated against | |
| 236 | + /// The staff member's branch (subject area), free text validated against | |
| 237 | 237 | /// the school's own `Settings::get_branches()` list at the web layer — |
| 238 | 238 | /// optional like every other profile field, and clearable. |
| 239 | 239 | pub(crate) branch: Option<String>, |
| @@ -328,7 +328,7 @@ impl User { | ||
| 328 | 328 | self.bio.as_ref() |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | - /// The staff member's branş, as stored (free text; membership in the | |
| 331 | + /// The staff member's branch, as stored (free text; membership in the | |
| 332 | 332 | /// school's list is the write path's check, not this read's). |
| 333 | 333 | pub fn get_branch(&self) -> Option<&str> { |
| 334 | 334 | self.branch.as_deref() |
src/lib.rsmodified+2 -2
| @@ -120,8 +120,8 @@ fn courses_router(state: &AppState) -> OpenApiRouter<AppState> { | ||
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /// `/instances` and the three foreign-module route pairs mounted inside it — |
| 123 | -/// the same split as `/courses`, one anchor down: the instance is what a şube | |
| 124 | -/// teaches, and what exams, sessions and homework hang off. Each child carries | |
| 123 | +/// the same split as `/courses`, one anchor down: the instance is what a class | |
| 124 | +/// section teaches, and what exams, sessions and homework hang off. Each child carries | |
| 125 | 125 | /// its own module's gate *and*, through the outer one applied here, the course |
| 126 | 126 | /// gate (an instance is a course taught somewhere), so either module being off |
| 127 | 127 | /// refuses it. |
src/service/academic_year.rsmodified+38 -36
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | //! Academic-year workflows: the archived-year refusal every write against past |
| 2 | 2 | //! structure pays, the link resolver class/term create pass through, and the |
| 3 | -//! rollover — the one command that carries a year's şubeler into the next. The | |
| 4 | -//! queries live in [`crate::db::academic_year`]. | |
| 3 | +//! rollover — the one command that carries a year's class sections into the | |
| 4 | +//! next. The queries live in [`crate::db::academic_year`]. | |
| 5 | 5 | |
| 6 | 6 | use crate::database::Database; |
| 7 | 7 | use crate::db::academic_year; |
| @@ -57,8 +57,8 @@ pub async fn create( | ||
| 57 | 57 | /// Turn an optional request-supplied year id into a validated reference — |
| 58 | 58 | /// `None` stays `None`, an unknown id is a `400` naming the field, and an |
| 59 | 59 | /// *archived* one is the year's `409`. This is the single spot every new link |
| 60 | -/// to a year passes through: a şube create/update and a dönem create alike, | |
| 61 | -/// so past years take no new structure. The mirror of | |
| 60 | +/// to a year passes through: a class-section create/update and a term create | |
| 61 | +/// alike, so past years take no new structure. The mirror of | |
| 62 | 62 | /// [`crate::service::term::resolve`], one layer up the calendar. |
| 63 | 63 | pub async fn resolve(db: &Database, id: Option<&str>) -> Result<Option<AcademicYearId>, AppError> { |
| 64 | 64 | let Some(id) = id else { |
| @@ -150,9 +150,9 @@ pub async fn delete(db: &Database, target: AcademicYear) -> Result<(), AppError> | ||
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | -/// What one [`rollover`] carried: how many şubeler were planted in the target | |
| 154 | -/// year, how many live students came with them, and the grades that stayed | |
| 155 | -/// behind because the year lists no promotion for them (graduation). | |
| 153 | +/// What one [`rollover`] carried: how many class sections were planted in the | |
| 154 | +/// target year, how many live students came with them, and the grades that | |
| 155 | +/// stayed behind because the year lists no promotion for them (graduation). | |
| 156 | 156 | #[derive(Debug, Clone)] |
| 157 | 157 | pub struct RolloverReport { |
| 158 | 158 | pub classes: usize, |
| @@ -160,35 +160,37 @@ pub struct RolloverReport { | ||
| 160 | 160 | pub graduated: Vec<String>, |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | -/// Carry `from`'s şubeler into `target`, the explicit year-boundary command. | |
| 163 | +/// Carry `from`'s class sections into `target`, the explicit year-boundary | |
| 164 | +/// command. | |
| 164 | 165 | /// |
| 165 | 166 | /// A grade with **no** promotion entry is not rolled over — that is how |
| 166 | -/// graduation is expressed — and a şube carrying no grade at all is not | |
| 167 | -/// either: there is nothing to promote it on. Each rolled şube is created | |
| 168 | -/// afresh in the target year with the same name and the mapped grade, then | |
| 169 | -/// gets copies of everything that belongs to the *structure* of the year: its | |
| 170 | -/// instances (same courses, same `ders_saati`, same karne policy, `source` | |
| 171 | -/// left NULL so no blueprint sweep can take a copied link back), each | |
| 167 | +/// graduation is expressed — and a class section carrying no grade at all is | |
| 168 | +/// not either: there is nothing to promote it on. Each rolled class section is | |
| 169 | +/// created afresh in the target year with the same name and the mapped grade, | |
| 170 | +/// then gets copies of everything that belongs to the *structure* of the year: | |
| 171 | +/// its instances (same courses, same `ders_saati`, same report-card policy, | |
| 172 | +/// `source` left NULL so no blueprint sweep can take a copied link back), each | |
| 172 | 173 | /// instance's assigned teachers, and every **live** member — copied through |
| 173 | 174 | /// the pump, which is also what enrolls them into the new instances, and |
| 174 | -/// tagged `source_class_group` with the şube they were copied out of (the | |
| 175 | -/// provenance §4.9 asks for: the new roster still names the old stint's şube). | |
| 176 | -/// The old year is untouched: it stays the record of what was taught. | |
| 175 | +/// tagged `source_class_group` with the class section they were copied out of | |
| 176 | +/// (the provenance §4.9 asks for: the new roster still names the old stint's | |
| 177 | +/// class section). The old year is untouched: it stays the record of what was | |
| 178 | +/// taught. | |
| 177 | 179 | /// |
| 178 | 180 | /// Refusals: the target year must be empty (a second rollover into it is a |
| 179 | 181 | /// `409`, which is also what makes the command idempotent — a re-run is |
| 180 | 182 | /// refused, never duplicated), archived (read-only), and distinct from the |
| 181 | 183 | /// source. The emptiness check is a pre-flight read, an accepted race in the |
| 182 | 184 | /// README's sense: two rollovers racing the same empty target can each plant |
| 183 | -/// şubeler; the class writes themselves serialize on the year row, so the | |
| 184 | -/// counters stay honest either way. | |
| 185 | +/// class sections; the class writes themselves serialize on the year row, so | |
| 186 | +/// the counters stay honest either way. | |
| 185 | 187 | /// |
| 186 | -/// Each şube is carried over on its own: a failure mid-run leaves the | |
| 187 | -/// şubeler already planted in place, and a re-run is refused by the emptiness | |
| 188 | -/// guard — the report says what landed, and the operator resolves the rest by | |
| 189 | -/// hand. One transaction per write, never one across the run: the store owns | |
| 190 | -/// concurrency, and a run-wide transaction would hold the year row for the | |
| 191 | -/// length of the whole school. | |
| 188 | +/// Each class section is carried over on its own: a failure mid-run leaves the | |
| 189 | +/// class sections already planted in place, and a re-run is refused by the | |
| 190 | +/// emptiness guard — the report says what landed, and the operator resolves | |
| 191 | +/// the rest by hand. One transaction per write, never one across the run: the | |
| 192 | +/// store owns concurrency, and a run-wide transaction would hold the year row | |
| 193 | +/// for the length of the whole school. | |
| 192 | 194 | pub async fn rollover( |
| 193 | 195 | db: &Database, |
| 194 | 196 | target: &AcademicYearId, |
| @@ -218,7 +220,7 @@ pub async fn rollover( | ||
| 218 | 220 | }; |
| 219 | 221 | let Some(mapped) = from_year.promotion_for(grade.as_str()) else { |
| 220 | 222 | // No promotion entry: this grade graduated. Reported once per |
| 221 | - // label, however many şubeler carry it. | |
| 223 | + // label, however many class sections carry it. | |
| 222 | 224 | let label = grade.as_str().to_string(); |
| 223 | 225 | if !report.graduated.contains(&label) { |
| 224 | 226 | report.graduated.push(label); |
| @@ -238,8 +240,8 @@ pub async fn rollover( | ||
| 238 | 240 | let planted_id = planted.get_id().clone(); |
| 239 | 241 | |
| 240 | 242 | // The structure first, so the member copy below enrolls the students |
| 241 | - // into every instance the new şube carries; the pump's member axis is | |
| 242 | - // what pays those enrollments. | |
| 243 | + // into every instance the new class section carries; the pump's member | |
| 244 | + // axis is what pays those enrollments. | |
| 243 | 245 | for instance in |
| 244 | 246 | class_course::list_for_class_ids(db, std::slice::from_ref(class.get_id())).await? |
| 245 | 247 | { |
| @@ -247,10 +249,10 @@ pub async fn rollover( | ||
| 247 | 249 | class_course::attach_sourced(db, &planted_id, instance.get_course(), by, None) |
| 248 | 250 | .await?; |
| 249 | 251 | let Attached::Made(copied) = landed else { |
| 250 | - // A fresh şube cannot hold the course already, and its caps | |
| 251 | - // cannot be full: anything else here is the store disagreeing | |
| 252 | - // with the read one statement earlier, which is a 500 and not | |
| 253 | - // a partial rollover. | |
| 252 | + // A fresh class section cannot hold the course already, and | |
| 253 | + // its caps cannot be full: anything else here is the store | |
| 254 | + // disagreeing with the read one statement earlier, which is a | |
| 255 | + // 500 and not a partial rollover. | |
| 254 | 256 | return Err(AppError::Internal(format!( |
| 255 | 257 | "rollover: attaching {} to the new class was refused", |
| 256 | 258 | instance.get_course().key() |
| @@ -272,10 +274,10 @@ pub async fn rollover( | ||
| 272 | 274 | .await? |
| 273 | 275 | .0 |
| 274 | 276 | { |
| 275 | - // The stint carries where the student came from: the copy names the | |
| 276 | - // şube it was copied out of, so last year's roster is still legible | |
| 277 | - // from the new one (and the tag is written in the same statement as | |
| 278 | - // the stint — see `add_member_sourced`). | |
| 277 | + // The stint carries where the student came from: the copy names | |
| 278 | + // the class section it was copied out of, so last year's roster is | |
| 279 | + // still legible from the new one (and the tag is written in the | |
| 280 | + // same statement as the stint — see `add_member_sourced`). | |
| 279 | 281 | match class_pump::add_member_sourced( |
| 280 | 282 | db, |
| 281 | 283 | &planted_id, |
src/service/class_blueprint.rsmodified+2 -2
| @@ -372,8 +372,8 @@ pub async fn pump( | ||
| 372 | 372 | /// still show it. |
| 373 | 373 | /// |
| 374 | 374 | /// Unpaged, like the [`crate::db::class_group::list_for_grade`] it is built on: the set |
| 375 | -/// is the şube one school runs at one grade, and the caller is asking about | |
| 376 | -/// all of them. | |
| 375 | +/// is the class sections one school runs at one grade, and the caller is | |
| 376 | +/// asking about all of them. | |
| 377 | 377 | pub async fn status( |
| 378 | 378 | db: &Database, |
| 379 | 379 | blueprint: &ClassBlueprint, |
src/service/class_course.rsmodified+15 -13
| @@ -121,8 +121,8 @@ pub async fn read(db: &Database, id: &ClassCourseId) -> Result<Option<ClassCours | ||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /// PATCH one instance's own policy: the weekly hours and whether it counts |
| 124 | -/// toward the karne. Both are non-clearable, so an omitted field keeps the | |
| 125 | -/// stored value. | |
| 124 | +/// toward the report card. Both are non-clearable, so an omitted field keeps | |
| 125 | +/// the stored value. | |
| 126 | 126 | pub async fn update( |
| 127 | 127 | db: &Database, |
| 128 | 128 | id: &ClassCourseId, |
| @@ -133,7 +133,8 @@ pub async fn update( | ||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /// The academic year this instance sits under, if any — the seam every |
| 136 | -/// instance-scoped write reads the archive gate off (instance → şube → year). | |
| 136 | +/// instance-scoped write reads the archive gate off (instance → section → | |
| 137 | +/// year). | |
| 137 | 138 | pub async fn year_of( |
| 138 | 139 | db: &Database, |
| 139 | 140 | instance: &ClassCourseId, |
| @@ -150,8 +151,9 @@ pub async fn year_of( | ||
| 150 | 151 | /// read-only. A pre-flight guard, accepted race (see README concurrency |
| 151 | 152 | /// model): a year archived after this read still lets the write through. |
| 152 | 153 | /// |
| 153 | -/// A şube with no year, or one whose year row is gone, passes: a dangling | |
| 154 | -/// link is not this guard's error, and the caller that cares answers it. | |
| 154 | +/// A class section with no year, or one whose year row is gone, passes: a | |
| 155 | +/// dangling link is not this guard's error, and the caller that cares answers | |
| 156 | +/// it. | |
| 155 | 157 | pub async fn require_open(db: &Database, instance: &ClassCourseId) -> Result<(), AppError> { |
| 156 | 158 | if let Some(year) = year_of(db, instance).await? { |
| 157 | 159 | crate::service::academic_year::require_open(db, &year).await?; |
| @@ -216,9 +218,9 @@ pub async fn unassign_teacher( | ||
| 216 | 218 | /// A 403 unless `user` may act on this instance — D10, the one gate every |
| 217 | 219 | /// instance-scoped route shares in place of a `class_course_teacher` lookup of |
| 218 | 220 | /// its own. It passes when the user is `manager`+ (the office), when they are |
| 219 | -/// one of the instance's assigned teachers, or when they are the şube's | |
| 220 | -/// homeroom teacher (sınıf öğretmeni) — the three ways a person legitimately | |
| 221 | -/// runs a section's course. | |
| 221 | +/// one of the instance's assigned teachers, or when they are the section's | |
| 222 | +/// homeroom teacher — the three ways a person legitimately runs a section's | |
| 223 | +/// course. | |
| 222 | 224 | /// |
| 223 | 225 | /// A gone instance is a `404`, never a 403: the route the user asked about |
| 224 | 226 | /// does not exist. |
| @@ -321,8 +323,8 @@ mod tests { | ||
| 321 | 323 | ); |
| 322 | 324 | } |
| 323 | 325 | |
| 324 | - /// Two şubeler teaching one catalog course are two instances — that is the | |
| 325 | - /// whole remodel — and each keeps its own roster. | |
| 326 | + /// Two class sections teaching one catalog course are two instances — that | |
| 327 | + /// is the whole remodel — and each keeps its own roster. | |
| 326 | 328 | #[tokio::test] |
| 327 | 329 | async fn two_classes_teaching_one_course_keep_their_own_rosters() { |
| 328 | 330 | let (db, _leases) = crate::database::init_test_db().await; |
| @@ -354,8 +356,8 @@ mod tests { | ||
| 354 | 356 | "…and nowhere near 5-B's" |
| 355 | 357 | ); |
| 356 | 358 | |
| 357 | - // Detaching one şube takes its instance and its roster; the other | |
| 358 | - // şube's instance and roster stand. | |
| 359 | + // Detaching one class section takes its instance and its roster; the | |
| 360 | + // other section's instance and roster stand. | |
| 359 | 361 | detach(&db, &fifth_a, &algebra).await.unwrap(); |
| 360 | 362 | assert_eq!(source_of(first.get_id(), &student, &db).await, None); |
| 361 | 363 | assert_eq!( |
| @@ -505,7 +507,7 @@ mod tests { | ||
| 505 | 507 | ); |
| 506 | 508 | } |
| 507 | 509 | |
| 508 | - /// D10: the instance's own teacher, the şube's homeroom teacher and a | |
| 510 | + /// D10: the instance's own teacher, the section's homeroom teacher and a | |
| 509 | 511 | /// manager may act on it; another instance's teacher and a plain student |
| 510 | 512 | /// may not. Assignment itself is the office's call and the assignee must |
| 511 | 513 | /// hold the teacher bar. |
src/service/class_group.rsmodified+1 -1
| @@ -56,7 +56,7 @@ pub async fn list_by_ids(db: &Database, ids: &[ClassGroupId]) -> Result<Vec<Clas | ||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /// Every class `user` is the homeroom teacher of, newest first — the visible |
| 59 | -/// set a sınıf öğretmeni reads their own instances through (D10), the read | |
| 59 | +/// set a homeroom teacher reads their own instances through (D10), the read | |
| 60 | 60 | /// behind `visible_instances` in the web layer. |
| 61 | 61 | pub async fn list_for_teacher(db: &Database, user: &UserId) -> Result<Vec<ClassGroup>, AppError> { |
| 62 | 62 | class_group::list_for_teacher(db, user).await |
src/service/class_member.rsmodified+4 -4
| @@ -92,7 +92,7 @@ pub async fn leave(db: &Database, class: &ClassGroupId, user: &UserId) -> Result | ||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /// Take `user` out of `class` for good — the hard exit, which deletes the |
| 95 | -/// stint rather than stamping it. Kept for the şube-transfer rollback path | |
| 95 | +/// stint rather than stamping it. Kept for the section-transfer rollback path | |
| 96 | 96 | /// alone, where the stint being undone must leave no trace a later read could |
| 97 | 97 | /// mistake for history; every route uses [`leave`]. |
| 98 | 98 | /// |
| @@ -417,9 +417,9 @@ mod tests { | ||
| 417 | 417 | } |
| 418 | 418 | |
| 419 | 419 | /// D4: a member exit **releases** the rows the leaving section wrote — |
| 420 | - /// there is no heir to hand one over to. Two şubeler teaching the same | |
| 421 | - /// catalog course hold the student in their *own* instance, each with its | |
| 422 | - /// own row tagged with its own class, so a release may only take the | |
| 420 | + /// there is no heir to hand one over to. Two class sections teaching the | |
| 421 | + /// same catalog course hold the student in their *own* instance, each with | |
| 422 | + /// its own row tagged with its own class, so a release may only take the | |
| 423 | 423 | /// leaving section's row and count back; the rival's row stands exactly as |
| 424 | 424 | /// written. The old rule re-tagged the row with a rival section instead |
| 425 | 425 | /// (keeping it on the juncture of a class that no longer held the student), |
src/service/course.rsmodified+11 -10
| @@ -1,10 +1,11 @@ | ||
| 1 | -//! Course workflows: the catalog's CRUD — the template a şube attaches, with | |
| 2 | -//! no term, capacity or teacher list of its own any more (D1/D5/D6: staffing | |
| 3 | -//! and roster live on the instances, [`crate::service::class_course`]) — the | |
| 4 | -//! two gates over a catalog row every caller of those routes shares | |
| 5 | -//! ([`can_manage_course`], [`can_view_course`]), and the delete that collects | |
| 6 | -//! the image/homework/note-file blob keys before the guarded cascade sweeps | |
| 7 | -//! those rows. The queries live in [`crate::db::course`]. | |
| 1 | +//! Course workflows: the catalog's CRUD — the template a class section | |
| 2 | +//! attaches, with no term, capacity or teacher list of its own any more | |
| 3 | +//! (D1/D5/D6: staffing and roster live on the instances, | |
| 4 | +//! [`crate::service::class_course`]) — the two gates over a catalog row every | |
| 5 | +//! caller of those routes shares ([`can_manage_course`], [`can_view_course`]), | |
| 6 | +//! and the delete that collects the image/homework/note-file blob keys before | |
| 7 | +//! the guarded cascade sweeps those rows. The queries live in | |
| 8 | +//! [`crate::db::course`]. | |
| 8 | 9 | |
| 9 | 10 | use crate::database::Database; |
| 10 | 11 | use crate::db::course; |
| @@ -13,7 +14,7 @@ use crate::domain::role::Role; | ||
| 13 | 14 | use crate::domain::user::{User, UserId}; |
| 14 | 15 | use crate::error::AppError; |
| 15 | 16 | |
| 16 | -/// Mint a catalog course. The catalog is not bound to a dönem (D1): exams are, | |
| 17 | +/// Mint a catalog course. The catalog is not bound to a term (D1): exams are, | |
| 17 | 18 | /// through their instance, and no capacity is stored — the roster counter |
| 18 | 19 | /// lives on the instance and gates nothing. |
| 19 | 20 | pub async fn create( |
| @@ -120,8 +121,8 @@ pub async fn update( | ||
| 120 | 121 | /// rows its cascade removed — exactly whose files the web layer may unlink. |
| 121 | 122 | #[derive(Debug)] |
| 122 | 123 | pub struct DeleteOutcome { |
| 123 | - /// `false` = refused, nothing was written: a şube still teaches this | |
| 124 | - /// course, or a student still holds an individual membership in it. | |
| 124 | + /// `false` = refused, nothing was written: a class section still teaches | |
| 125 | + /// this course, or a student still holds an individual membership in it. | |
| 125 | 126 | pub deleted: bool, |
| 126 | 127 | pub image_files: Vec<String>, |
| 127 | 128 | pub answer_image_files: Vec<String>, |
src/service/enrollment.rsmodified+10 -10
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | //! Enrollment workflows: the target-user gates the enroll/unenroll HTTP |
| 2 | 2 | //! handlers pay (the target must exist and still be a student; unenrolling a |
| 3 | 3 | //! pair with no row is a 404) wrapped around the instance-keyed write in |
| 4 | -//! [`crate::db::enrollment`], plus the school-scoped club/etüt membership | |
| 5 | -//! ([`crate::db::course_membership`]) with the one rule that keeps the two | |
| 6 | -//! tiers apart: a class-delivered ders is joined through its instance, never | |
| 7 | -//! directly. | |
| 4 | +//! [`crate::db::enrollment`], plus the school-scoped club/supervised-study | |
| 5 | +//! membership ([`crate::db::course_membership`]) with the one rule that keeps | |
| 6 | +//! the two tiers apart: a class-delivered course is joined through its | |
| 7 | +//! instance, never directly. | |
| 8 | 8 | |
| 9 | 9 | use crate::database::Database; |
| 10 | 10 | use crate::db::course_membership; |
| @@ -65,14 +65,14 @@ pub async fn list_for_class_course( | ||
| 65 | 65 | enrollment::list_for_class_course(db, class_course, limit, offset).await |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | -/// Join `target` to a school-scoped course — a kulüp or an etüt — on `added_by` | |
| 69 | -/// 's orders. | |
| 68 | +/// Join `target` to a school-scoped course — a club or a supervised study — | |
| 69 | +/// on `added_by`'s orders. | |
| 70 | 70 | /// |
| 71 | -/// The one refusal this tier owns: a class-delivered ders | |
| 71 | +/// The one refusal this tier owns: a class-delivered course | |
| 72 | 72 | /// ([`CourseKind::is_class_delivered`](crate::domain::course::CourseKind::is_class_delivered)) |
| 73 | -/// has no school-wide roster to join — its students come from the şubeler that | |
| 74 | -/// teach it — so a direct join is a `400` naming the course, and the instance's | |
| 75 | -/// enrollment route is where that request belongs. | |
| 73 | +/// has no school-wide roster to join — its students come from the class | |
| 74 | +/// sections that teach it — so a direct join is a `400` naming the course, and | |
| 75 | +/// the instance's enrollment route is where that request belongs. | |
| 76 | 76 | pub async fn join_activity( |
| 77 | 77 | db: &Database, |
| 78 | 78 | course: &CourseId, |
src/service/exam.rsmodified+34 -33
| @@ -1,4 +1,4 @@ | ||
| 1 | -//! Exam workflows: the create that resolves the exam's instance and dönem, | |
| 1 | +//! Exam workflows: the create that resolves the exam's instance and term, | |
| 2 | 2 | //! the PATCH re-derive — the merge (set / clear / keep per field) re-judged |
| 3 | 3 | //! against a fresh read every retry round, and the mode-freeze, re-draft, and |
| 4 | 4 | //! kind gates that guard it — and the delete that collects the image blob keys |
| @@ -24,22 +24,22 @@ use crate::domain::user::{User, UserId}; | ||
| 24 | 24 | use crate::error::{AppError, ValidationError}; |
| 25 | 25 | use crate::service::exam_attempt::require_open; |
| 26 | 26 | |
| 27 | -/// Publish (or draft) an exam on one class×course instance, inside one dönem. | |
| 27 | +/// Publish (or draft) an exam on one class×course instance, inside one term. | |
| 28 | 28 | /// |
| 29 | 29 | /// Two refusals stand in front of the write. The instance's catalog course |
| 30 | -/// must be class-delivered (`kind = course`): a kulüp or etüt has no exams — | |
| 31 | -/// D9 keeps the two membership tiers apart, and an exam on a club would be a | |
| 32 | -/// roster nothing enrolls into. And the instance's *year* must still be open | |
| 33 | -/// (D8: the dönem is a grading slice inside the year, so the year is what the | |
| 34 | -/// exam's structure belongs to; a dönem archived inside an open year does not | |
| 35 | -/// close exam creation — the archive is a record, not a wall). | |
| 30 | +/// must be class-delivered (`kind = course`): a club or supervised study has | |
| 31 | +/// no exams — D9 keeps the two membership tiers apart, and an exam on a club | |
| 32 | +/// would be a roster nothing enrolls into. And the instance's *year* must | |
| 33 | +/// still be open (D8: the term is a grading slice inside the year, so the year | |
| 34 | +/// is what the exam's structure belongs to; a term archived inside an open | |
| 35 | +/// year does not close exam creation — the archive is a record, not a wall). | |
| 36 | 36 | /// |
| 37 | -/// The `term` is the dönem the exam is sat in, and it is required; the store's | |
| 37 | +/// The `term` is the term the exam is sat in, and it is required; the store's | |
| 38 | 38 | /// create claims it in the same transaction as the row. It must be one of the |
| 39 | -/// *instance's own year's* dönems: a dönem is a grading slice inside a year, so | |
| 39 | +/// *instance's own year's* terms: a term is a grading slice inside a year, so | |
| 40 | 40 | /// a term from another year is refused here with a `400` on the field rather |
| 41 | 41 | /// than filed — the write would succeed in the store and misfile the exam in |
| 42 | -/// the karne of a year it is not taught in. | |
| 42 | +/// the report card of a year it is not taught in. | |
| 43 | 43 | #[expect( |
| 44 | 44 | clippy::too_many_arguments, |
| 45 | 45 | reason = "mirrors the sibling entities' create(field, field, ..) shape" |
| @@ -72,12 +72,13 @@ pub async fn create( | ||
| 72 | 72 | reason: "only a ders can carry exams — a club or etüt is joined, not sat", |
| 73 | 73 | })); |
| 74 | 74 | } |
| 75 | - // The dönem must be one of the instance's own year's: the year is the | |
| 76 | - // scope a karne is computed over (and a dönem is a grading slice *inside* | |
| 77 | - // it), so an exam filed under another year's dönem would be counted into a | |
| 78 | - // report whose terms it does not belong to — invisible to the year it is | |
| 79 | - // actually taught in and foreign to the one it names. The instance's year | |
| 80 | - // is its şube's, read through the one seam that resolves it. | |
| 75 | + // The term must be one of the instance's own year's: the year is the | |
| 76 | + // scope a report card is computed over (and a term is a grading slice | |
| 77 | + // *inside* it), so an exam filed under another year's term would be | |
| 78 | + // counted into a report whose terms it does not belong to — invisible to | |
| 79 | + // the year it is actually taught in and foreign to the one it names. The | |
| 80 | + // instance's year is its section's, read through the one seam that | |
| 81 | + // resolves it. | |
| 81 | 82 | let Some(term_row) = crate::db::term::read(db, term).await? else { |
| 82 | 83 | return Err(crate::domain::term::gone_error()); |
| 83 | 84 | }; |
| @@ -125,9 +126,9 @@ pub async fn list_for_class_course( | ||
| 125 | 126 | exam::list_for_class_course(db, class_course).await |
| 126 | 127 | } |
| 127 | 128 | |
| 128 | -/// Every exam of every instance in `instances` (one query) — the karne and | |
| 129 | -/// marks reports' cross-instance read, and the list behind a caller's visible | |
| 130 | -/// instances. | |
| 129 | +/// Every exam of every instance in `instances` (one query) — the report-card | |
| 130 | +/// and marks reports' cross-instance read, and the list behind a caller's | |
| 131 | +/// visible instances. | |
| 131 | 132 | pub async fn list_for_class_course_courses( |
| 132 | 133 | db: &Database, |
| 133 | 134 | instances: &[ClassCourseId], |
| @@ -141,12 +142,12 @@ pub async fn list_for_courses(db: &Database, courses: &[CourseId]) -> Result<Vec | ||
| 141 | 142 | exam::list_for_courses(db, courses).await |
| 142 | 143 | } |
| 143 | 144 | |
| 144 | -// ---- audience: the ortak sınav (D2) --------------------------------------- | |
| 145 | +// ---- audience: the shared exam (D2) --------------------------------------- | |
| 145 | 146 | |
| 146 | 147 | /// The exam, or the `404` a gone id deserves — and the caller's right to act |
| 147 | 148 | /// on the exam's **owner** instance, or the `403` D10 answers |
| 148 | 149 | /// ([`crate::service::class_course::ensure_instance_teacher`]: manager+, an |
| 149 | -/// assigned teacher, or the şube's homeroom teacher). | |
| 150 | +/// assigned teacher, or the section's homeroom teacher). | |
| 150 | 151 | /// |
| 151 | 152 | /// The audience routes never move the exam, they announce it, so the gate is |
| 152 | 153 | /// the owner's and not the target's: the section that runs the exam decides |
| @@ -159,21 +160,21 @@ async fn managed_exam(db: &Database, user: &User, id: &ExamId) -> Result<Exam, A | ||
| 159 | 160 | Ok(exam) |
| 160 | 161 | } |
| 161 | 162 | |
| 162 | -/// Announce `exam` to another instance — the ortak sınav write (D2). | |
| 163 | +/// Announce `exam` to another instance — the shared-exam write (D2). | |
| 163 | 164 | /// |
| 164 | 165 | /// The exam stays owned by the instance it was created on; an audience row is |
| 165 | -/// what makes a second (third, …) şube sit the same sitting and carry the | |
| 166 | -/// mark in its own marks and karne ([`crate::db::exam_result`] reads through | |
| 167 | -/// `exam_audience`). Three rules keep the announcement from filing academic | |
| 168 | -/// work where it cannot be graded: | |
| 166 | +/// what makes a second (third, …) class section sit the same sitting and carry the | |
| 167 | +/// mark in its own marks and report card ([`crate::db::exam_result`] reads | |
| 168 | +/// through `exam_audience`). Three rules keep the announcement from filing | |
| 169 | +/// academic work where it cannot be graded: | |
| 169 | 170 | /// |
| 170 | 171 | /// - the target must teach the **same catalog course** — a mark on an algebra |
| 171 | 172 | /// exam standing in a geometry instance's report is a subject that report |
| 172 | 173 | /// never taught; |
| 173 | -/// - both instances must sit under the **same academic year** — a karne is | |
| 174 | -/// computed over one year, so an announcement across years would file the | |
| 174 | +/// - both instances must sit under the **same academic year** — a report card | |
| 175 | +/// is computed over one year, so an announcement across years would file the | |
| 175 | 176 | /// mark into a year the exam is not taught in (the rule [`create`] already |
| 176 | -/// applies to the dönem); | |
| 177 | +/// applies to the term); | |
| 177 | 178 | /// - the target may not be the owner itself: the owner's audience row always |
| 178 | 179 | /// exists, and the owner cannot be withdrawn (see [`remove_audience`]) — |
| 179 | 180 | /// deleting the exam is what ends it. |
| @@ -245,7 +246,7 @@ pub async fn add_audience( | ||
| 245 | 246 | /// [`crate::db::exam_audience::remove`]'s boolean carries — never a silent |
| 246 | 247 | /// success. The exam's own year must still be open, like every other write |
| 247 | 248 | /// against the exam's structure ([`update`] and [`delete`]): withdrawing from |
| 248 | -/// an archived year's ortak sınav is a `409`, not a silent edit of a past | |
| 249 | +/// an archived year's shared exam is a `409`, not a silent edit of a past | |
| 249 | 250 | /// year's record. The answer is the audience the exam holds after the call. |
| 250 | 251 | pub async fn remove_audience( |
| 251 | 252 | db: &Database, |
| @@ -533,8 +534,8 @@ mod tests { | ||
| 533 | 534 | .unwrap() |
| 534 | 535 | } |
| 535 | 536 | |
| 536 | - /// An instance of `course` inside a fresh şube of `year` — one side of an | |
| 537 | - /// announcement. | |
| 537 | + /// An instance of `course` inside a fresh class section of `year` — one | |
| 538 | + /// side of an announcement. | |
| 538 | 539 | async fn instance_in( |
| 539 | 540 | db: &Database, |
| 540 | 541 | manager: &UserId, |
src/service/exam_attempt.rsmodified+3 -3
| @@ -74,7 +74,7 @@ pub async fn ensure_student_now(user: &UserId, db: &Database) -> Result<(), AppE | ||
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /// A 403 unless `user` is enrolled in an instance the exam is addressed to — |
| 77 | -/// its owner, or any sibling it was announced to (an ortak sınav, D2). The | |
| 77 | +/// its owner, or any sibling it was announced to (a shared exam, D2). The | |
| 78 | 78 | /// same wall the exam room checks at its door, re-applied to the sitting's |
| 79 | 79 | /// content paths so an unenrollment mid-exam cuts them too. Finishing stays |
| 80 | 80 | /// exempt: like the rejoin lock, submitting what's already saved writes |
| @@ -126,7 +126,7 @@ pub async fn class_course_of(exam: &Exam, db: &Database) -> Result<ClassCourse, | ||
| 126 | 126 | |
| 127 | 127 | /// The archived-year refusal every exam write pays: the exam's instance must |
| 128 | 128 | /// still sit under an open year. Past years are read-only, and the year — not |
| 129 | -/// the dönem the exam names — is what the exam's structure belongs to. | |
| 129 | +/// the term the exam names — is what the exam's structure belongs to. | |
| 130 | 130 | /// |
| 131 | 131 | /// The instance read doubles as the dangling-reference check |
| 132 | 132 | /// ([`class_course_of`]); the year itself is read by |
| @@ -460,7 +460,7 @@ mod tests { | ||
| 460 | 460 | .await |
| 461 | 461 | .unwrap(); |
| 462 | 462 | let (class_course, _course) = crate::db::course::a_test_instance(db).await; |
| 463 | - // A dönem for the exam to be sat in: the year it belongs to is real | |
| 463 | + // A term for the exam to be sat in: the year it belongs to is real | |
| 464 | 464 | // (the create claims it), and the shape is the calendar's own. |
| 465 | 465 | let manager = crate::db::class_member::tests::fixture_user(db, "manager").await; |
| 466 | 466 | let year = crate::db::academic_year::create( |
src/service/exam_result.rsmodified+1 -1
| @@ -92,7 +92,7 @@ pub async fn grade( | ||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | // ... and be enrolled in an instance the exam is addressed to — the |
| 95 | - // owner's or an announced sibling's (an ortak sınav, D2): an addressed | |
| 95 | + // owner's or an announced sibling's (a shared exam, D2): an addressed | |
| 96 | 96 | // section's student is graded exactly like the owner's. |
| 97 | 97 | if !crate::service::exam::enrolled_anywhere(db, &exam, target).await? { |
| 98 | 98 | return Err(AppError::Validation(ValidationError::Invalid { |
src/service/homework.rsmodified+3 -3
| @@ -176,9 +176,9 @@ pub async fn gate_own_submission( | ||
| 176 | 176 | /// order that matters: a student the homework never named is refused by the |
| 177 | 177 | /// audience check with a 404 and never learns the homework exists. |
| 178 | 178 | /// |
| 179 | -/// The gate keys on the homework's instance → its şube → that şube's year | |
| 180 | -/// (D8): a dönem archived inside an open year does not close homework, the | |
| 181 | -/// year does. | |
| 179 | +/// The gate keys on the homework's instance → its class section → that | |
| 180 | +/// section's year (D8): a term archived inside an open year does not close | |
| 181 | +/// homework, the year does. | |
| 182 | 182 | pub async fn require_open_instance(homework: &Homework, db: &Database) -> Result<(), AppError> { |
| 183 | 183 | crate::service::class_course::require_open(db, homework.get_class_course()).await |
| 184 | 184 | } |
src/service/instance.rsmodified+12 -12
| @@ -36,10 +36,10 @@ pub async fn can_manage_instance( | ||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /// The instances a caller may see, each with whether they run it: the |
| 39 | -/// instances their şubeler carry (a student's roster, and a homeroom | |
| 39 | +/// instances their class sections carry (a student's roster, and a homeroom | |
| 40 | 40 | /// teacher's), the instances they were assigned to teach (a teacher), and — |
| 41 | -/// for a homeroom teacher — their own şube's. The per-instance answer is the | |
| 42 | -/// same D10 rule every instance-scoped gate applies, computed once for the | |
| 41 | +/// for a homeroom teacher — their own section's. The per-instance answer is | |
| 42 | +/// the same D10 rule every instance-scoped gate applies, computed once for the | |
| 43 | 43 | /// list. |
| 44 | 44 | /// |
| 45 | 45 | /// [`crate::web::instances`] serves this set to every caller as |
| @@ -48,20 +48,20 @@ pub async fn can_manage_instance( | ||
| 48 | 48 | /// question by it, which is why it lives here now. |
| 49 | 49 | /// |
| 50 | 50 | /// Staff are *not* members of the section they run, so the two ways a teacher |
| 51 | -/// reaches a şube are read separately and unioned: `class_member` (a student's | |
| 52 | -/// live stint) and the homeroom column (`class_group.teacher`, read through | |
| 53 | -/// [`super::class_group::list_for_teacher`]). Leaving the second out dropped | |
| 54 | -/// every row for a homeroom teacher who was neither enrolled nor assigned — | |
| 55 | -/// even though [`super::class_course::ensure_instance_teacher`] lets them act | |
| 56 | -/// on all of them. | |
| 51 | +/// reaches a class section are read separately and unioned: `class_member` (a | |
| 52 | +/// student's live stint) and the homeroom column (`class_group.teacher`, read | |
| 53 | +/// through [`super::class_group::list_for_teacher`]). Leaving the second out | |
| 54 | +/// dropped every row for a homeroom teacher who was neither enrolled nor | |
| 55 | +/// assigned — even though [`super::class_course::ensure_instance_teacher`] | |
| 56 | +/// lets them act on all of them. | |
| 57 | 57 | pub async fn visible_instances( |
| 58 | 58 | user: &User, |
| 59 | 59 | db: &Database, |
| 60 | 60 | ) -> Result<Vec<(ClassCourse, bool)>, AppError> { |
| 61 | 61 | let mut rows: Vec<(ClassCourse, bool)> = Vec::new(); |
| 62 | - // The şubeler the caller is a live member of, unioned with the ones they | |
| 63 | - // are the homeroom teacher of (an empty second read for a student, and a | |
| 64 | - // cheap one for anyone else — it is keyed on the teacher column). | |
| 62 | + // The class sections the caller is a live member of, unioned with the ones | |
| 63 | + // they are the homeroom teacher of (an empty second read for a student, | |
| 64 | + // and a cheap one for anyone else — it is keyed on the teacher column). | |
| 65 | 65 | // |
| 66 | 66 | // The homeroom half carries the live-`teacher` floor the whole gate does |
| 67 | 67 | // (see [`super::class_course::ensure_instance_teacher`]): the column is |
src/service/karne.rsmodified+50 -48
| @@ -1,20 +1,20 @@ | ||
| 1 | -//! Karne workflows: the report a student's dönem adds up to, and the freeze | |
| 2 | -//! that turns it into a record when the dönem is archived. | |
| 1 | +//! Report-card workflows: the report a student's term adds up to, and the | |
| 2 | +//! freeze that turns it into a record when the term is archived. | |
| 3 | 3 | //! |
| 4 | -//! Karne is *computed*, not stored (D8): per instance, the student's marks are | |
| 5 | -//! weighted by their exam kinds' settings weights and averaged; the average | |
| 6 | -//! takes a label from the school's grade bands; and the dönem's own number is | |
| 7 | -//! a single average over the instances, each weighted by its `ders_saati` (the | |
| 8 | -//! karne weight the şube set on the instance). The catalog's `course` row | |
| 9 | -//! contributes only its title — the two şubeler teaching it are their own | |
| 10 | -//! instances and their own karne lines. | |
| 4 | +//! The report card is *computed*, not stored (D8): per instance, the student's | |
| 5 | +//! marks are weighted by their exam kinds' settings weights and averaged; the | |
| 6 | +//! average takes a label from the school's grade bands; and the term's own | |
| 7 | +//! number is a single average over the instances, each weighted by its | |
| 8 | +//! `ders_saati` (the report-card weight the section set on the instance). The | |
| 9 | +//! catalog's `course` row contributes only its title — the two class sections | |
| 10 | +//! teaching it are their own instances and their own report-card lines. | |
| 11 | 11 | //! |
| 12 | 12 | //! A line's marks are the exams *addressed to* its instance |
| 13 | -//! (`exam_audience`), not only the ones it owns: an ortak sınav announced to | |
| 13 | +//! (`exam_audience`), not only the ones it owns: a shared exam announced to | |
| 14 | 14 | //! several instances is each of their exams (D2), and its marks are a line of |
| 15 | -//! every one of their karnes. | |
| 15 | +//! every one of their report cards. | |
| 16 | 16 | //! |
| 17 | -//! [`build`] serves a frozen report back once its dönem is archived | |
| 17 | +//! [`build`] serves a frozen report back once its term is archived | |
| 18 | 18 | //! ([`crate::db::karne`]), and computes live for an open one. [`freeze`] is the |
| 19 | 19 | //! write half, called from [`crate::service::term::archive`]: from that moment |
| 20 | 20 | //! a later correction to a mark no longer rewrites what a family holds. |
| @@ -34,11 +34,11 @@ use crate::domain::term::{Term, TermId}; | ||
| 34 | 34 | use crate::domain::user::UserId; |
| 35 | 35 | use crate::error::AppError; |
| 36 | 36 | |
| 37 | -/// One instance's line on a karne: the average of the marks the student holds | |
| 38 | -/// in it this dönem, its band label, and the `ders_saati` it weighs into the | |
| 39 | -/// year average with. `course` is the catalog course's title (what a family | |
| 40 | -/// reads); `class_course` is the instance itself, for anything that must act | |
| 41 | -/// on the line. | |
| 37 | +/// One instance's line on a report card: the average of the marks the student | |
| 38 | +/// holds in it this term, its band label, and the `ders_saati` it weighs into | |
| 39 | +/// the year average with. `course` is the catalog course's title (what a | |
| 40 | +/// family reads); `class_course` is the instance itself, for anything that | |
| 41 | +/// must act on the line. | |
| 42 | 42 | #[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)] |
| 43 | 43 | pub struct KarneInstance { |
| 44 | 44 | pub class_course: String, |
| @@ -51,9 +51,9 @@ pub struct KarneInstance { | ||
| 51 | 51 | pub band: Option<String>, |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | -/// A student's karne for one dönem: every instance of their şubeler that | |
| 55 | -/// counts toward the karne, the `ders_saati`-weighted average across them, and | |
| 56 | -/// the verdict. | |
| 54 | +/// A student's report card for one term: every instance of their class | |
| 55 | +/// sections that counts toward the report card, the `ders_saati`-weighted | |
| 56 | +/// average across them, and the verdict. | |
| 57 | 57 | #[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)] |
| 58 | 58 | pub struct KarneReport { |
| 59 | 59 | pub user: String, |
| @@ -67,9 +67,9 @@ pub struct KarneReport { | ||
| 67 | 67 | pub verdict: Option<String>, |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | -/// The student's karne for `term`. | |
| 70 | +/// The student's report card for `term`. | |
| 71 | 71 | /// |
| 72 | -/// An archived dönem serves its frozen snapshot when one exists — the record | |
| 72 | +/// An archived term serves its frozen snapshot when one exists — the record | |
| 73 | 73 | /// the school issued, which no later correction may rewrite. A term that was |
| 74 | 74 | /// never frozen (or is still open) computes live from the marks standing now, |
| 75 | 75 | /// which is what a snapshot-less archive must not silently serve: the caller |
| @@ -90,15 +90,16 @@ pub async fn build(db: &Database, user: &UserId, term: &TermId) -> Result<KarneR | ||
| 90 | 90 | /// Write (or refresh) a frozen report for every student with a roster row |
| 91 | 91 | /// under `term`'s year — the archive half. |
| 92 | 92 | /// |
| 93 | -/// The students are the live rosters of the year's şubeler: an enrollment is | |
| 94 | -/// what puts a student under a şube, and the şube is what binds them to the | |
| 95 | -/// year the dönem is a slice of. Every such student gets exactly one snapshot | |
| 96 | -/// per dönem, computed by the same [`compute`] the live read uses, so the | |
| 97 | -/// frozen report and the served one can never disagree. | |
| 93 | +/// The students are the live rosters of the year's class sections: an | |
| 94 | +/// enrollment is what puts a student under a class section, and the class | |
| 95 | +/// section is what binds them to the year the term is a slice of. Every such | |
| 96 | +/// student gets exactly one snapshot per term, computed by the same [`compute`] | |
| 97 | +/// the live read uses, so the frozen report and the served one can never | |
| 98 | +/// disagree. | |
| 98 | 99 | /// |
| 99 | 100 | /// One snapshot write per student, one transaction each; the run pays a read |
| 100 | -/// per şube rather than a join, because freeze runs once per archived dönem, | |
| 101 | -/// where the report it fixes is read for years. | |
| 101 | +/// per class section rather than a join, because freeze runs once per archived | |
| 102 | +/// term, where the report it fixes is read for years. | |
| 102 | 103 | pub async fn freeze(db: &Database, term: &TermId) -> Result<(), AppError> { |
| 103 | 104 | let term = crate::service::term::read(db, term) |
| 104 | 105 | .await? |
| @@ -128,14 +129,15 @@ pub async fn freeze(db: &Database, term: &TermId) -> Result<(), AppError> { | ||
| 128 | 129 | Ok(()) |
| 129 | 130 | } |
| 130 | 131 | |
| 131 | -/// The live computation: the student's şubeler in the dönem's year, their | |
| 132 | -/// karne-counting instances, and the marked exams of this dönem inside them — | |
| 133 | -/// each mark under every instance it was addressed to, owner or not. | |
| 132 | +/// The live computation: the student's class sections in the term's year, | |
| 133 | +/// their report-card-counting instances, and the marked exams of this term | |
| 134 | +/// inside them — each mark under every instance it was addressed to, owner or | |
| 135 | +/// not. | |
| 134 | 136 | async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneReport, AppError> { |
| 135 | 137 | let school = crate::service::settings::load(db).await?; |
| 136 | 138 | |
| 137 | - // The şubeler the student is live in *this year*: a membership from | |
| 138 | - // another year is history and its marks belong to that year's karne. | |
| 139 | + // The class sections the student is live in *this year*: a membership from | |
| 140 | + // another year is history and its marks belong to that year's report card. | |
| 139 | 141 | let (memberships, _) = crate::db::class_member::list_for_user(db, user, None, 0).await?; |
| 140 | 142 | let member_classes: Vec<ClassGroupId> = memberships |
| 141 | 143 | .iter() |
| @@ -157,8 +159,8 @@ async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneRepor | ||
| 157 | 159 | let instance_ids: Vec<crate::domain::class_course::ClassCourseId> = |
| 158 | 160 | instances.iter().map(|i| i.get_id().clone()).collect(); |
| 159 | 161 | |
| 160 | - // The dönem's exams inside those instances, plus this student's marks on | |
| 161 | - // them. An exam another dönem owns is not this karne's to weigh. | |
| 162 | + // The term's exams inside those instances, plus this student's marks on | |
| 163 | + // them. An exam another term owns is not this report card's to weigh. | |
| 162 | 164 | let exams: Vec<crate::domain::exam::Exam> = |
| 163 | 165 | crate::db::exam::list_for_class_course_courses(db, &instance_ids) |
| 164 | 166 | .await? |
| @@ -170,8 +172,8 @@ async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneRepor | ||
| 170 | 172 | .map(|exam| (exam.get_id().key(), exam)) |
| 171 | 173 | .collect(); |
| 172 | 174 | // Each mark arrives under every instance it counts in: the read resolves |
| 173 | - // the exam's audience, so an ortak sınav's marks are the karne of every | |
| 174 | - // instance it was announced to, not only of its owner. | |
| 175 | + // the exam's audience, so a shared exam's marks are the report card of | |
| 176 | + // every instance it was announced to, not only of its owner. | |
| 175 | 177 | let results = |
| 176 | 178 | crate::db::exam_result::list_for_user_in_term(db, user, term.get_id(), &instance_ids) |
| 177 | 179 | .await?; |
| @@ -202,7 +204,7 @@ async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneRepor | ||
| 202 | 204 | } |
| 203 | 205 | let Some(exam) = by_key.get(result.get_exam().key().as_str()) else { |
| 204 | 206 | // A mark whose exam left the list between the two reads (or a |
| 205 | - // dönem's exam that is no longer there): not this line's. | |
| 207 | + // term's exam that is no longer there): not this line's. | |
| 206 | 208 | continue; |
| 207 | 209 | }; |
| 208 | 210 | // The kind's current settings weight; an exam keeps a retired |
| @@ -253,8 +255,8 @@ fn weighted_average(pairs: &[(i64, i64)]) -> Option<f64> { | ||
| 253 | 255 | Some(total as f64 / total_weight as f64) |
| 254 | 256 | } |
| 255 | 257 | |
| 256 | -/// The single dönem number: each instance's average weighted by its | |
| 257 | -/// `ders_saati`. `None` while no instance has an average — a karne with | |
| 258 | +/// The single term number: each instance's average weighted by its | |
| 259 | +/// `ders_saati`. `None` while no instance has an average — a report card with | |
| 258 | 260 | /// nothing graded has no verdict to give. |
| 259 | 261 | fn ders_saati_average(weighted: &[(f64, i64)]) -> Option<f64> { |
| 260 | 262 | let total_weight: i64 = weighted.iter().map(|(_, saati)| saati).sum(); |
| @@ -297,11 +299,11 @@ fn verdict(school: &crate::domain::settings::Settings, average: Option<f64>) -> | ||
| 297 | 299 | mod tests { |
| 298 | 300 | use super::*; |
| 299 | 301 | |
| 300 | - /// The ortak-sınav rule, read off the karne: an exam addressed to a second | |
| 301 | - /// instance is *that* instance's exam too (D2), so its mark is a line of | |
| 302 | - /// both karnes while an exam addressed to its owner alone stays on the | |
| 303 | - /// owner's line. Read through `exam.class_course` the second line would | |
| 304 | - /// have held no mark at all. | |
| 302 | + /// The shared-exam rule, read off the report card: an exam addressed to a | |
| 303 | + /// second instance is *that* instance's exam too (D2), so its mark is a | |
| 304 | + /// line of both report cards while an exam addressed to its owner alone | |
| 305 | + /// stays on the owner's line. Read through `exam.class_course` the second | |
| 306 | + /// line would have held no mark at all. | |
| 305 | 307 | #[tokio::test] |
| 306 | 308 | async fn an_ortak_exam_counts_into_every_instance_it_is_addressed_to() { |
| 307 | 309 | let (db, _leases) = crate::database::init_test_db().await; |
| @@ -318,7 +320,7 @@ mod tests { | ||
| 318 | 320 | .unwrap_or_else(|| panic!("no line for {}", instance.key())) |
| 319 | 321 | }; |
| 320 | 322 | |
| 321 | - // The owner sits both exams; the addressed instance only the ortak | |
| 323 | + // The owner sits both exams; the addressed instance only the shared | |
| 322 | 324 | // one. Both kinds are `yazili`, whose default weight is 1. |
| 323 | 325 | let owner = line(&fixture.owner); |
| 324 | 326 | assert_eq!( |
| @@ -340,7 +342,7 @@ mod tests { | ||
| 340 | 342 | ); |
| 341 | 343 | assert_eq!(addressed.band.as_deref(), Some("5")); |
| 342 | 344 | |
| 343 | - // Each instance weighs one hour, so the dönem is their plain mean. | |
| 345 | + // Each instance weighs one hour, so the term is their plain mean. | |
| 344 | 346 | assert_eq!(report.year_average, Some(75.0)); |
| 345 | 347 | assert_eq!( |
| 346 | 348 | report.verdict.as_deref(), |
src/service/payment_ledger.rsmodified+6 -6
| @@ -207,12 +207,12 @@ async fn against( | ||
| 207 | 207 | if taken.saturating_add(amount_minor.as_minor()) > target.amount_minor.as_minor() { |
| 208 | 208 | // The fold cannot say *why* the room is gone: a reversal is a |
| 209 | 209 | // child of the line it undoes and folds in at `+amount` exactly |
| 210 | - // as a payment does, so a reversed charge reads as full to the | |
| 211 | - // kuruş. The stored answer is the same either way — nothing may | |
| 212 | - // be recorded against it — but "already paid in full" told a | |
| 213 | - // bursar money had arrived when none ever did. The reversal's | |
| 214 | - // id is derived from its target's, so telling the two apart is | |
| 215 | - // one read, taken only on the refusal path. | |
| 210 | + // as a payment does, so a reversed charge reads as full down to | |
| 211 | + // the minor unit. The stored answer is the same either way — | |
| 212 | + // nothing may be recorded against it — but "already paid in full" | |
| 213 | + // told a bursar money had arrived when none ever did. The | |
| 214 | + // reversal's id is derived from its target's, so telling the two | |
| 215 | + // apart is one read, taken only on the refusal path. | |
| 216 | 216 | if let Some(text) = &reversed { |
| 217 | 217 | let reversed_there = |
| 218 | 218 | payment_ledger::read(&mut *tx, &PaymentLedgerId::for_reversal(&target.id)) |
src/service/rag_scope.rsmodified+28 -27
| @@ -1,4 +1,4 @@ | ||
| 1 | -//! The `(sınıf, ders)` scope a RAG question is answered from. | |
| 1 | +//! The `(class, course)` scope a RAG question is answered from. | |
| 2 | 2 | //! |
| 3 | 3 | //! The RAG corpus is routed by the **pair** — a grade and a subject list sent |
| 4 | 4 | //! separately would cross-product into combinations the asker never named |
| @@ -10,7 +10,7 @@ | ||
| 10 | 10 | //! The derivation is the school's own visibility rules, not a second copy of |
| 11 | 11 | //! them. A student's or a teacher's pairs are the courses their |
| 12 | 12 | //! [`super::instance::visible_instances`] teach them — the very set |
| 13 | -//! `GET /instances/me` serves — and a club/etüt membership | |
| 13 | +//! `GET /instances/me` serves — and a club/supervised-study membership | |
| 14 | 14 | //! ([`crate::db::course_membership`]) adds its subject with no grade, since a |
| 15 | 15 | //! school-scoped course belongs to no section. A parent has no sections of |
| 16 | 16 | //! their own, so their scope is their linked children's, read child by child |
| @@ -36,7 +36,7 @@ use crate::domain::role::Role; | ||
| 36 | 36 | use crate::domain::user::User; |
| 37 | 37 | use crate::error::{AppError, ValidationError}; |
| 38 | 38 | |
| 39 | -/// The `(sınıf, ders)` pairs `user`'s questions may be scoped to, in | |
| 39 | +/// The `(class, course)` pairs `user`'s questions may be scoped to, in | |
| 40 | 40 | /// first-seen order and deduped — one entry per distinct pair. |
| 41 | 41 | /// |
| 42 | 42 | /// `role` is the caller's **live** session role, the same value the |
| @@ -47,10 +47,11 @@ use crate::error::{AppError, ValidationError}; | ||
| 47 | 47 | /// sections do not exist. |
| 48 | 48 | /// |
| 49 | 49 | /// The instance arm reads its rows through [`super::instance::visible_instances`] |
| 50 | -/// and the two lookup tables (the şubeler the pairs sit in and the titles of | |
| 51 | -/// every course named) in one batch read each — never one query per instance: | |
| 52 | -/// a teacher can be assigned to dozens of sections, and a per-row lookup would | |
| 53 | -/// spend the request's whole budget before the AI service is even called. | |
| 50 | +/// and the two lookup tables (the class sections the pairs sit in and the | |
| 51 | +/// titles of every course named) in one batch read each — never one query per | |
| 52 | +/// instance: a teacher can be assigned to dozens of sections, and a per-row | |
| 53 | +/// lookup would spend the request's whole budget before the AI service is even | |
| 54 | +/// called. | |
| 54 | 55 | pub async fn for_user( |
| 55 | 56 | db: &Database, |
| 56 | 57 | user: &User, |
| @@ -83,16 +84,16 @@ pub async fn for_user( | ||
| 83 | 84 | .map(|(instance, _)| instance), |
| 84 | 85 | ); |
| 85 | 86 | } |
| 86 | - // The school-scoped courses the asker joined directly (kulüp, etüt). | |
| 87 | - // Every role may hold one — the table's own gate is the student role, so | |
| 88 | - // for staff this read is simply empty. | |
| 87 | + // The school-scoped courses the asker joined directly (club, supervised | |
| 88 | + // study). Every role may hold one — the table's own gate is the student | |
| 89 | + // role, so for staff this read is simply empty. | |
| 89 | 90 | let memberships = |
| 90 | 91 | crate::db::course_membership::list_for_user(db, user.get_id(), None, 0) |
| 91 | 92 | .await? |
| 92 | 93 | .0; |
| 93 | 94 | |
| 94 | - // One batch read per lookup, over every id the two arms named: the | |
| 95 | - // şubeler decide each instance's grade, and the courses carry the titles | |
| 95 | + // One batch read per lookup, over every id the two arms named: the class | |
| 96 | + // sections decide each instance's grade, and the courses carry the titles | |
| 96 | 97 | // every pair is scoped by. Ids repeat freely — a class usually carries |
| 97 | 98 | // several instances — and `list_by_ids` answers each row once. |
| 98 | 99 | let class_ids: Vec<ClassGroupId> = instances |
| @@ -111,7 +112,7 @@ pub async fn for_user( | ||
| 111 | 112 | let classes = crate::db::class_group::list_by_ids(db, &class_ids).await?; |
| 112 | 113 | let courses = crate::db::course::list_by_ids(db, &course_ids).await?; |
| 113 | 114 | |
| 114 | - // Grade labels, keyed by şube. A class with no grade at all (a | |
| 115 | + // Grade labels, keyed by class section. A class with no grade at all (a | |
| 115 | 116 | // club-shaped section, and the shape a fixture class carries) simply |
| 116 | 117 | // contributes no entry, so its instances scope the subject across every |
| 117 | 118 | // grade — the documented meaning of an absent `sinif`. |
| @@ -164,10 +165,10 @@ pub async fn for_user( | ||
| 164 | 165 | } |
| 165 | 166 | |
| 166 | 167 | /// Append `pair` unless the very same pair is already in the list — a scope is |
| 167 | -/// a set. Two şubeler at one grade teaching one course are one scope, and a | |
| 168 | -/// course attached to a section while also joined as a club contributes both | |
| 169 | -/// of its pairs; a duplicate would spend one of the cap's slots twice and hand | |
| 170 | -/// the service the same corpus under two entries. | |
| 168 | +/// a set. Two class sections at one grade teaching one course are one scope, | |
| 169 | +/// and a course attached to a section while also joined as a club contributes | |
| 170 | +/// both of its pairs; a duplicate would spend one of the cap's slots twice and | |
| 171 | +/// hand the service the same corpus under two entries. | |
| 171 | 172 | fn push_pair( |
| 172 | 173 | pairs: &mut Vec<RagScopePair>, |
| 173 | 174 | seen: &mut HashSet<(Option<String>, String)>, |
| @@ -203,8 +204,8 @@ mod tests { | ||
| 203 | 204 | .unwrap() |
| 204 | 205 | } |
| 205 | 206 | |
| 206 | - /// A şube carrying a grade label — the half of every instance pair, since | |
| 207 | - /// `a_class` deliberately has none. | |
| 207 | + /// A class section carrying a grade label — the half of every instance | |
| 208 | + /// pair, since `a_class` deliberately has none. | |
| 208 | 209 | async fn graded_class(db: &Database, name: &str, grade: &str) -> ClassGroupId { |
| 209 | 210 | let office = crate::db::class_member::tests::fixture_user(db, "ragscope-office").await; |
| 210 | 211 | crate::service::class_group::create( |
| @@ -221,7 +222,7 @@ mod tests { | ||
| 221 | 222 | .clone() |
| 222 | 223 | } |
| 223 | 224 | |
| 224 | - /// Attach a catalog course to a şube, answering the instance. | |
| 225 | + /// Attach a catalog course to a class section, answering the instance. | |
| 225 | 226 | async fn attach( |
| 226 | 227 | db: &Database, |
| 227 | 228 | class: &ClassGroupId, |
| @@ -243,8 +244,8 @@ mod tests { | ||
| 243 | 244 | .unwrap(); |
| 244 | 245 | } |
| 245 | 246 | |
| 246 | - /// A student's pair is the şube's grade plus the course attached to it — | |
| 247 | - /// the same set `GET /instances/me` hands them. | |
| 247 | + /// A student's pair is the section's grade plus the course attached to | |
| 248 | + /// it — the same set `GET /instances/me` hands them. | |
| 248 | 249 | #[tokio::test] |
| 249 | 250 | async fn a_students_sections_scope_their_subjects() { |
| 250 | 251 | let (db, _leases) = crate::database::init_test_db().await; |
| @@ -304,8 +305,8 @@ mod tests { | ||
| 304 | 305 | ); |
| 305 | 306 | } |
| 306 | 307 | |
| 307 | - /// A club or etüt is school-scoped: it belongs to no şube, so its subject | |
| 308 | - /// is scoped with no grade at all. | |
| 308 | + /// A club or supervised study is school-scoped: it belongs to no class | |
| 309 | + /// section, so its subject is scoped with no grade at all. | |
| 309 | 310 | #[tokio::test] |
| 310 | 311 | async fn a_club_membership_scopes_a_subject_with_no_grade() { |
| 311 | 312 | let (db, _leases) = crate::database::init_test_db().await; |
| @@ -328,9 +329,9 @@ mod tests { | ||
| 328 | 329 | assert_eq!(scope, vec![pair(None, "Satranç")]); |
| 329 | 330 | } |
| 330 | 331 | |
| 331 | - /// The same pair reached twice is one scope: two şubeler at one grade | |
| 332 | - /// teaching one course are two instances and a single `(sınıf, ders)`, | |
| 333 | - /// which is what the corpus is routed by. | |
| 332 | + /// The same pair reached twice is one scope: two class sections at one | |
| 333 | + /// grade teaching one course are two instances and a single | |
| 334 | + /// `(class, course)`, which is what the corpus is routed by. | |
| 334 | 335 | #[tokio::test] |
| 335 | 336 | async fn a_pair_reached_twice_rides_once() { |
| 336 | 337 | let (db, _leases) = crate::database::init_test_db().await; |
src/service/settings.rsmodified+11 -10
| @@ -51,11 +51,11 @@ pub struct SettingsPatch { | ||
| 51 | 51 | pub dietary_tags: Option<Vec<String>>, |
| 52 | 52 | /// Absent keeps the knob; `Some(None)` clears it (no cutoff at all). |
| 53 | 53 | pub meal_cancel_cutoff_minutes: Option<Option<i64>>, |
| 54 | - /// The school's branş list, raw like `dietary_tags` (the workflow's own | |
| 55 | - /// validation step, holding the stored list, decides whether an empty | |
| 56 | - /// list means "keep" or "clear" — see `Settings::try_new`). | |
| 54 | + /// The school's subject-specialisation list, raw like `dietary_tags` (the | |
| 55 | + /// workflow's own validation step, holding the stored list, decides whether | |
| 56 | + /// an empty list means "keep" or "clear" — see `Settings::try_new`). | |
| 57 | 57 | pub branches: Option<Vec<String>>, |
| 58 | - /// The devamsızlık excuse kinds, raw like `branches`. | |
| 58 | + /// The absence excuse kinds, raw like `branches`. | |
| 59 | 59 | pub excuse_kinds: Option<Vec<String>>, |
| 60 | 60 | /// Absent keeps the limit; `Some(None)` clears it (no ceiling). |
| 61 | 61 | pub max_excused_absent_days: Option<Option<i64>>, |
| @@ -177,12 +177,13 @@ pub async fn apply(db: &Database, patch: &SettingsPatch) -> Result<Settings, App | ||
| 177 | 177 | params.meal_cancel_cutoff_minutes = patch |
| 178 | 178 | .meal_cancel_cutoff_minutes |
| 179 | 179 | .unwrap_or(params.meal_cancel_cutoff_minutes); |
| 180 | - // The year's shape: the branş and excuse-kind lists ride the same | |
| 181 | - // idiom as `dietary_tags` below — an *absent* field keeps the stored | |
| 182 | - // list, an explicitly submitted one replaces it whole (empty is a | |
| 183 | - // legal list: a school that never configured branş keeps none), and | |
| 184 | - // both are validated by `Settings::try_new` under the stored-list | |
| 185 | - // rules at the end of this merge. | |
| 180 | + // The year's shape: the subject-specialisation and excuse-kind lists | |
| 181 | + // ride the same idiom as `dietary_tags` below — an *absent* field | |
| 182 | + // keeps the stored list, an explicitly submitted one replaces it whole | |
| 183 | + // (empty is a legal list: a school that never configured subject | |
| 184 | + // specialisations keeps none), and both are validated by | |
| 185 | + // `Settings::try_new` under the stored-list rules at the end of this | |
| 186 | + // merge. | |
| 186 | 187 | params.branches = patch |
| 187 | 188 | .branches |
| 188 | 189 | .clone() |
src/service/term.rsmodified+12 -11
| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | //! Term workflows: the archived-refusal rule every write against past |
| 2 | -//! structure pays, the id resolver a request-supplied dönem passes through, | |
| 2 | +//! structure pays, the id resolver a request-supplied term passes through, | |
| 3 | 3 | //! the row-level write gate, the delete's linked-refusal mapping, and the |
| 4 | -//! archive that freezes every karne inside the dönem. The queries live in | |
| 4 | +//! archive that freezes every report card inside the term. The queries live in | |
| 5 | 5 | //! [`crate::db::term`]. |
| 6 | 6 | |
| 7 | 7 | use crate::database::Database; |
| @@ -11,7 +11,7 @@ use crate::domain::term::{Term, TermId, TermName, archived_error}; | ||
| 11 | 11 | use crate::domain::timestamp::Timestamp; |
| 12 | 12 | use crate::error::{AppError, ValidationError}; |
| 13 | 13 | |
| 14 | -/// Mint a dönem inside an academic year. The year is claimed in the same | |
| 14 | +/// Mint a term inside an academic year. The year is claimed in the same | |
| 15 | 15 | /// statement as the row (see [`term::create`]): past years take no new |
| 16 | 16 | /// structure, which is why the web layer resolves the id through |
| 17 | 17 | /// [`crate::service::academic_year::resolve`] first. |
| @@ -43,7 +43,7 @@ pub async fn list_all( | ||
| 43 | 43 | /// `None` stays `None`, an unknown id is a `400` naming the field, and an |
| 44 | 44 | /// *archived* one is a `409 term_archived`. That last refusal lives here |
| 45 | 45 | /// rather than in each handler because this is the single spot every |
| 46 | -/// request-supplied dönem passes through (an exam names one): past years take | |
| 46 | +/// request-supplied term passes through (an exam names one): past years take | |
| 47 | 47 | /// no new structure. |
| 48 | 48 | pub async fn resolve(db: &Database, id: Option<&str>) -> Result<Option<TermId>, AppError> { |
| 49 | 49 | let Some(id) = id else { |
| @@ -107,18 +107,19 @@ pub async fn delete(db: &Database, target: Term) -> Result<(), AppError> { | ||
| 107 | 107 | } |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | -/// Archive a dönem; idempotent — an already-archived term answers with the | |
| 110 | +/// Archive a term; idempotent — an already-archived term answers with the | |
| 111 | 111 | /// stamp it already had. |
| 112 | 112 | /// |
| 113 | -/// The archive freezes every student's karne for the dönem first | |
| 114 | -/// ([`crate::service::karne::freeze`]): from the moment the dönem is closed | |
| 113 | +/// The archive freezes every student's report card for the term first | |
| 114 | +/// ([`crate::service::karne::freeze`]): from the moment the term is closed | |
| 115 | 115 | /// the report is the record the school issued, and a later correction to a |
| 116 | 116 | /// mark must not silently rewrite what a family holds. The freeze runs *before* |
| 117 | 117 | /// the stamp so a failure leaves nothing archived-but-unfrozen — an archived |
| 118 | -/// dönem whose snapshot is missing would go on serving live computations, and | |
| 119 | -/// the store's delete guard (which refuses a dönem a karne was frozen for) | |
| 120 | -/// would not see it either. A dönem that is already archived is left alone: a | |
| 121 | -/// second archive must not re-freeze over a record that was already issued. | |
| 118 | +/// term whose snapshot is missing would go on serving live computations, and | |
| 119 | +/// the store's delete guard (which refuses a term a report card was frozen | |
| 120 | +/// for) would not see it either. A term that is already archived is left | |
| 121 | +/// alone: a second archive must not re-freeze over a record that was already | |
| 122 | +/// issued. | |
| 122 | 123 | pub async fn archive(db: &Database, target: Term) -> Result<Term, AppError> { |
| 123 | 124 | if !target.is_archived() { |
| 124 | 125 | crate::service::karne::freeze(db, target.get_id()).await?; |
src/service/user.rsmodified+3 -2
| @@ -173,8 +173,9 @@ pub async fn set_profile( | ||
| 173 | 173 | birth_date: Option<Option<BirthDate>>, |
| 174 | 174 | display_name: Option<Option<DisplayName>>, |
| 175 | 175 | bio: Option<Option<Bio>>, |
| 176 | - // The branş, clearable like `bio`; membership in the school's | |
| 177 | - // `Settings::get_branches()` list is the caller's check, not this one's. | |
| 176 | + // The subject specialisation, clearable like `bio`; membership in the | |
| 177 | + // school's `Settings::get_branches()` list is the caller's check, not this | |
| 178 | + // one's. | |
| 178 | 179 | branch: Option<Option<String>>, |
| 179 | 180 | ) -> Result<User, AppError> { |
| 180 | 181 | user::set_profile( |
src/web/academic_years.rsmodified+22 -20
| @@ -1,13 +1,14 @@ | ||
| 1 | -//! Academic years (eğitim yılı) — the top of the calendar. | |
| 1 | +//! Academic years — the top of the calendar. | |
| 2 | 2 | //! |
| 3 | -//! A year is the container a şube and its dönemler belong to, and the one that | |
| 4 | -//! carries the sınıf-geçme policy (`grade_promotions`). A grade absent from that | |
| 5 | -//! policy is not carried over by [`rollover`](crate::service::academic_year::rollover) | |
| 3 | +//! A year is the container a class section and its terms belong to, and the one | |
| 4 | +//! that carries the grade-promotion policy (`grade_promotions`). A grade absent | |
| 5 | +//! from that policy is not carried over by | |
| 6 | +//! [`rollover`](crate::service::academic_year::rollover) | |
| 6 | 7 | //! — that is how graduation is expressed — so the command is explicit and |
| 7 | 8 | //! idempotent rather than automatic at a date. |
| 8 | 9 | //! |
| 9 | 10 | //! A year with structure still on it cannot be deleted (`409`), and an archived |
| 10 | -//! year is read-only: no new şube, no new dönem, no new exam inside it. A | |
| 11 | +//! year is read-only: no new section, no new term, no new exam inside it. A | |
| 11 | 12 | //! finished year is closed with `POST /{id}/archive` (manager+), idempotently; |
| 12 | 13 | //! there is deliberately no unarchive route. |
| 13 | 14 | |
| @@ -49,7 +50,7 @@ struct CreateYear { | ||
| 49 | 50 | /// Year end, UTC unix-milliseconds; must be after `starts_at`. |
| 50 | 51 | #[schema(example = 1_810_000_000_000_i64)] |
| 51 | 52 | ends_at: i64, |
| 52 | - /// The sınıf-geçme policy: each pair maps a grade label to the label its | |
| 53 | + /// The grade-promotion policy: each pair maps a grade label to the label its | |
| 53 | 54 | /// students move to at `POST /academic-years/{id}/rollover`. A grade the |
| 54 | 55 | /// list does not name is not rolled over — it graduates. Omit for a year |
| 55 | 56 | /// whose rollover is not decided yet. |
| @@ -67,7 +68,7 @@ struct UpdateYear { | ||
| 67 | 68 | grade_promotions: Option<Vec<PromotionBody>>, |
| 68 | 69 | } |
| 69 | 70 | |
| 70 | -/// One sınıf-geçme pair off the wire. | |
| 71 | +/// One grade-promotion pair off the wire. | |
| 71 | 72 | #[derive(Deserialize, Serialize, ToSchema)] |
| 72 | 73 | struct PromotionBody { |
| 73 | 74 | #[schema(max_length = 20, example = "5")] |
| @@ -97,10 +98,10 @@ struct YearResponse { | ||
| 97 | 98 | /// Who created it. |
| 98 | 99 | creator: String, |
| 99 | 100 | grade_promotions: Vec<PromotionBody>, |
| 100 | - /// How many şubeler sit in this year. | |
| 101 | + /// How many class sections sit in this year. | |
| 101 | 102 | #[schema(example = 12)] |
| 102 | 103 | class_count: i64, |
| 103 | - /// How many dönemler it holds. | |
| 104 | + /// How many terms it holds. | |
| 104 | 105 | #[schema(example = 2)] |
| 105 | 106 | term_count: i64, |
| 106 | 107 | } |
| @@ -128,12 +129,12 @@ impl YearResponse { | ||
| 128 | 129 | } |
| 129 | 130 | } |
| 130 | 131 | |
| 131 | -/// What one rollover carried: how many şubeler were planted in the target | |
| 132 | -/// year, how many live students came with them, and the grades left behind | |
| 133 | -/// because the year names no promotion for them — the graduating ones. | |
| 132 | +/// What one rollover carried: how many class sections were planted in the | |
| 133 | +/// target year, how many live students came with them, and the grades left | |
| 134 | +/// behind because the year names no promotion for them — the graduating ones. | |
| 134 | 135 | #[derive(Serialize, ToSchema)] |
| 135 | 136 | struct RolloverResponse { |
| 136 | - /// The year that received the şubeler. | |
| 137 | + /// The year that received the class sections. | |
| 137 | 138 | year: String, |
| 138 | 139 | #[schema(example = 12)] |
| 139 | 140 | classes: usize, |
| @@ -147,7 +148,7 @@ struct RolloverResponse { | ||
| 147 | 148 | |
| 148 | 149 | #[derive(Deserialize, ToSchema)] |
| 149 | 150 | struct Rollover { |
| 150 | - /// The year the şubeler come *from* — usually the one that just ended. | |
| 151 | + /// The year the class sections come *from* — usually the one that just ended. | |
| 151 | 152 | /// Must be a different, existing year; the target must still be empty. |
| 152 | 153 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 153 | 154 | from_year: String, |
| @@ -187,7 +188,7 @@ fn check_range( | ||
| 187 | 188 | |
| 188 | 189 | /// Create an academic year. Requires manager+. Past dates are allowed — years |
| 189 | 190 | /// are calendar structure, not schedules. `grade_promotions` is the |
| 190 | -/// sınıf-geçme policy the rollover applies. | |
| 191 | +/// grade-promotion policy the rollover applies. | |
| 191 | 192 | #[utoipa::path( |
| 192 | 193 | post, |
| 193 | 194 | path = "/", |
| @@ -322,7 +323,7 @@ async fn update_year( | ||
| 322 | 323 | } |
| 323 | 324 | |
| 324 | 325 | /// Archive an academic year. Requires manager+. Stamps `archived_at`, and from |
| 325 | -/// then on the whole year is past structure: no new şube, no new dönem, no | |
| 326 | +/// then on the whole year is past structure: no new section, no new term, no | |
| 326 | 327 | /// exam inside it, and no edit or delete of the year itself. Idempotent — a |
| 327 | 328 | /// second archive answers `200` with the stamp that already stood. There is no |
| 328 | 329 | /// unarchive route: the row is deletable only while open. |
| @@ -349,7 +350,7 @@ async fn archive_year( | ||
| 349 | 350 | } |
| 350 | 351 | |
| 351 | 352 | /// Delete an academic year. Requires manager+. Refused with a 409 while any |
| 352 | -/// şube or dönem still links it — move or delete them first. An archived year | |
| 353 | +/// section or term still links it — move or delete them first. An archived year | |
| 353 | 354 | /// must be re-opened (`PATCH` is not enough: there is no unarchive here, so |
| 354 | 355 | /// the row is only deletable while open) like every other past-structure |
| 355 | 356 | /// write. |
| @@ -378,9 +379,10 @@ async fn delete_year( | ||
| 378 | 379 | Ok(StatusCode::NO_CONTENT) |
| 379 | 380 | } |
| 380 | 381 | |
| 381 | -/// Carry another year's şubeler into this one. Requires manager+. Each şube of | |
| 382 | -/// `from_year` whose grade the target year promotes is planted afresh here — | |
| 383 | -/// same name, mapped grade, and copies of its instances (`ders_saati`, karne | |
| 382 | +/// Carry another year's class sections into this one. Requires manager+. Each | |
| 383 | +/// section of `from_year` whose grade the target year promotes is planted afresh | |
| 384 | +/// here — same name, mapped grade, and copies of its instances (`ders_saati`, | |
| 385 | +/// report-card | |
| 384 | 386 | /// policy, teachers) and of every live member, who are also enrolled into the |
| 385 | 387 | /// new instances. A grade with no promotion entry stays behind: that is |
| 386 | 388 | /// graduation, and `graduated` names it. The target must be empty (a second |
src/web/appointments.rsmodified+1 -1
| @@ -44,7 +44,7 @@ struct PublishSlots { | ||
| 44 | 44 | #[schema(example = 1_900_000_000_000_i64)] |
| 45 | 45 | starts_at: i64, |
| 46 | 46 | ends_at: i64, |
| 47 | - /// Free-text hint shown to requesters ("office hours", "veli görüşmesi"). | |
| 47 | + /// Free-text hint shown to requesters ("office hours", "parent meeting"). | |
| 48 | 48 | #[schema(max_length = 500)] |
| 49 | 49 | note: Option<String>, |
| 50 | 50 | /// Repeat the same window every week up to and including `until`. |
src/web/attendance.rsmodified+21 -21
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | //! Attendance reports: the event tallies, the lesson roll call per instance, |
| 2 | -//! and the devamsızlık block a Turkish school actually reads — how many | |
| 3 | -//! *days* a student was away in each dönem, and whether that is over the | |
| 2 | +//! and the absence block a Turkish school actually reads — how many | |
| 3 | +//! *days* a student was away in each term, and whether that is over the | |
| 4 | 4 | //! configured limit. |
| 5 | 5 | //! |
| 6 | 6 | //! The day counts are bucketed in the school's timezone |
| @@ -88,13 +88,13 @@ fn attendance_rate(present: u64, absent: u64, late: u64) -> Option<f64> { | ||
| 88 | 88 | #[derive(Serialize, ToSchema)] |
| 89 | 89 | struct CourseAttendance { |
| 90 | 90 | /// The instance these tallies belong to (`GET /instances/{id}`) — the |
| 91 | - /// course as one şube teaches it. | |
| 91 | + /// course as one class section teaches it. | |
| 92 | 92 | instance: String, |
| 93 | 93 | course: CourseResponse, |
| 94 | 94 | counts: StatusCounts, |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | -/// The configured per-dönem absence limits, or `null` per limit when the | |
| 97 | +/// The configured per-term absence limits, or `null` per limit when the | |
| 98 | 98 | /// school set none. |
| 99 | 99 | #[derive(Serialize, ToSchema)] |
| 100 | 100 | struct AbsenceLimits { |
| @@ -102,7 +102,7 @@ struct AbsenceLimits { | ||
| 102 | 102 | max_unexcused_days: Option<i64>, |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -/// One dönem's devamsızlık: how many days the student was away, split the way | |
| 105 | +/// One term's absence: how many days the student was away, split the way | |
| 106 | 106 | /// a Turkish school splits it. |
| 107 | 107 | /// |
| 108 | 108 | /// A *day* is a calendar day at the school on which at least one lesson was |
| @@ -112,14 +112,14 @@ struct AbsenceLimits { | ||
| 112 | 112 | /// neither (its semantics are the school's own). |
| 113 | 113 | #[derive(Serialize, ToSchema)] |
| 114 | 114 | struct TermAbsence { |
| 115 | - /// The dönem (`GET /terms/{id}`). | |
| 115 | + /// The term (`GET /terms/{id}`). | |
| 116 | 116 | term: String, |
| 117 | 117 | name: String, |
| 118 | 118 | #[schema(example = 3)] |
| 119 | 119 | absent_days: i64, |
| 120 | 120 | #[schema(example = 1)] |
| 121 | 121 | excused_days: i64, |
| 122 | - /// The unexcused absence days — the count the mazeretsiz limit watches. | |
| 122 | + /// The unexcused absence days — the count the unexcused limit watches. | |
| 123 | 123 | /// Equal to `absent_days`; both are published because a client should not |
| 124 | 124 | /// have to know that. |
| 125 | 125 | #[schema(example = 3)] |
| @@ -131,7 +131,7 @@ struct TermAbsence { | ||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /// A user's full attendance report: generic events, lesson roll call overall, |
| 134 | -/// the roll call broken down per instance, and the per-dönem devamsızlık. | |
| 134 | +/// the roll call broken down per instance, and the per-term absence breakdown. | |
| 135 | 135 | #[derive(Serialize, ToSchema)] |
| 136 | 136 | struct AttendanceReport { |
| 137 | 137 | /// The user's id. |
| @@ -144,8 +144,8 @@ struct AttendanceReport { | ||
| 144 | 144 | /// the user has roll-call rows in it — attendance is a historical record, |
| 145 | 145 | /// so unenrolling never hides an absence. |
| 146 | 146 | courses: Vec<CourseAttendance>, |
| 147 | - /// The per-dönem absent-day counts, oldest dönem first. A lesson that falls | |
| 148 | - /// in no dönem's range is not counted here (it still counts in the | |
| 147 | + /// The per-term absent-day counts, oldest term first. A lesson that falls | |
| 148 | + /// in no term's range is not counted here (it still counts in the | |
| 149 | 149 | /// tallies). |
| 150 | 150 | devamsizlik: Vec<TermAbsence>, |
| 151 | 151 | } |
| @@ -153,7 +153,7 @@ struct AttendanceReport { | ||
| 153 | 153 | /// The school's day boundary as a fixed offset in minutes. |
| 154 | 154 | /// |
| 155 | 155 | /// The allow-list in [`crate::constant::TIMEZONES`] names zones whose offset |
| 156 | -/// is constant (Türkiye has run on UTC+3 with no DST since 2016), so the | |
| 156 | +/// is constant (Turkey has run on UTC+3 with no DST since 2016), so the | |
| 157 | 157 | /// backend buckets days without carrying a timezone database — the same |
| 158 | 158 | /// arithmetic the settings module's own list is built on. An unrecognised name |
| 159 | 159 | /// falls back to [`crate::constant::DEFAULT_TIMEZONE`]'s offset, which is what |
| @@ -174,7 +174,7 @@ fn zoned_day(millis: i64, offset_minutes: i32) -> chrono::NaiveDate { | ||
| 174 | 174 | .date_naive() |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | -/// The dönem an instant falls in: the containing term with the latest start, | |
| 177 | +/// The term an instant falls in: the containing term with the latest start, | |
| 178 | 178 | /// or `None` when the calendar does not cover it. |
| 179 | 179 | fn term_of(instant: i64, terms: &[Term]) -> Option<&Term> { |
| 180 | 180 | terms |
| @@ -187,7 +187,7 @@ fn term_of(instant: i64, terms: &[Term]) -> Option<&Term> { | ||
| 187 | 187 | |
| 188 | 188 | /// Assemble the report: tally the user's event rows, then their session rows |
| 189 | 189 | /// grouped by the (denormalized) instance. A `viewer` narrows the per-instance |
| 190 | -/// blocks — and the overall session tally, and the devamsızlık — to the | |
| 190 | +/// blocks — and the overall session tally, and the absence block — to the | |
| 191 | 191 | /// instances that viewer runs (self-reports and manager+ reports pass `None`). |
| 192 | 192 | /// Event tallies are school-wide, not course data, so they stay in either case. |
| 193 | 193 | async fn build_report( |
| @@ -267,13 +267,13 @@ async fn build_report( | ||
| 267 | 267 | }) |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | -/// The devamsızlık block: for every dönem the visible rows reach, the count of | |
| 270 | +/// The absence block: for every term the visible rows reach, the count of | |
| 271 | 271 | /// distinct school-days on which the student was `absent` (unexcused) and on |
| 272 | 272 | /// which they were `excused`. |
| 273 | 273 | /// |
| 274 | 274 | /// The day is the *lesson's* day (`course_session.starts_at`), never when the |
| 275 | 275 | /// teacher got round to marking: a roll call taken a week late must not move an |
| 276 | -/// absence into another dönem. The lessons are read one instance at a time | |
| 276 | +/// absence into another term. The lessons are read one instance at a time | |
| 277 | 277 | /// (they are the same instances the blocks are built from), and the terms once. |
| 278 | 278 | async fn absence_by_term( |
| 279 | 279 | rows: &[&SessionAttendance], |
| @@ -302,7 +302,7 @@ async fn absence_by_term( | ||
| 302 | 302 | let offset = zone_offset_minutes(school.get_timezone()); |
| 303 | 303 | let (terms, _) = crate::service::term::list_all(db, None, 0).await?; |
| 304 | 304 | |
| 305 | - // A day counts once per (dönem, status class), which is what the | |
| 305 | + // A day counts once per (term, status class), which is what the | |
| 306 | 306 | // regulation counts. |
| 307 | 307 | let mut unexcused: HashSet<(String, chrono::NaiveDate)> = HashSet::new(); |
| 308 | 308 | let mut excused: HashSet<(String, chrono::NaiveDate)> = HashSet::new(); |
| @@ -320,7 +320,7 @@ async fn absence_by_term( | ||
| 320 | 320 | continue; |
| 321 | 321 | }; |
| 322 | 322 | let Some(term) = term_of(*start, &terms) else { |
| 323 | - // A lesson outside every dönem's range is not this block's. | |
| 323 | + // A lesson outside every term's range is not this block's. | |
| 324 | 324 | continue; |
| 325 | 325 | }; |
| 326 | 326 | let key = term.get_id().key(); |
| @@ -369,8 +369,8 @@ async fn absence_by_term( | ||
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | /// The current user's attendance report: event tallies, lesson roll-call |
| 372 | -/// tallies, a per-instance breakdown with attendance rates, and the per-dönem | |
| 373 | -/// devamsızlık. | |
| 372 | +/// tallies, a per-instance breakdown with attendance rates, and the per-term | |
| 373 | +/// absence breakdown. | |
| 374 | 374 | #[utoipa::path( |
| 375 | 375 | get, |
| 376 | 376 | path = "/me", |
| @@ -390,7 +390,7 @@ async fn my_report( | ||
| 390 | 390 | |
| 391 | 391 | /// Any user's attendance report. Requires teacher+, or a parent tied to the |
| 392 | 392 | /// target student. Managers, admins, and parents see every instance; a teacher |
| 393 | -/// sees the event tallies plus only the roll-call blocks — and the devamsızlık | |
| 393 | +/// sees the event tallies plus only the roll-call blocks — and the absence | |
| 394 | 394 | /// days — of the instances they run. |
| 395 | 395 | #[utoipa::path( |
| 396 | 396 | get, |
| @@ -427,7 +427,7 @@ mod tests { | ||
| 427 | 427 | use super::*; |
| 428 | 428 | |
| 429 | 429 | /// The day bucket is the school's day, not UTC's: 22:30 UTC in summer |
| 430 | - /// İstanbul is already tomorrow. This is the whole reason the timezone is | |
| 430 | + /// Istanbul is already tomorrow. This is the whole reason the timezone is | |
| 431 | 431 | /// read off the settings. |
| 432 | 432 | #[test] |
| 433 | 433 | fn the_day_bucket_follows_the_school_zone() { |
src/web/boards.rsmodified+1 -1
| @@ -586,7 +586,7 @@ async fn close_board( | ||
| 586 | 586 | #[derive(Deserialize, ToSchema)] |
| 587 | 587 | #[serde(tag = "kind", rename_all = "lowercase")] |
| 588 | 588 | enum InviteSource { |
| 589 | - /// Everyone currently in this class section (şube). The homeroom teacher is | |
| 589 | + /// Everyone currently in this class section. The homeroom teacher is | |
| 590 | 590 | /// not implied — the field is a label and grants nothing. |
| 591 | 591 | Class { class: String }, |
| 592 | 592 | /// Everyone the course reaches: the union of every instance's roster and |
src/web/classes.rsmodified+19 -19
| @@ -1,4 +1,4 @@ | ||
| 1 | -//! Class sections (şube): a named set of students the school moves as one. | |
| 1 | +//! Class sections: a named set of students the school moves as one. | |
| 2 | 2 | //! |
| 3 | 3 | //! Nothing here is a second kind of membership — adding a student to a class |
| 4 | 4 | //! enrolls them into every course the class carries, and attaching a course |
| @@ -65,13 +65,13 @@ struct CreateClass { | ||
| 65 | 65 | #[schema(max_length = 200, example = "9-A")] |
| 66 | 66 | name: String, |
| 67 | 67 | /// The school's own label for the year this class sits in ("9", "10-A", |
| 68 | - /// "anaokulu"). Free text; omit (or send `""`) for a class with no grade. | |
| 68 | + /// "kindergarten"). Free text; omit (or send `""`) for a class with no grade. | |
| 69 | 69 | #[schema(max_length = 20, example = "9")] |
| 70 | 70 | grade: Option<String>, |
| 71 | 71 | /// The academic year this class sits in (`GET /academic-years`). Optional; |
| 72 | - /// a şube with no year takes no exam and is never rolled over. | |
| 72 | + /// a class with no year takes no exam and is never rolled over. | |
| 73 | 73 | year: Option<String>, |
| 74 | - /// The class's homeroom teacher (sınıf öğretmeni) — a teacher, manager or | |
| 74 | + /// The class's homeroom teacher — a teacher, manager or | |
| 75 | 75 | /// admin account. Optional; omit (or send `""`) for a class with none. |
| 76 | 76 | #[schema(example = "0198f1a2-3b4c-7d5e-8f90-000000000001")] |
| 77 | 77 | teacher_id: Option<String>, |
| @@ -130,7 +130,7 @@ struct ClassResponse { | ||
| 130 | 130 | /// The academic year this class sits in (`GET /academic-years`); `null` |
| 131 | 131 | /// when unassigned. |
| 132 | 132 | year: Option<String>, |
| 133 | - /// The class's homeroom teacher (sınıf öğretmeni); `null` when none is | |
| 133 | + /// The class's homeroom teacher; `null` when none is | |
| 134 | 134 | /// assigned — as it is for every class after the account was demoted below |
| 135 | 135 | /// `teacher`. |
| 136 | 136 | teacher: Option<PersonRef>, |
| @@ -208,7 +208,7 @@ struct ClassMemberResponse { | ||
| 208 | 208 | /// When they left, UTC unix-millis; `null` while the stint is live. Only |
| 209 | 209 | /// ever non-null on a history read — every route here lists live rows. |
| 210 | 210 | left_at: Option<i64>, |
| 211 | - /// The şube this member was copied out of by a year rollover, or `null` | |
| 211 | + /// The class section this member was copied out of by a year rollover, or `null` | |
| 212 | 212 | /// when a human placed them. |
| 213 | 213 | #[schema(example = "0198f1a2-3b4c-7d5e-8f90-000000000001")] |
| 214 | 214 | source_class_group: Option<String>, |
| @@ -240,15 +240,15 @@ struct ClassCourseResponse { | ||
| 240 | 240 | course: String, |
| 241 | 241 | /// Who attached it. |
| 242 | 242 | attached_by: PersonRef, |
| 243 | - /// Weekly lesson hours; the instance's weight in the year's karne average. | |
| 243 | + /// Weekly lesson hours; the instance's weight in the year's report-card average. | |
| 244 | 244 | #[schema(example = 5)] |
| 245 | 245 | ders_saati: i64, |
| 246 | - /// Whether this instance's marks count toward the karne. | |
| 246 | + /// Whether this instance's marks count toward the report card. | |
| 247 | 247 | counts_toward_karne: bool, |
| 248 | 248 | /// How many students are enrolled right now. |
| 249 | 249 | #[schema(example = 28)] |
| 250 | 250 | enrollment_count: i64, |
| 251 | - /// The staff assigned to run this instance, beyond the şube's homeroom | |
| 251 | + /// The staff assigned to run this instance, beyond the class's homeroom | |
| 252 | 252 | /// teacher (who may act on it too). |
| 253 | 253 | teachers: Vec<PersonRef>, |
| 254 | 254 | } |
| @@ -295,7 +295,7 @@ fn grade_or_none(text: Option<&str>) -> Result<Option<ClassGrade>, AppError> { | ||
| 295 | 295 | /// The homeroom teacher a request names, as the row itself — an empty string is |
| 296 | 296 | /// *no* teacher, exactly like `grade`, so omitting the field and clearing it |
| 297 | 297 | /// with `""` land on the same stored row. The named account must exist and hold |
| 298 | -/// teacher-or-higher: a class's sınıf öğretmeni is staff, and the check is the | |
| 298 | +/// teacher-or-higher: a class's homeroom teacher is staff, and the check is the | |
| 299 | 299 | /// same shape `add_member` uses for a non-student. The `User` comes back so the |
| 300 | 300 | /// caller can name them in the response without a second read. |
| 301 | 301 | async fn teacher_or_none(text: Option<&str>, db: &Database) -> Result<Option<User>, AppError> { |
| @@ -362,9 +362,9 @@ async fn classes_page( | ||
| 362 | 362 | |
| 363 | 363 | /// Create a class. Requires manager+ — a class is school structure, not a |
| 364 | 364 | /// teacher's own room. `grade` is a free-text label for the year ("9", "10-A"), |
| 365 | -/// `year` links the academic year (which is what binds the şube to a karne and | |
| 366 | -/// to the rollover), `teacher_id` names the homeroom teacher (sınıf öğretmeni, | |
| 367 | -/// a teacher+ account); all optional. | |
| 365 | +/// `year` links the academic year (which is what binds the class to a report | |
| 366 | +/// card and to the rollover), `teacher_id` names the homeroom teacher (a | |
| 367 | +/// teacher+ account); all optional. | |
| 368 | 368 | /// |
| 369 | 369 | /// If a blueprint covers the new class's grade, the class is **stocked from it |
| 370 | 370 | /// at once** — the same best-effort pump `POST /classes/{id}/blueprint` runs, so |
| @@ -901,7 +901,7 @@ async fn remove_member( | ||
| 901 | 901 | /// class×course row every exam, session, lesson and roster under this class's |
| 902 | 902 | /// course now keys on. Requires teacher+ and catalog rights on that course |
| 903 | 903 | /// (its creator, or a manager/admin): attaching writes that course's roster for |
| 904 | -/// this section, and the weekly hours and karne policy the instance starts | |
| 904 | +/// this section, and the weekly hours and report-card policy the instance starts | |
| 905 | 905 | /// with. The class's whole roster is enrolled in one go, and students already |
| 906 | 906 | /// enrolled by hand keep their own rows. Attaching the same course twice is a |
| 907 | 907 | /// 409. |
| @@ -955,7 +955,7 @@ async fn attach_course( | ||
| 955 | 955 | } |
| 956 | 956 | |
| 957 | 957 | /// List the instances a class carries — each a catalog course as this section |
| 958 | -/// teaches it, with its hours, karne policy and teachers — newest first, paged | |
| 958 | +/// teaches it, with its hours, report-card policy and teachers — newest first, paged | |
| 959 | 959 | /// via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+. |
| 960 | 960 | /// Returns a `{items, total, limit, offset}` envelope. `POST /instances/{id}` |
| 961 | 961 | /// edits one; this is the read that names them. |
| @@ -1013,7 +1013,7 @@ async fn list_class_courses( | ||
| 1013 | 1013 | /// takes the whole instance, so its roster goes with it: every enrollment on it |
| 1014 | 1014 | /// is swept, the rows this class pumped and the ones an operator placed by hand |
| 1015 | 1015 | /// alike — an enrollment cannot outlive the instance it hangs off, and "a hand |
| 1016 | -/// row survives the şube" is the *member* exit's rule, applied where the | |
| 1016 | +/// row survives the class section" is the *member* exit's rule, applied where the | |
| 1017 | 1017 | /// instance is still standing. An instance that exists but belongs to another |
| 1018 | 1018 | /// class, or one that is already gone, is a 404. |
| 1019 | 1019 | #[utoipa::path( |
| @@ -1222,8 +1222,8 @@ struct BlueprintStatusResponse { | ||
| 1222 | 1222 | /// every section is stocked. |
| 1223 | 1223 | #[schema(example = 12)] |
| 1224 | 1224 | matched: i64, |
| 1225 | - /// Every section at the grade, in sync or not. Unpaged: it is the şube one | |
| 1226 | - /// school runs at one grade. | |
| 1225 | + /// Every section at the grade, in sync or not. Unpaged: the set one school | |
| 1226 | + /// runs at one grade. | |
| 1227 | 1227 | sections: Vec<SectionStatusResponse>, |
| 1228 | 1228 | } |
| 1229 | 1229 | |
| @@ -1580,7 +1580,7 @@ mod tests { | ||
| 1580 | 1580 | /// The same nullable rule on the homeroom teacher, plus the bar it holds: |
| 1581 | 1581 | /// absent and `""` are the same *no teacher* (and never touch the store), |
| 1582 | 1582 | /// an id naming nobody is a `400`, and so is one naming a student — a |
| 1583 | - /// class's sınıf öğretmeni is staff. | |
| 1583 | + /// class's homeroom teacher is staff. | |
| 1584 | 1584 | #[tokio::test] |
| 1585 | 1585 | async fn an_empty_teacher_is_no_teacher_and_a_student_is_never_one() { |
| 1586 | 1586 | use crate::domain::role::Role; |
src/web/courses.rsmodified+19 -19
| @@ -49,21 +49,21 @@ struct CreateCourse { | ||
| 49 | 49 | #[schema(max_length = 2000)] |
| 50 | 50 | description: Option<String>, |
| 51 | 51 | /// `course` (a regular class — the default), `study` (a supervised study |
| 52 | - /// session — etüt), or `club` (a student club — kulüp). Only a `course` is | |
| 53 | - /// taught through şube instances (and carries exams, sessions and | |
| 54 | - /// homework); a `study`/`club` is joined school-wide. | |
| 52 | + /// session), or `club` (a student club). Only a `course` is taught through | |
| 53 | + /// class-section instances (and carries exams, sessions and homework); a | |
| 54 | + /// `study`/`club` is joined school-wide. | |
| 55 | 55 | #[schema(example = "course")] |
| 56 | 56 | kind: Option<String>, |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | #[derive(Deserialize, ToSchema)] |
| 60 | 60 | struct JoinMember { |
| 61 | - /// The user to add to the club/etüt. | |
| 61 | + /// The user to add to the club or study. | |
| 62 | 62 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 63 | 63 | user_id: String, |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | -/// Public shape of one individual membership in a club or etüt — the | |
| 66 | +/// Public shape of one individual membership in a club or study — the | |
| 67 | 67 | /// school-scoped tier, distinct from a class instance's roster. |
| 68 | 68 | #[derive(Serialize, ToSchema)] |
| 69 | 69 | struct MembershipResponse { |
| @@ -101,7 +101,7 @@ struct UpdateCourse { | ||
| 101 | 101 | title: Option<String>, |
| 102 | 102 | #[schema(max_length = 2000)] |
| 103 | 103 | description: Option<String>, |
| 104 | - /// `course`, `study` (etüt), or `club` (kulüp). Omit to keep the current | |
| 104 | + /// `course`, `study` (supervised study), or `club`. Omit to keep the current | |
| 105 | 105 | /// kind. |
| 106 | 106 | kind: Option<String>, |
| 107 | 107 | } |
| @@ -154,10 +154,10 @@ pub(crate) async fn visible_courses(user: &User, db: &Database) -> Result<Vec<Co | ||
| 154 | 154 | |
| 155 | 155 | /// Create a catalog course owned by the current user. Requires the `teacher` |
| 156 | 156 | /// role or higher. `kind` picks the flavor — `course` (a regular class, the |
| 157 | -/// default), `study` (a supervised study session — etüt), or `club` (a | |
| 158 | -/// student club — kulüp). A catalog row teaches nobody by itself: a şube | |
| 159 | -/// attaches it into an instance (`POST /classes/{id}/instances`), and a | |
| 160 | -/// `study`/`club` is joined school-wide (`POST /courses/{id}/members`). | |
| 157 | +/// default), `study` (a supervised study session), or `club` (a student | |
| 158 | +/// club). A catalog row teaches nobody by itself: a class section attaches it | |
| 159 | +/// into an instance (`POST /classes/{id}/instances`), and a `study`/`club` is | |
| 160 | +/// joined school-wide (`POST /courses/{id}/members`). | |
| 161 | 161 | #[utoipa::path( |
| 162 | 162 | post, |
| 163 | 163 | path = "/", |
| @@ -232,7 +232,7 @@ async fn list_courses( | ||
| 232 | 232 | /// `{items, total, limit, offset}` envelope. |
| 233 | 233 | /// |
| 234 | 234 | /// Both membership tiers are here: a student's enrollments in the instances |
| 235 | -/// their şubeler teach, and an individual club/etüt membership. The | |
| 235 | +/// their class sections teach, and an individual club/study membership. The | |
| 236 | 236 | /// *instances* themselves are `GET /instances/me`. |
| 237 | 237 | #[utoipa::path( |
| 238 | 238 | get, |
| @@ -369,7 +369,7 @@ async fn update_course( | ||
| 369 | 369 | |
| 370 | 370 | /// Delete a catalog course. Requires teacher+; only its creator or a |
| 371 | 371 | /// manager/admin may delete it. Refused with a 409 while the course is still |
| 372 | -/// taught anywhere — detach it from every şube (`DELETE | |
| 372 | +/// taught anywhere — detach it from every class section (`DELETE | |
| 373 | 373 | /// /classes/{id}/instances/{instance}`) and remove its individual members |
| 374 | 374 | /// first, so a course that carries teaching is never dropped by accident. |
| 375 | 375 | /// Once free, it cascades the instances' exams (with their results, questions, |
| @@ -428,13 +428,13 @@ async fn delete_course( | ||
| 428 | 428 | Ok(StatusCode::NO_CONTENT) |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | -// ---- club/etüt membership --------------------------------------------------- | |
| 431 | +// ---- club/study membership ------------------------------------------------- | |
| 432 | 432 | |
| 433 | -/// Add a user to a club or etüt — the **school-scoped** membership tier. | |
| 433 | +/// Add a user to a club or study — the **school-scoped** membership tier. | |
| 434 | 434 | /// Requires teacher+ and catalog rights (its creator, or a manager/admin). |
| 435 | -/// Only students can be added, and only to a `study` (etüt) or `club` | |
| 436 | -/// (kulüp): a regular ders (`kind` `course`) has no school-wide roster — its | |
| 437 | -/// students come from the şubeler that teach it, and that join is | |
| 435 | +/// Only students can be added, and only to a `study` (supervised study) or | |
| 436 | +/// `club`: a regular course (`kind` `course`) has no school-wide roster — its | |
| 437 | +/// students come from the class sections that teach it, and that join is | |
| 438 | 438 | /// `POST /instances/{id}/enrollments` (400 here). Idempotent: a pair that |
| 439 | 439 | /// already holds a membership is returned as-is. |
| 440 | 440 | #[utoipa::path( |
| @@ -474,7 +474,7 @@ async fn join_member( | ||
| 474 | 474 | Ok(Json(MembershipResponse::new(&membership, &people))) |
| 475 | 475 | } |
| 476 | 476 | |
| 477 | -/// List a club/etüt's members, newest first, paged via `?limit=&offset=` | |
| 477 | +/// List a club/study's members, newest first, paged via `?limit=&offset=` | |
| 478 | 478 | /// (omit `limit` for the whole list). Requires teacher+ and catalog rights. |
| 479 | 479 | /// Returns a `{items, total, limit, offset}` envelope. An instance's roster |
| 480 | 480 | /// is `GET /instances/{id}/enrollments`. |
| @@ -524,7 +524,7 @@ async fn list_members( | ||
| 524 | 524 | Ok(Json(Page::new(items, total, limit, offset))) |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | -/// Remove a user from a club or etüt. Requires teacher+ and catalog rights. | |
| 527 | +/// Remove a user from a club or study. Requires teacher+ and catalog rights. | |
| 528 | 528 | /// Existing exam results and badges are untouched — the membership is a door, |
| 529 | 529 | /// not a record of what happened inside. A pair holding no membership is a |
| 530 | 530 | /// 404. |
src/web/dto.rsmodified+14 -15
| @@ -209,10 +209,10 @@ impl UserResponse { | ||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /// Public shape of a course — the **catalog** row, the school's template for a |
| 212 | -/// ders. Shared by `courses` (CRUD) and the reports that embed the course an | |
| 213 | -/// instance teaches. The taught thing is the *instance* | |
| 212 | +/// taught course. Shared by `courses` (CRUD) and the reports that embed the | |
| 213 | +/// course an instance teaches. The taught thing is the *instance* | |
| 214 | 214 | /// ([`super::instances::InstanceResponse`]): teachers, weekly hours and the |
| 215 | -/// karne weight live there, per şube. | |
| 215 | +/// report-card weight live there, per class section. | |
| 216 | 216 | #[derive(Serialize, ToSchema)] |
| 217 | 217 | pub struct CourseResponse { |
| 218 | 218 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| @@ -223,17 +223,16 @@ pub struct CourseResponse { | ||
| 223 | 223 | #[schema(example = "Algebra")] |
| 224 | 224 | pub title: String, |
| 225 | 225 | pub description: String, |
| 226 | - /// `course` (a regular class), `study` (a supervised study session — | |
| 227 | - /// etüt), or `club` (a student club — kulüp). Only a `course` is taught | |
| 228 | - /// through şube instances and carries exams; a `study`/`club` is joined | |
| 229 | - /// school-wide. | |
| 226 | + /// `course` (a regular class), `study` (a supervised study session), or | |
| 227 | + /// `club` (a student club). Only a `course` is taught through class-section | |
| 228 | + /// instances and carries exams; a `study`/`club` is joined school-wide. | |
| 230 | 229 | #[schema(example = "course")] |
| 231 | 230 | pub kind: String, |
| 232 | - /// How many şube instances teach this course right now — the count the | |
| 233 | - /// delete refusal watches (`0` is what lets the row go). | |
| 231 | + /// How many class×course instances teach this course right now — the count | |
| 232 | + /// the delete refusal watches (`0` is what lets the row go). | |
| 234 | 233 | #[schema(example = 3)] |
| 235 | 234 | pub class_course_count: i64, |
| 236 | - /// How many individual club/etüt memberships the course carries. | |
| 235 | + /// How many individual club/study memberships the course carries. | |
| 237 | 236 | #[schema(example = 12)] |
| 238 | 237 | pub course_membership_count: i64, |
| 239 | 238 | } |
| @@ -295,8 +294,8 @@ pub struct HomeworkResponse { | ||
| 295 | 294 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 296 | 295 | pub id: String, |
| 297 | 296 | /// The class×course instance this homework belongs to |
| 298 | - /// (`GET /instances/{id}`) — the şube's own assignment, not a school-wide | |
| 299 | - /// course's. | |
| 297 | + /// (`GET /instances/{id}`) — the class section's own assignment, not a | |
| 298 | + /// school-wide course's. | |
| 300 | 299 | pub class_course: String, |
| 301 | 300 | /// The course subject this homework is tagged with. |
| 302 | 301 | pub subject: String, |
| @@ -386,10 +385,10 @@ pub struct ExamResponse { | ||
| 386 | 385 | pub id: String, |
| 387 | 386 | pub creator: String, |
| 388 | 387 | /// The class×course instance the exam belongs to (`GET /instances/{id}`) — |
| 389 | - /// two şubeler teaching the same course sit their own exams. | |
| 388 | + /// two class sections teaching the same course sit their own exams. | |
| 390 | 389 | pub class_course: String, |
| 391 | - /// The dönem the exam is sat in (`GET /terms`); its marks count into that | |
| 392 | - /// dönem's karne. | |
| 390 | + /// The term the exam is sat in (`GET /terms`); its marks count into that | |
| 391 | + /// term's report card. | |
| 393 | 392 | pub term: String, |
| 394 | 393 | pub title: String, |
| 395 | 394 | pub description: String, |
src/web/events.rsmodified+1 -1
| @@ -67,7 +67,7 @@ enum AudienceDto { | ||
| 67 | 67 | /// The students currently enrolled in this course (live — enrollment |
| 68 | 68 | /// changes move people in and out). |
| 69 | 69 | Course { course: String }, |
| 70 | - /// The students currently in this class section (şube) — live, so adding | |
| 70 | + /// The students currently in this class section — live, so adding | |
| 71 | 71 | /// or removing a member moves them in and out. The homeroom teacher is not |
| 72 | 72 | /// implied. If the class is later deleted the event survives with an empty |
| 73 | 73 | /// roster. |
src/web/exams/audience.rsmodified+15 -15
| @@ -2,13 +2,13 @@ use super::*; | ||
| 2 | 2 | |
| 3 | 3 | use crate::domain::class_course::ClassCourseId; |
| 4 | 4 | |
| 5 | -// ---- audience: the ortak sınav --------------------------------------------- | |
| 5 | +// ---- audience: the shared exam ---------------------------------------------- | |
| 6 | 6 | // An exam is owned by the instance it was created on, but it can be announced |
| 7 | 7 | // to other instances of the same course in the same academic year: one |
| 8 | -// sitting, one mark, standing in every addressed instance's marks and karne. | |
| 8 | +// sitting, one mark, standing in every addressed instance's marks and report card. | |
| 9 | 9 | // The gate is the owner instance's (a manager+, its assigned teachers, its |
| 10 | -// şube's homeroom teacher) — the instance that runs the exam decides who else | |
| 11 | -// sits it. | |
| 10 | +// class section's homeroom teacher) — the instance that runs the exam decides | |
| 11 | +// who else sits it. | |
| 12 | 12 | |
| 13 | 13 | /// One instance an exam is announced to. |
| 14 | 14 | #[derive(Serialize, ToSchema)] |
| @@ -16,7 +16,7 @@ pub(crate) struct ExamAudienceResponse { | ||
| 16 | 16 | /// The class×course instance the exam is announced to. |
| 17 | 17 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 18 | 18 | instance: String, |
| 19 | - /// The şube (class section) that instance belongs to. | |
| 19 | + /// The class section that instance belongs to. | |
| 20 | 20 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 21 | 21 | class: String, |
| 22 | 22 | /// The catalog course that instance teaches — the exam's own course, by |
| @@ -43,8 +43,8 @@ impl ExamAudienceResponse { | ||
| 43 | 43 | /// pair of questions every exam-level gate asks (D2). |
| 44 | 44 | /// |
| 45 | 45 | /// A caller *sees* the exam when any addressed instance admits them as a |
| 46 | -/// viewer (its enrolled students, its teachers, its şube's homeroom teacher, | |
| 47 | -/// manager+), and *acts* on it — grading, the results readers, the live | |
| 46 | +/// viewer (its enrolled students, its teachers, its class section's homeroom | |
| 47 | +/// teacher, manager+), and *acts* on it — grading, the results readers, the live | |
| 48 | 48 | /// monitor — when they manage one of them. Both are exactly the predicates |
| 49 | 49 | /// that instance's own routes apply |
| 50 | 50 | /// ([`super::instances::list_instance_exams`], `POST /instances/{id}/exams`), |
| @@ -81,12 +81,12 @@ pub(crate) struct AddAudience { | ||
| 81 | 81 | instance: String, |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | -/// Announce an exam to another instance — the **ortak sınav** write: one exam | |
| 85 | -/// addressed to a sibling şube, so it and its marks stand in that section's | |
| 86 | -/// exam list, marks report and karne. Requires teacher+ and management rights | |
| 87 | -/// over the exam's **owner** instance (an assigned teacher, its şube's | |
| 88 | -/// homeroom teacher, or a manager/admin) — the target instance's teachers | |
| 89 | -/// have no say. | |
| 84 | +/// Announce an exam to another instance — the **shared exam** write: one exam | |
| 85 | +/// addressed to a sibling class section, so it and its marks stand in that | |
| 86 | +/// section's exam list, marks report and report card. Requires teacher+ and | |
| 87 | +/// management rights over the exam's **owner** instance (an assigned teacher, | |
| 88 | +/// its class section's homeroom teacher, or a manager/admin) — the target | |
| 89 | +/// instance's teachers have no say. | |
| 90 | 90 | /// The target must teach the exam's own catalog course and sit under the same |
| 91 | 91 | /// academic year (`400` otherwise), the owner itself is refused (`400`), and |
| 92 | 92 | /// an archived target year is a `409`. Announcing a pair that already stands |
| @@ -128,8 +128,8 @@ pub(crate) async fn add_audience( | ||
| 128 | 128 | /// behind the announce routes' answer, useful on its own to a client that |
| 129 | 129 | /// wants to show where else an exam is sat. Visible to the exam's own |
| 130 | 130 | /// audience: an addressed instance's enrolled students, its teachers (or its |
| 131 | -/// şube's homeroom teacher), and managers/admins — except drafts, which stay | |
| 132 | -/// a `404` to everyone but an addressed instance's managers. | |
| 131 | +/// class section's homeroom teacher), and managers/admins — except drafts, | |
| 132 | +/// which stay a `404` to everyone but an addressed instance's managers. | |
| 133 | 133 | #[utoipa::path( |
| 134 | 134 | get, |
| 135 | 135 | path = "/{id}/audience", |
src/web/exams/mod.rsmodified+2 -2
| @@ -292,7 +292,7 @@ async fn list_exams( | ||
| 292 | 292 | |
| 293 | 293 | /// Fetch a single exam by id. Visible to **any instance the exam is addressed |
| 294 | 294 | /// to** — its owner's enrolled students and teachers, and, for an announced |
| 295 | -/// exam (ortak sınav), each addressed section's alike — plus managers/admins; | |
| 295 | +/// exam (a shared exam), each addressed section's alike — plus managers/admins; | |
| 296 | 296 | /// drafts only show to the managers of an addressed instance (everyone else |
| 297 | 297 | /// gets a `404`, as if the exam doesn't exist yet — because it doesn't, |
| 298 | 298 | /// officially). |
| @@ -503,7 +503,7 @@ async fn delete_exam( | ||
| 503 | 503 | |
| 504 | 504 | /// Record (or overwrite) a student's mark for an exam. Requires teacher+ and |
| 505 | 505 | /// management rights over **an instance the exam is addressed to** (the |
| 506 | -/// announced-to section's teacher grades its own students on an ortak sınav); | |
| 506 | +/// announced-to section's teacher grades its own students on a shared exam); | |
| 507 | 507 | /// the target must be a student enrolled in one of them. Only students carry |
| 508 | 508 | /// marks; students never grade — and nobody |
| 509 | 509 | /// grades themselves. A draft can't be graded (`409`) — a mark would point at |
src/web/homework.rsmodified+2 -2
| @@ -206,7 +206,7 @@ async fn list_homework( | ||
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | /// Fetch a single homework by id. Visible to whoever can view its instance (its |
| 209 | -/// enrolled students, its teachers, its şube's homeroom teacher, and | |
| 209 | +/// enrolled students, its teachers, its class section's homeroom teacher, and | |
| 210 | 210 | /// managers/admins). A student the homework is *not* assigned to gets a 404 — |
| 211 | 211 | /// the same no-leak an unseen exam draft gets, so a subset assignment never |
| 212 | 212 | /// reveals itself to the students left out of it. To a caller without |
| @@ -1190,7 +1190,7 @@ struct HomeworkReportEntry { | ||
| 1190 | 1190 | result: Option<HomeworkResultResponse>, |
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | -/// A student's homework report across the instances their şube carries, paged | |
| 1193 | +/// A student's homework report across the instances their class section carries, paged | |
| 1194 | 1194 | /// via `?limit=&offset=` (omit `limit` for all of it): one row per homework in |
| 1195 | 1195 | /// their audience — submitted/late/missing state plus the grade once one |
| 1196 | 1196 | /// exists. Statuses and marks, never the submitted files (observers get the |
src/web/insights.rsmodified+2 -2
| @@ -124,7 +124,7 @@ struct AcceptedResponse { | ||
| 124 | 124 | |
| 125 | 125 | #[derive(Deserialize, ToSchema, Default)] |
| 126 | 126 | struct ComputeStudentRequest { |
| 127 | - /// ISO-8601 date to compute from; omit for the dönem's beginning. | |
| 127 | + /// ISO-8601 date to compute from; omit for the term's beginning. | |
| 128 | 128 | #[schema(example = "2026-09-01")] |
| 129 | 129 | since: Option<String>, |
| 130 | 130 | /// Compute only these sections; omit for all of them. |
| @@ -1076,7 +1076,7 @@ async fn ensure_can_read(caller: &User, target: &UserId, db: &Database) -> Resul | ||
| 1076 | 1076 | /// runs are [`service::instance::visible_instances`]'s `manages` half, which |
| 1077 | 1077 | /// is the same D10 rule every instance-scoped route applies |
| 1078 | 1078 | /// ([`service::class_course::ensure_instance_teacher`]): an assigned teacher |
| 1079 | -/// or the şube's homeroom teacher, and nobody else. | |
| 1079 | +/// or the class section's homeroom teacher, and nobody else. | |
| 1080 | 1080 | async fn teacher_reaches( |
| 1081 | 1081 | db: &Database, |
| 1082 | 1082 | teacher: &User, |
src/web/instances.rsmodified+30 -30
| @@ -1,10 +1,10 @@ | ||
| 1 | -//! The **instance**: one catalog course as taught in one şube — the academic | |
| 1 | +//! The **instance**: one catalog course as taught in one class section — the | |
| 2 | 2 | //! anchor of the K12 model. |
| 3 | 3 | //! |
| 4 | 4 | //! Everything a class actually runs hangs off this row: its roster, its |
| 5 | -//! teachers, its exams, its lessons and its homework. Two şubeler teaching the | |
| 5 | +//! teachers, its exams, its lessons and its homework. Two sections teaching the | |
| 6 | 6 | //! same course are two instances and share none of it. The weekly hours |
| 7 | -//! (`ders_saati`) and the karne policy (`counts_toward_karne`) are the | |
| 7 | +//! (`ders_saati`) and the report-card policy (`counts_toward_karne`) are the | |
| 8 | 8 | //! instance's own, so two sections may legitimately differ. |
| 9 | 9 | //! |
| 10 | 10 | //! The catalog CRUD stays in [`super::courses`]; the exam, session and |
| @@ -74,11 +74,11 @@ pub fn homework_routes() -> OpenApiRouter<AppState> { | ||
| 74 | 74 | |
| 75 | 75 | #[derive(Deserialize, ToSchema)] |
| 76 | 76 | struct UpdateInstance { |
| 77 | - /// Weekly lesson hours: the instance's weight in the year's karne average. | |
| 77 | + /// Weekly lesson hours: the instance's weight in the year's report-card average. | |
| 78 | 78 | /// Omit to keep the stored value; at least 1 and at most 40. |
| 79 | 79 | #[schema(minimum = 1, maximum = 40, example = 5)] |
| 80 | 80 | ders_saati: Option<i64>, |
| 81 | - /// Whether this instance's marks count into the karne. Omit to keep the | |
| 81 | + /// Whether this instance's marks count into the report card. Omit to keep the | |
| 82 | 82 | /// stored value. |
| 83 | 83 | counts_toward_karne: Option<bool>, |
| 84 | 84 | } |
| @@ -105,13 +105,13 @@ struct CreateExamInCourse { | ||
| 105 | 105 | #[schema(max_length = 2000)] |
| 106 | 106 | description: Option<String>, |
| 107 | 107 | /// The assessment form — one of the school's exam kinds (`GET /settings`; |
| 108 | - /// defaults: `yazili`, `sozlu`, `uygulama`). The kind's | |
| 109 | - /// settings-configured weight decides how heavily the exam counts into the | |
| 110 | - /// instance's average. | |
| 108 | + /// defaults: `yazili`, `sozlu`, `uygulama` — written, oral, practice). The | |
| 109 | + /// kind's settings-configured weight decides how heavily the exam counts | |
| 110 | + /// into the instance's average. | |
| 111 | 111 | #[schema(max_length = 50, example = "yazili")] |
| 112 | 112 | kind: String, |
| 113 | - /// The dönem the exam is sat in (`GET /terms`). Required, and it must be a | |
| 114 | - /// dönem of this instance's şube's academic year — that is the slice the | |
| 113 | + /// The term the exam is sat in (`GET /terms`). Required, and it must be a | |
| 114 | + /// term of this instance's section's academic year — that is the slice the | |
| 115 | 115 | /// exam's marks are counted into. |
| 116 | 116 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 117 | 117 | term: String, |
| @@ -185,26 +185,26 @@ struct CreateSessionInCourse { | ||
| 185 | 185 | ends_at: Option<i64>, |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | -/// Public shape of one instance: the course as this şube teaches it, with the | |
| 188 | +/// Public shape of one instance: the course as this section teaches it, with the | |
| 189 | 189 | /// policy that is the instance's own. |
| 190 | 190 | #[derive(Serialize, ToSchema)] |
| 191 | 191 | pub struct InstanceResponse { |
| 192 | 192 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 193 | 193 | pub id: String, |
| 194 | - /// The şube (class section) that teaches it. | |
| 194 | + /// The class section that teaches it. | |
| 195 | 195 | pub class: String, |
| 196 | 196 | /// The catalog course being taught (`GET /courses/{id}`) — its title lives |
| 197 | 197 | /// there, shared by every instance of it. |
| 198 | 198 | pub course: String, |
| 199 | - /// Weekly lesson hours; the instance's weight in the year's karne average. | |
| 199 | + /// Weekly lesson hours; the instance's weight in the year's report-card average. | |
| 200 | 200 | #[schema(example = 5)] |
| 201 | 201 | pub ders_saati: i64, |
| 202 | - /// Whether this instance's marks count toward the karne. | |
| 202 | + /// Whether this instance's marks count toward the report card. | |
| 203 | 203 | pub counts_toward_karne: bool, |
| 204 | 204 | /// How many students are enrolled right now. |
| 205 | 205 | #[schema(example = 28)] |
| 206 | 206 | pub enrollment_count: i64, |
| 207 | - /// The staff assigned to run this instance — separate from the şube's | |
| 207 | + /// The staff assigned to run this instance — separate from the section's | |
| 208 | 208 | /// homeroom teacher, who may also act here (see `GET /instances/{id}`). |
| 209 | 209 | pub teachers: Vec<PersonRef>, |
| 210 | 210 | } |
| @@ -239,9 +239,9 @@ struct EnrollmentResponse { | ||
| 239 | 239 | user: PersonRef, |
| 240 | 240 | /// Who enrolled them. |
| 241 | 241 | enrolled_by: PersonRef, |
| 242 | - /// The şube this row was pumped by, or `null` when a human placed it | |
| 243 | - /// directly. A row with a şube on it is *swept* when that şube drops the | |
| 244 | - /// student or detaches the course; a `null` one is nobody's to take back. | |
| 242 | + /// The section this row was pumped by, or `null` when a human placed it | |
| 243 | + /// directly. A row with a section on it is *swept* when that section drops | |
| 244 | + /// the student or detaches the course; a `null` one is nobody's to take back. | |
| 245 | 245 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 246 | 246 | source: Option<String>, |
| 247 | 247 | } |
| @@ -303,7 +303,7 @@ pub(crate) async fn instance_people( | ||
| 303 | 303 | /// the courses their section is being taught, and a teacher the ones they run. |
| 304 | 304 | /// |
| 305 | 305 | /// The set is exactly |
| 306 | -/// [`crate::service::instance::visible_instances`]'s — the caller's şubeler (a | |
| 306 | +/// [`crate::service::instance::visible_instances`]'s — the caller's sections (a | |
| 307 | 307 | /// student's live membership, a homeroom teacher's) unioned with the instances |
| 308 | 308 | /// they were assigned to teach, deduped by instance. One rule for what the |
| 309 | 309 | /// caller may see, so this list and every instance-scoped gate can never |
| @@ -352,7 +352,7 @@ async fn my_instances( | ||
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | /// Fetch one instance by id. Visible to its enrolled students, its assigned |
| 355 | -/// teachers, its şube's homeroom teacher, and managers/admins. | |
| 355 | +/// teachers, its section's homeroom teacher, and managers/admins. | |
| 356 | 356 | #[utoipa::path( |
| 357 | 357 | get, |
| 358 | 358 | path = "/{id}", |
| @@ -384,7 +384,7 @@ async fn get_instance( | ||
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | /// Update one instance's own policy. Requires teacher+ and a right over this |
| 387 | -/// instance: manager+, one of its assigned teachers, or its şube's homeroom | |
| 387 | +/// instance: manager+, one of its assigned teachers, or its section's homeroom | |
| 388 | 388 | /// teacher. Omitted fields keep their value; both are non-clearable. |
| 389 | 389 | #[utoipa::path( |
| 390 | 390 | patch, |
| @@ -507,7 +507,7 @@ async fn unassign_teacher( | ||
| 507 | 507 | /// Enroll a student into this instance (idempotent upsert). Requires teacher+ |
| 508 | 508 | /// and a right over the instance. Only students can be enrolled — enrollment is |
| 509 | 509 | /// student membership, and it gates sitting exams, being graded, and the |
| 510 | -/// roster. The row is hand-placed (`source` `null`), so no şube sweep can take | |
| 510 | +/// roster. The row is hand-placed (`source` `null`), so no section sweep can take | |
| 511 | 511 | /// it back. |
| 512 | 512 | #[utoipa::path( |
| 513 | 513 | post, |
| @@ -624,7 +624,7 @@ async fn unenroll( | ||
| 624 | 624 | |
| 625 | 625 | /// Create an exam inside one instance. Requires teacher+ and a right over the |
| 626 | 626 | /// instance; the exam's marks count into the instance's average with its |
| 627 | -/// kind's weight (`GET /settings`) and into the dönem's karne named by `term`. | |
| 627 | +/// kind's weight (`GET /settings`) and into the term's report card named by `term`. | |
| 628 | 628 | /// Omit `mode` for an offline-graded exam nobody can sit; `sync`/`async` take |
| 629 | 629 | /// a window (async also `duration_ms`), `open` is sittable anytime with an |
| 630 | 630 | /// optional per-attempt `duration_ms`. `max_attempts` (default 1, `0` = |
| @@ -664,7 +664,7 @@ async fn create_exam_in_instance( | ||
| 664 | 664 | let description = ExamDescription::try_new(&req.description.unwrap_or_default())?; |
| 665 | 665 | let school = service::settings::load(&st.db).await?; |
| 666 | 666 | let kind = ExamKind::try_new(&req.kind, school.get_exam_kinds())?; |
| 667 | - // The dönem is resolved *without* the archive gate: a dönem archived inside | |
| 667 | + // The term is resolved *without* the archive gate: a term archived inside | |
| 668 | 668 | // an open year is a record, not a wall (the year is what |
| 669 | 669 | // [`service::exam::create`] refuses). An unknown id is this route's 400. |
| 670 | 670 | let Some(term) = service::term::read(&st.db, &TermId::from_key(&req.term)).await? else { |
| @@ -707,7 +707,7 @@ async fn create_exam_in_instance( | ||
| 707 | 707 | |
| 708 | 708 | /// List one instance's exams, paged via `?limit=&offset=` (omit `limit` for |
| 709 | 709 | /// all of them). Visible to the instance's enrolled students, its teachers, |
| 710 | -/// its şube's homeroom teacher, and managers/admins — but drafts appear only | |
| 710 | +/// its section's homeroom teacher, and managers/admins — but drafts appear only | |
| 711 | 711 | /// to the instance's managers. Returns a `{items, total, limit, offset}` |
| 712 | 712 | /// envelope. |
| 713 | 713 | #[utoipa::path( |
| @@ -975,9 +975,9 @@ mod tests { | ||
| 975 | 975 | use super::*; |
| 976 | 976 | use crate::domain::class_group::ClassGroupId; |
| 977 | 977 | |
| 978 | - /// The read path behind `GET /instances/me` is `class_member` → the şubeler | |
| 979 | - /// → their instances. A student enrolled by a şube sees exactly that | |
| 980 | - /// şube's instances, and a second şube teaching the same course is a | |
| 978 | + /// The read path behind `GET /instances/me` is `class_member` → the sections | |
| 979 | + /// → their instances. A student enrolled by a section sees exactly that | |
| 980 | + /// section's instances, and a second section teaching the same course is a | |
| 981 | 981 | /// different row. |
| 982 | 982 | #[tokio::test] |
| 983 | 983 | async fn a_member_reads_their_own_sections_instances() { |
| @@ -1015,7 +1015,7 @@ mod tests { | ||
| 1015 | 1015 | /// member read alone left their own instances out of |
| 1016 | 1016 | /// [`visible_instances`] — while [`can_manage_instance`] let them act on |
| 1017 | 1017 | /// every one of them. The homeroom column is the second, separate way a |
| 1018 | - /// teacher reaches a şube, and it has to be unioned in. | |
| 1018 | + /// teacher reaches a section, and it has to be unioned in. | |
| 1019 | 1019 | #[tokio::test] |
| 1020 | 1020 | async fn a_homeroom_teacher_sees_their_sections_instances() { |
| 1021 | 1021 | use crate::domain::class_group::ClassName; |
| @@ -1060,7 +1060,7 @@ mod tests { | ||
| 1060 | 1060 | /// `GET /instances/me` serves [`visible_instances`]' set, so the second arm |
| 1061 | 1061 | /// of the union — the instances a teacher was *assigned* to teach — has to |
| 1062 | 1062 | /// surface there even when they are neither enrolled in nor homeroom of |
| 1063 | - /// the şube. Before the union the route was the member read alone, and a | |
| 1063 | + /// the section. Before the union the route was the member read alone, and a | |
| 1064 | 1064 | /// teacher's assigned instances were invisible to them. |
| 1065 | 1065 | #[tokio::test] |
| 1066 | 1066 | async fn an_assigned_teacher_reads_the_instances_they_teach_once() { |
src/web/limits.rsmodified+5 -5
| @@ -171,8 +171,8 @@ struct CourseLimits { | ||
| 171 | 171 | max_title_len: usize, |
| 172 | 172 | max_description_len: usize, |
| 173 | 173 | /// The only accepted `kind` values. Only `course` is taught through class |
| 174 | - /// instances (exams, sessions, homework); `study` (etüt) and `club` are | |
| 175 | - /// joined school-wide. | |
| 174 | + /// instances (exams, sessions, homework); `study` (supervised study) and | |
| 175 | + /// `club` are joined school-wide. | |
| 176 | 176 | #[schema(example = json!(["course", "study", "club"]))] |
| 177 | 177 | kinds: Vec<&'static str>, |
| 178 | 178 | max_subject_name_len: usize, |
| @@ -282,7 +282,7 @@ struct MealLimits { | ||
| 282 | 282 | /// Dietary tags one student's profile may carry, and its kitchen note. |
| 283 | 283 | max_dietary_tags: usize, |
| 284 | 284 | max_dietary_note_len: usize, |
| 285 | - /// Money is **minor units** (kuruş) as an integer everywhere — never a | |
| 285 | + /// Money is **minor units** as an integer everywhere — never a | |
| 286 | 286 | /// decimal, never a float. These cap one dish and one ledger line. |
| 287 | 287 | max_dish_price_minor: i64, |
| 288 | 288 | max_ledger_amount_minor: i64, |
| @@ -309,7 +309,7 @@ struct MealLimits { | ||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | /// School payments: fee plans, their assignment, and the payment ledger. Money |
| 312 | -/// is **minor units** (kuruş) as an integer, and one ledger line is capped by | |
| 312 | +/// is **minor units** as an integer, and one ledger line is capped by | |
| 313 | 313 | /// the same `max_ledger_amount_minor` the meal ledger publishes. |
| 314 | 314 | #[derive(Serialize, ToSchema)] |
| 315 | 315 | struct PaymentLimits { |
| @@ -363,7 +363,7 @@ struct ChatbotLimits { | ||
| 363 | 363 | /// chatbot group to bound its input. |
| 364 | 364 | #[derive(Serialize, ToSchema)] |
| 365 | 365 | struct RagLimits { |
| 366 | - /// Hard ceiling on the `(sınıf, ders)` scope pairs one ask may carry. The | |
| 366 | + /// Hard ceiling on the `(class, course)` scope pairs one ask may carry. The | |
| 367 | 367 | /// corpus is routed by the pair, so this bounds what one question can ask |
| 368 | 368 | /// a retrieval to sweep. |
| 369 | 369 | max_scope_pairs: usize, |
src/web/marks.rsmodified+39 -39
| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | //! Mark reports: the per-instance weighted average a student carries, and the |
| 2 | -//! karne — the same numbers rolled up per dönem. | |
| 2 | +//! report card — the same numbers rolled up per term. | |
| 3 | 3 | //! |
| 4 | 4 | //! Both read through the *instance* (`class_course`): a student's marks are |
| 5 | -//! grouped by the course their şube is taught, so two sections teaching the | |
| 5 | +//! grouped by the course their section is taught, so two sections teaching the | |
| 6 | 6 | //! same catalog course are two lines. A block's marks are the exams *addressed |
| 7 | -//! to* its instance (`exam_audience`), not only the ones it owns — an ortak | |
| 8 | -//! sınav is each of its audiences' exam, so its mark appears in every one of | |
| 9 | -//! their blocks. The roll-up, the dönem average and the verdict live in | |
| 7 | +//! to* its instance (`exam_audience`), not only the ones it owns — a shared | |
| 8 | +//! exam is each of its audiences' exam, so its mark appears in every one of | |
| 9 | +//! their blocks. The roll-up, the term average and the verdict live in | |
| 10 | 10 | //! [`crate::service::karne`]; this module is the HTTP shape and the teacher |
| 11 | 11 | //! narrowing. |
| 12 | 12 | |
| @@ -64,11 +64,11 @@ struct MarkEntry { | ||
| 64 | 64 | graded_by: String, |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | -/// A student's marks in one instance — one catalog course as one şube teaches | |
| 67 | +/// A student's marks in one instance — one catalog course as one section teaches | |
| 68 | 68 | /// it. |
| 69 | 69 | #[derive(Serialize, ToSchema)] |
| 70 | 70 | struct CourseMarks { |
| 71 | - /// The instance these marks belong to (`GET /instances/{id}`). Two şubeler | |
| 71 | + /// The instance these marks belong to (`GET /instances/{id}`). Two sections | |
| 72 | 72 | /// teaching the same course are two blocks. |
| 73 | 73 | instance: String, |
| 74 | 74 | course: CourseResponse, |
| @@ -108,11 +108,11 @@ fn weighted_average(pairs: &[(i64, i64)]) -> Option<f64> { | ||
| 108 | 108 | Some(total as f64 / total_weight as f64) |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | -/// The instances a student's report is built from: the şubeler they are a live | |
| 112 | -/// member of, and the instances those şubeler carry — the same path the karne | |
| 113 | -/// walks, so the two can never disagree about which blocks a student has. | |
| 111 | +/// The instances a student's report is built from: the sections they are a live | |
| 112 | +/// member of, and the instances those sections carry — the same path the report | |
| 113 | +/// card walks, so the two can never disagree about which blocks a student has. | |
| 114 | 114 | /// |
| 115 | -/// A hand-placed enrollment outside their şubeler is deliberately not a source | |
| 115 | +/// A hand-placed enrollment outside their sections is deliberately not a source | |
| 116 | 116 | /// here: a student's academic identity is their section, and adding an |
| 117 | 117 | /// instance to it is what the office does with `POST /classes/{id}/instances`. |
| 118 | 118 | async fn enrolled_instances(user: &UserId, db: &Database) -> Result<Vec<ClassCourse>, AppError> { |
| @@ -274,19 +274,19 @@ async fn user_marks( | ||
| 274 | 274 | Ok(Json(build_report(&target, viewer, &st.db).await?)) |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | -/// The `?term=` selector both karne routes share. Omitted, it means the newest | |
| 278 | -/// dönem on the calendar — the one a family is reading about now. | |
| 277 | +/// The `?term=` selector both report-card routes share. Omitted, it means the | |
| 278 | +/// newest term on the calendar — the one a family is reading about now. | |
| 279 | 279 | #[derive(Deserialize, IntoParams)] |
| 280 | 280 | struct KarneQuery { |
| 281 | - /// The dönem to report on (`GET /terms`). Omit for the newest one. | |
| 281 | + /// The term to report on (`GET /terms`). Omit for the newest one. | |
| 282 | 282 | #[param(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 283 | 283 | term: Option<String>, |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | -/// The dönem the request names, resolved *without* the archive gate: an | |
| 287 | -/// archived dönem's karne is exactly what a family asks for, and the service | |
| 288 | -/// serves its frozen snapshot. A dönem that does not exist is a 404, as is an | |
| 289 | -/// empty calendar. | |
| 286 | +/// The term the request names, resolved *without* the archive gate: an | |
| 287 | +/// archived term's report card is exactly what a family asks for, and the | |
| 288 | +/// service serves its frozen snapshot. A term that does not exist is a 404, as | |
| 289 | +/// is an empty calendar. | |
| 290 | 290 | async fn resolve_term(query: &KarneQuery, db: &Database) -> Result<TermId, AppError> { |
| 291 | 291 | match query.term.as_deref() { |
| 292 | 292 | Some(id) => Ok(*service::term::read(db, &TermId::from_key(id)) |
| @@ -303,15 +303,15 @@ async fn resolve_term(query: &KarneQuery, db: &Database) -> Result<TermId, AppEr | ||
| 303 | 303 | } |
| 304 | 304 | } |
| 305 | 305 | |
| 306 | -/// Narrow a karne to the instances `viewer` runs: the lines stay, the dönem | |
| 307 | -/// average is recomputed over them (each weighted by its `ders_saati`, the | |
| 308 | -/// karne's own rule), and the verdict is dropped. | |
| 306 | +/// Narrow a report card to the instances `viewer` runs: the lines stay, the | |
| 307 | +/// term average is recomputed over them (each weighted by its `ders_saati`, | |
| 308 | +/// the report card's own rule), and the verdict is dropped. | |
| 309 | 309 | /// |
| 310 | -/// Dropping it is the honest half: the verdict is a whole-karne judgement | |
| 311 | -/// against the school's passing floor, and the floor's rule lives in | |
| 312 | -/// [`crate::service::karne`] — a partially-seen karne states no verdict rather | |
| 313 | -/// than one computed from a subset. A caller who runs every instance in the | |
| 314 | -/// report sees it, because nothing is filtered. | |
| 310 | +/// Dropping it is the honest half: the verdict is a judgement over the whole | |
| 311 | +/// report card against the school's passing floor, and the floor's rule lives | |
| 312 | +/// in [`crate::service::karne`] — a partially-seen report card states no | |
| 313 | +/// verdict rather than one computed from a subset. A caller who runs every | |
| 314 | +/// instance in the report sees it, because nothing is filtered. | |
| 315 | 315 | async fn narrow_karne( |
| 316 | 316 | mut report: KarneReport, |
| 317 | 317 | viewer: &User, |
| @@ -324,7 +324,7 @@ async fn narrow_karne( | ||
| 324 | 324 | kept.push(line); |
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | - // Nothing was filtered: the report is the whole karne, verdict included. | |
| 327 | + // Nothing was filtered: the report is the whole report card, verdict included. | |
| 328 | 328 | if kept.len() == lines_seen { |
| 329 | 329 | report.instances = kept; |
| 330 | 330 | return Ok(report); |
| @@ -343,10 +343,10 @@ async fn narrow_karne( | ||
| 343 | 343 | Ok(report) |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | -/// The current user's karne for one dönem: every instance of their şubeler that | |
| 347 | -/// counts toward the karne, the `ders_saati`-weighted average across them, and | |
| 348 | -/// the verdict. An archived dönem serves the snapshot the school froze when it | |
| 349 | -/// was closed; an open one computes live. | |
| 346 | +/// The current user's report card for one term: every instance of their | |
| 347 | +/// sections that counts toward the report card, the `ders_saati`-weighted | |
| 348 | +/// average across them, and the verdict. An archived term serves the snapshot | |
| 349 | +/// the school froze when it was closed; an open one computes live. | |
| 350 | 350 | #[utoipa::path( |
| 351 | 351 | get, |
| 352 | 352 | path = "/karne", |
| @@ -370,10 +370,10 @@ async fn my_karne( | ||
| 370 | 370 | )) |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | -/// Any user's karne for one dönem. Requires teacher+, or a parent tied to the | |
| 374 | -/// target student. A linked parent and manager+ read the whole karne; an | |
| 375 | -/// exactly-teacher caller sees only the lines of the instances they run, with | |
| 376 | -/// the dönem average recomputed over those and no verdict (see | |
| 373 | +/// Any user's report card for one term. Requires teacher+, or a parent tied to | |
| 374 | +/// the target student. A linked parent and manager+ read the whole report card; | |
| 375 | +/// an exactly-teacher caller sees only the lines of the instances they run, | |
| 376 | +/// with the term average recomputed over those and no verdict (see | |
| 377 | 377 | /// [`narrow_karne`]). |
| 378 | 378 | #[utoipa::path( |
| 379 | 379 | get, |
| @@ -413,9 +413,9 @@ async fn user_karne( | ||
| 413 | 413 | mod tests { |
| 414 | 414 | use super::*; |
| 415 | 415 | |
| 416 | - /// The dönem's own number, each instance weighted by its `ders_saati`: the | |
| 417 | - /// karne's arithmetic, checked here against the report shape this module | |
| 418 | - /// serves. | |
| 416 | + /// The term's own number, each instance weighted by its `ders_saati`: the | |
| 417 | + /// report card's arithmetic, checked here against the report shape this | |
| 418 | + /// module serves. | |
| 419 | 419 | #[test] |
| 420 | 420 | fn the_report_shape_carries_the_instance_it_grouped_by() { |
| 421 | 421 | let pairs = [(85, 1), (70, 2)]; |
| @@ -423,7 +423,7 @@ mod tests { | ||
| 423 | 423 | assert_eq!(weighted_average(&[]), None); |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | - /// The ortak-sınav rule on the marks report: an exam addressed to a second | |
| 426 | + /// The shared-exam rule on the marks report: an exam addressed to a second | |
| 427 | 427 | /// instance stands in *its* block too, while the exam addressed to its |
| 428 | 428 | /// owner alone stays out of it. Read through `exam.class_course` the second |
| 429 | 429 | /// block would have held no results. |
src/web/meals.rsmodified+4 -4
| @@ -99,7 +99,7 @@ struct CreateDish { | ||
| 99 | 99 | name: String, |
| 100 | 100 | #[schema(max_length = 500)] |
| 101 | 101 | description: Option<String>, |
| 102 | - /// Price in **minor units** (kuruş) — `4550` is 45,50 ₺. Integer only: | |
| 102 | + /// Price in **minor units** — `4550` is 45,50 ₺. Integer only: | |
| 103 | 103 | /// this API never speaks decimals or floats about money. |
| 104 | 104 | #[schema(minimum = 0, maximum = 1000000, example = 4550_i64)] |
| 105 | 105 | price_minor: i64, |
| @@ -129,7 +129,7 @@ struct DishResponse { | ||
| 129 | 129 | #[schema(example = "Mercimek çorbası")] |
| 130 | 130 | name: String, |
| 131 | 131 | description: Option<String>, |
| 132 | - /// Minor units (kuruş). | |
| 132 | + /// Minor units. | |
| 133 | 133 | price_minor: i64, |
| 134 | 134 | tags: Vec<String>, |
| 135 | 135 | /// Which of `tags` the **calling user's** own dietary profile flags — the |
| @@ -1232,7 +1232,7 @@ async fn user_attendance( | ||
| 1232 | 1232 | #[derive(Serialize, ToSchema)] |
| 1233 | 1233 | struct BalanceResponse { |
| 1234 | 1234 | student: PersonRef, |
| 1235 | - /// `credits + reversals - charges`, in **minor units** (kuruş). Negative | |
| 1235 | + /// `credits + reversals - charges`, in **minor units**. Negative | |
| 1236 | 1236 | /// means the student owes the school. Derived on every read, never stored. |
| 1237 | 1237 | #[schema(example = -4500)] |
| 1238 | 1238 | balance_minor: i64, |
| @@ -1428,7 +1428,7 @@ async fn user_ledger( | ||
| 1428 | 1428 | struct RecordCredit { |
| 1429 | 1429 | /// The student the money is for. |
| 1430 | 1430 | student_id: String, |
| 1431 | - /// How much came in, **minor units** (kuruş), positive. | |
| 1431 | + /// How much came in, **minor units**, positive. | |
| 1432 | 1432 | #[schema(minimum = 1, maximum = 10000000, example = 25000)] |
| 1433 | 1433 | amount_minor: i64, |
| 1434 | 1434 | /// How it arrived ("cash", "havale", …). Free text — the backend speaks to |
src/web/messages.rsmodified+1 -1
| @@ -36,7 +36,7 @@ struct SendMessage { | ||
| 36 | 36 | subject: String, |
| 37 | 37 | #[schema(example = "I may be 10 minutes late.", max_length = 10000)] |
| 38 | 38 | body: Option<String>, |
| 39 | - /// Optional free-text tag the UI shows as a badge ("Etüt", "Sınav", …). | |
| 39 | + /// Optional free-text tag the UI shows as a badge ("Study", "Exam", …). | |
| 40 | 40 | /// Blank counts as absent. |
| 41 | 41 | #[schema(example = "Etüt", max_length = 50)] |
| 42 | 42 | label: Option<String>, |
src/web/mod.rsmodified+1 -1
| @@ -474,7 +474,7 @@ mod tests { | ||
| 474 | 474 | crate::service::user::set_role(&db, teacher.get_id(), Role::Teacher) |
| 475 | 475 | .await |
| 476 | 476 | .unwrap(); |
| 477 | - // The two assignments the undo owes: the şube's homeroom teacher, and | |
| 477 | + // The two assignments the undo owes: the section's homeroom teacher, and | |
| 478 | 478 | // a teacher assigned to one of its instances (the catalog's own |
| 479 | 479 | // assignment list is gone with D6 — who teaches is per instance). |
| 480 | 480 | let assigned = async |db: &Database| { |
src/web/payments.rsmodified+6 -6
| @@ -59,7 +59,7 @@ pub fn routes() -> OpenApiRouter<AppState> { | ||
| 59 | 59 | /// schedule, and an installment with no date is not part of one. |
| 60 | 60 | #[derive(Debug, Deserialize, ToSchema)] |
| 61 | 61 | struct InstallmentBody { |
| 62 | - /// What this installment bills, **minor units** (kuruş), positive. Integer | |
| 62 | + /// What this installment bills, **minor units**, positive. Integer | |
| 63 | 63 | /// only: this API never speaks decimals or floats about money. |
| 64 | 64 | #[schema(minimum = 1, maximum = 10000000, example = 150000_i64)] |
| 65 | 65 | amount_minor: i64, |
| @@ -115,7 +115,7 @@ struct UpdateFeePlan { | ||
| 115 | 115 | |
| 116 | 116 | #[derive(Serialize, ToSchema)] |
| 117 | 117 | struct InstallmentResponse { |
| 118 | - /// Minor units (kuruş). | |
| 118 | + /// Minor units. | |
| 119 | 119 | amount_minor: i64, |
| 120 | 120 | due_at: i64, |
| 121 | 121 | } |
| @@ -556,7 +556,7 @@ async fn require_line(id: &str, db: &Database) -> Result<PaymentLedger, AppError | ||
| 556 | 556 | struct RecordPayment { |
| 557 | 557 | /// The charge line this money pays. |
| 558 | 558 | charge_id: String, |
| 559 | - /// How much came in, **minor units** (kuruş), positive. Partial payments | |
| 559 | + /// How much came in, **minor units**, positive. Partial payments | |
| 560 | 560 | /// are the norm; together they may not exceed the charge. |
| 561 | 561 | #[schema(minimum = 1, maximum = 10000000, example = 50000)] |
| 562 | 562 | amount_minor: i64, |
| @@ -579,7 +579,7 @@ struct RecordPayment { | ||
| 579 | 579 | struct RecordRefund { |
| 580 | 580 | /// The payment being handed back. |
| 581 | 581 | credit_id: String, |
| 582 | - /// How much goes back out, **minor units** (kuruş), positive. Partials | |
| 582 | + /// How much goes back out, **minor units**, positive. Partials | |
| 583 | 583 | /// allowed, up to what the credit was worth. |
| 584 | 584 | #[schema(minimum = 1, maximum = 10000000, example = 50000)] |
| 585 | 585 | amount_minor: i64, |
| @@ -809,7 +809,7 @@ struct StatementEntry { | ||
| 809 | 809 | /// The plan it came from, and its name when the plan still exists. |
| 810 | 810 | plan: Option<String>, |
| 811 | 811 | plan_name: Option<String>, |
| 812 | - /// What the installment bills, minor units (kuruş). | |
| 812 | + /// What the installment bills, minor units. | |
| 813 | 813 | #[schema(example = 150000)] |
| 814 | 814 | amount_minor: i64, |
| 815 | 815 | /// When it falls due, unix milliseconds. |
| @@ -1016,7 +1016,7 @@ async fn user_statement( | ||
| 1016 | 1016 | #[derive(Serialize, ToSchema)] |
| 1017 | 1017 | struct PaymentBalanceResponse { |
| 1018 | 1018 | student: PersonRef, |
| 1019 | - /// `credits + reversals - charges - refunds`, in **minor units** (kuruş). | |
| 1019 | + /// `credits + reversals - charges - refunds`, in **minor units**. | |
| 1020 | 1020 | /// Negative means the family owes the school. Derived on every read, never |
| 1021 | 1021 | /// stored. |
| 1022 | 1022 | #[schema(example = -100000)] |
src/web/rag.rsmodified+1 -1
| @@ -6,7 +6,7 @@ | ||
| 6 | 6 | //! thread, the payload format, and the last look at the reply before it is |
| 7 | 7 | //! stored. There are no intent or rule tables, and every thread is private to |
| 8 | 8 | //! its owner. What differs is the **scope**: every question carries the |
| 9 | -//! `(sınıf, ders)` pairs the corpus is routed by, derived server-side from the | |
| 9 | +//! `(class, course)` pairs the corpus is routed by, derived server-side from the | |
| 10 | 10 | //! asker's own memberships ([`crate::service::rag_scope`]) and never from the |
| 11 | 11 | //! request body, and every citation the service returns is resolved here to |
| 12 | 12 | //! the course-note file that owns the cited document — the `doc_id` only the |
src/web/sessions.rsmodified+1 -1
| @@ -116,7 +116,7 @@ fn is_live_session_teacher(session: &CourseSession, user: &User) -> bool { | ||
| 116 | 116 | |
| 117 | 117 | /// Who may take (or amend) a session's roll call: the session's own teacher, |
| 118 | 118 | /// or anyone who manages its instance (manager+, one of its teachers, or its |
| 119 | -/// şube's homeroom teacher) — in both cases only while still `teacher`+. | |
| 119 | +/// section's homeroom teacher) — in both cases only while still `teacher`+. | |
| 120 | 120 | async fn can_roll_call( |
| 121 | 121 | session: &CourseSession, |
| 122 | 122 | instance: &ClassCourse, |
src/web/settings.rsmodified+9 -9
| @@ -107,23 +107,23 @@ struct SettingsResponse { | ||
| 107 | 107 | /// cancelling close. `null` = no cutoff. |
| 108 | 108 | #[schema(example = 120)] |
| 109 | 109 | meal_cancel_cutoff_minutes: Option<i64>, |
| 110 | - /// The branş (teaching subject) vocabulary a profile's `branch` may name. | |
| 110 | + /// The subject-specialisation vocabulary a profile's `branch` may name. | |
| 111 | 111 | /// Empty = the school keeps no list, and no profile may carry one. |
| 112 | 112 | #[schema(max_items = 20, example = json!(["Matematik", "Fizik"]))] |
| 113 | 113 | branches: Vec<String>, |
| 114 | - /// What an absence may be excused as (raporlu/izinli/…). Empty = the | |
| 114 | + /// What an absence may be excused as ("raporlu", "izinli", …). Empty = the | |
| 115 | 115 | /// school names no kinds. |
| 116 | 116 | #[schema(max_items = 20, example = json!(["raporlu", "izinli"]))] |
| 117 | 117 | excuse_kinds: Vec<String>, |
| 118 | - /// Per-dönem excused-absence day limit; `null` = no limit configured. | |
| 118 | + /// Per-term excused-absence day limit; `null` = no limit configured. | |
| 119 | 119 | #[schema(example = 10)] |
| 120 | 120 | max_excused_absent_days: Option<i64>, |
| 121 | - /// Per-dönem unexcused-absence day limit; `null` = no limit configured. | |
| 121 | + /// Per-term unexcused-absence day limit; `null` = no limit configured. | |
| 122 | 122 | #[schema(example = 20)] |
| 123 | 123 | max_unexcused_absent_days: Option<i64>, |
| 124 | 124 | /// The school's IANA timezone; `null` = the deployment default |
| 125 | 125 | /// (`Europe/Istanbul`), which is what an unset setting reads as. It is the |
| 126 | - /// zone the devamsızlık days are bucketed in. | |
| 126 | + /// zone the absence days are bucketed in. | |
| 127 | 127 | #[schema(example = "Europe/Istanbul")] |
| 128 | 128 | timezone: Option<String>, |
| 129 | 129 | } |
| @@ -226,7 +226,7 @@ struct UpdateSettings { | ||
| 226 | 226 | #[serde(default, deserialize_with = "set_or_clear")] |
| 227 | 227 | #[schema(value_type = Option<i64>, example = 120, minimum = 0, maximum = 10_080)] |
| 228 | 228 | meal_cancel_cutoff_minutes: Option<Option<i64>>, |
| 229 | - /// Replaces the whole branş list when present: at most 20 entries, each | |
| 229 | + /// Replaces the whole subject list when present: at most 20 entries, each | |
| 230 | 230 | /// 1–50 characters, unique. `[]` means the school keeps no list — and a |
| 231 | 231 | /// profile's `branch` may then only be cleared, never set. |
| 232 | 232 | #[schema(max_items = 20, example = json!(["Matematik", "Fizik"]))] |
| @@ -235,18 +235,18 @@ struct UpdateSettings { | ||
| 235 | 235 | /// each 1–50 characters, unique. `[]` clears it. |
| 236 | 236 | #[schema(max_items = 20, example = json!(["raporlu", "izinli"]))] |
| 237 | 237 | excuse_kinds: Option<Vec<String>>, |
| 238 | - /// Per-dönem excused-absence day limit, `0`–`365`. Omit to keep the | |
| 238 | + /// Per-term excused-absence day limit, `0`–`365`. Omit to keep the | |
| 239 | 239 | /// current value; send `null` for no limit at all. |
| 240 | 240 | #[serde(default, deserialize_with = "set_or_clear")] |
| 241 | 241 | #[schema(value_type = Option<i64>, example = 10, minimum = 0, maximum = 365)] |
| 242 | 242 | max_excused_absent_days: Option<Option<i64>>, |
| 243 | - /// Per-dönem unexcused-absence day limit, `0`–`365`. Omit to keep the | |
| 243 | + /// Per-term unexcused-absence day limit, `0`–`365`. Omit to keep the | |
| 244 | 244 | /// current value; send `null` for no limit at all. |
| 245 | 245 | #[serde(default, deserialize_with = "set_or_clear")] |
| 246 | 246 | #[schema(value_type = Option<i64>, example = 20, minimum = 0, maximum = 365)] |
| 247 | 247 | max_unexcused_absent_days: Option<Option<i64>>, |
| 248 | 248 | /// The school's IANA timezone — one of the deployment's allow-list |
| 249 | - /// (`Europe/Istanbul`, `UTC`), by name. It is the zone the devamsızlık | |
| 249 | + /// (`Europe/Istanbul`, `UTC`), by name. It is the zone the absence | |
| 250 | 250 | /// days are bucketed in and the one a menu's serving minute is *not* |
| 251 | 251 | /// (that clock is UTC on purpose). Omit to keep the current value; send |
| 252 | 252 | /// `null` to fall back to the deployment default. |
src/web/terms.rsmodified+19 -19
| @@ -27,8 +27,8 @@ pub fn routes() -> OpenApiRouter<AppState> { | ||
| 27 | 27 | struct CreateTerm { |
| 28 | 28 | #[schema(example = "1. Dönem", max_length = 100)] |
| 29 | 29 | name: String, |
| 30 | - /// The academic year this dönem is a slice of (`GET /academic-years`). | |
| 31 | - /// Required — a dönem outside a year has no karne to be counted into. | |
| 30 | + /// The academic year this term is a slice of (`GET /academic-years`). | |
| 31 | + /// Required — a term outside a year has no report card to be counted into. | |
| 32 | 32 | #[schema(example = "019732e3-7b00-7000-8000-00000000dead")] |
| 33 | 33 | year: String, |
| 34 | 34 | /// Term start, UTC unix-milliseconds. May lie in the past — a school |
| @@ -53,7 +53,7 @@ struct TermResponse { | ||
| 53 | 53 | id: String, |
| 54 | 54 | #[schema(example = "1. Dönem")] |
| 55 | 55 | name: String, |
| 56 | - /// The academic year this dönem belongs to (`GET /academic-years/{id}`). | |
| 56 | + /// The academic year this term belongs to (`GET /academic-years/{id}`). | |
| 57 | 57 | year: String, |
| 58 | 58 | /// Term start, UTC unix-milliseconds. |
| 59 | 59 | starts_at: i64, |
| @@ -76,9 +76,9 @@ impl TermResponse { | ||
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | -/// Create a dönem inside an academic year. Requires manager+. Past dates are | |
| 80 | -/// allowed — dönemler are calendar structure, not schedules; an *archived* year | |
| 81 | -/// refuses the new dönem (`409`), because past years take no new structure. | |
| 79 | +/// Create a term inside an academic year. Requires manager+. Past dates are | |
| 80 | +/// allowed — terms are calendar structure, not schedules; an *archived* year | |
| 81 | +/// refuses the new term (`409`), because past years take no new structure. | |
| 82 | 82 | #[utoipa::path( |
| 83 | 83 | post, |
| 84 | 84 | path = "/", |
| @@ -199,8 +199,8 @@ async fn update_term( | ||
| 199 | 199 | .await? |
| 200 | 200 | .ok_or(AppError::NotFound)?; |
| 201 | 201 | service::term::require_writable(&term)?; |
| 202 | - // The year above the dönem is the other half of the read-only rule, and | |
| 203 | - // the half a closed dönem no longer covers: a dönem still open inside an | |
| 202 | + // The year above the term is the other half of the read-only rule, and | |
| 203 | + // the half a closed term no longer covers: a term still open inside an | |
| 204 | 204 | // archived year takes no edit either. |
| 205 | 205 | service::academic_year::require_open(&st.db, term.get_year()).await?; |
| 206 | 206 | // Pre-flight only: the range check is re-made inside the UPDATE's own |
| @@ -215,11 +215,11 @@ async fn update_term( | ||
| 215 | 215 | Ok(Json(TermResponse::new(&updated))) |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | -/// Delete a dönem. Requires manager+. Refused with a 409 while anything still | |
| 219 | -/// hangs off it — an exam filed in it, or a karne frozen for it — so a dönem is | |
| 220 | -/// never dropped out from under marks that name it; move or delete those | |
| 221 | -/// first. The dönem's own academic year is untouched (that is `DELETE | |
| 222 | -/// /academic-years/{id}`, which refuses while a dönem still links it). | |
| 218 | +/// Delete a term. Requires manager+. Refused with a 409 while anything still | |
| 219 | +/// hangs off it — an exam filed in it, or a report card frozen for it — so a | |
| 220 | +/// term is never dropped out from under marks that name it; move or delete | |
| 221 | +/// those first. The term's own academic year is untouched (that is `DELETE | |
| 222 | +/// /academic-years/{id}`, which refuses while a term still links it). | |
| 223 | 223 | #[utoipa::path( |
| 224 | 224 | delete, |
| 225 | 225 | path = "/{id}", |
| @@ -248,13 +248,13 @@ async fn delete_term( | ||
| 248 | 248 | Ok(StatusCode::NO_CONTENT) |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | -/// Archive a dönem. Requires manager+. Archiving **freezes the karnes**: every | |
| 252 | -/// student with a roster row under the dönem's year gets a snapshot of their | |
| 253 | -/// report, and from then on `GET /marks/karne` serves that record instead of | |
| 254 | -/// recomputing — a mark corrected after the fact no longer rewrites what a | |
| 255 | -/// family holds. An archived dönem takes no edits and no delete; exams may | |
| 251 | +/// Archive a term. Requires manager+. Archiving **freezes the report cards**: | |
| 252 | +/// every student with a roster row under the term's year gets a snapshot of | |
| 253 | +/// their report, and from then on `GET /marks/karne` serves that record instead | |
| 254 | +/// of recomputing — a mark corrected after the fact no longer rewrites what a | |
| 255 | +/// family holds. An archived term takes no edits and no delete; exams may | |
| 256 | 256 | /// still be created in it while its *year* is open (the archive is a record, |
| 257 | -/// not a wall). Idempotent — archiving an already-archived dönem answers `200` | |
| 257 | +/// not a wall). Idempotent — archiving an already-archived term answers `200` | |
| 258 | 258 | /// with the stamp it already had and never re-freezes. |
| 259 | 259 | #[utoipa::path( |
| 260 | 260 | post, |
src/web/users.rsmodified+8 -8
| @@ -94,9 +94,9 @@ struct UpdateProfile { | ||
| 94 | 94 | /// Free text under the profile's name. |
| 95 | 95 | #[schema(example = "Sınıfın en hızlı pomodorocusu.", max_length = 500)] |
| 96 | 96 | bio: Option<String>, |
| 97 | - /// The teacher's branş (subject): one of the school's `branches` from | |
| 97 | + /// The teacher's subject specialisation: one of the school's `branches` from | |
| 98 | 98 | /// `GET /settings`, by name. Omit to keep the current value; send `""` to |
| 99 | - /// clear it (a school that lists no branş stores none). | |
| 99 | + /// clear it (a school that lists no subjects stores none). | |
| 100 | 100 | #[schema(example = "Matematik", max_length = 50)] |
| 101 | 101 | branch: Option<String>, |
| 102 | 102 | } |
| @@ -134,11 +134,11 @@ fn merge_field<T>( | ||
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | -/// Resolve the branş a request names. Same shape as [`merge_field`] — absent | |
| 137 | +/// Resolve the `branch` a request names. Same shape as [`merge_field`] — absent | |
| 138 | 138 | /// is "keep", `""` is an explicit clear — with the one check a free string |
| 139 | 139 | /// cannot make: the value must be one the *school* lists (`GET /settings`). |
| 140 | 140 | /// The vocabulary is the school's, so nothing else can decide it, and a school |
| 141 | -/// with no list can only ever have branşes cleared. | |
| 141 | +/// with no list can only ever have its `branch` cleared. | |
| 142 | 142 | fn merge_branch( |
| 143 | 143 | patch: Option<&str>, |
| 144 | 144 | allowed: &[String], |
| @@ -176,7 +176,7 @@ async fn apply_profile( | ||
| 176 | 176 | let birth_date = merge_field(req.birth_date.as_deref(), BirthDate::try_new)?; |
| 177 | 177 | let display_name = merge_field(req.display_name.as_deref(), DisplayName::try_new)?; |
| 178 | 178 | let bio = merge_field(req.bio.as_deref(), Bio::try_new)?; |
| 179 | - // Only a request that actually names a branş pays the settings read. | |
| 179 | + // Only a request that actually names a branch pays the settings read. | |
| 180 | 180 | let branch = match req.branch { |
| 181 | 181 | Some(_) => { |
| 182 | 182 | let school = crate::service::settings::load(db).await?; |
| @@ -842,8 +842,8 @@ struct ProfileResponse { | ||
| 842 | 842 | role: RoleSchema, |
| 843 | 843 | #[schema(example = "Sınıfın en hızlı pomodorocusu.")] |
| 844 | 844 | bio: Option<String>, |
| 845 | - /// The teacher's branş, one of the school's `branches` (`GET /settings`); | |
| 846 | - /// `null` when none is set — or when the school lists none. | |
| 845 | + /// The teacher's subject specialisation, one of the school's `branches` | |
| 846 | + /// (`GET /settings`); `null` when none is set — or when the school lists none. | |
| 847 | 847 | #[schema(example = "Matematik")] |
| 848 | 848 | branch: Option<String>, |
| 849 | 849 | /// Present only once a picture is uploaded; the bytes are at |
| @@ -907,7 +907,7 @@ struct ProfileCourseRef { | ||
| 907 | 907 | id: String, |
| 908 | 908 | #[schema(example = "Matematik")] |
| 909 | 909 | title: String, |
| 910 | - /// `course`, `study` (etüt), or `club` (kulüp). | |
| 910 | + /// `course`, `study` (supervised study), or `club`. | |
| 911 | 911 | #[schema(example = "course")] |
| 912 | 912 | kind: String, |
| 913 | 913 | } |