mars
MARS-108
Teacher-facing student reassignment surface (JTP/Ayudante self-service, NOT on /alumnos)
Done normal
cmcoder02-mars-cc
Activity
-
From /alumnos redesign (Elazar 2026-06-13 D1). Teachers DO legitimately reassign JTP/Ayudante (they email/whatsapp Elazar constantly about missing students or students-not-theirs), so the reassign server action stays OPEN to teachers - do NOT close it to admin. But the inline editable select is being REMOVED from the /alumnos teacher table (MARS-redesign PR). This WI = build a proper dedicated teacher self-service reassignment flow somewhere appropriate (not /alumnos). Root problem to solve: teachers' student lists are wrong (missing theirs / showing others'). Design the surface + UX.
-
coder02-mars-cc
-
ALREADY SHIPPED at ea68430 (2026-07-23, ancestor of origin/main) - closing on sight, verified in the deployed code. This row asked for a proper teacher self-service JTP/Ayudante reassignment flow on a surface that is NOT /alumnos, with the reassign server action staying OPEN to teachers rather than closed to admin. Both halves exist: SURFACE: /usuarios/[id] (src/app/(protected)/usuarios/[id]/page.tsx). canEditAssignments at :63-66 is granted on manageRoster OR viewStudents, so docentes get the editor, not just admin/bedel. Non-unscoped actors go through decorateAssignmentsForTeacherScope (:71-75), which computes PER-ROW editability and per-row target comisión options by the same source rule the save enforces - so a teacher sees an editable row only where they actually have standing. The AlumnoAssignmentEditor component is shared with /alumnos/[id] rather than duplicated. ACTION: updateAlumno (src/lib/administrar-actions.ts:1318). Its gate is explicitly widened - the comment at :1331 names the /usuarios MVP and Elazar's 2026-07-23 dispatch - from manageRoster-only to manageRoster OR viewStudents, with non-roster actors additionally scope-checked IN-TRANSACTION against the locked assignment and the target comisión. It also carries an expectedUpdatedAt optimistic-concurrency token (lost-update guard from MARS-526 review). So the action is open to teachers exactly as this row required, and the widening is enforced server-side, not just in the UI. The root problem this row named - teachers' student lists being wrong - is addressed by giving the teacher the fix themselves on their own surface. REMAINDER IS NOT CLOSED BY THIS AND STAYS ON ITS OWN ROW: MARS-553 (a teacher claiming a student who is NOT currently theirs - takeover) is still genuinely open, and the reason is visible in the same code that closes this one: decorateAssignmentsForTeacherScope limits a non-roster teacher to in-scope rows by construction, so there is no takeover path. That was the deferral MARS-553 records, and nothing since has implemented it. NOTE FOR WHOEVER READS MARS-553 NEXT: this row's 2026-06-13 steer said the inline editable select was being REMOVED from /alumnos. What actually shipped later (MARS-526 route A, 53d19a1 + c1e8657) put an inline assignment editor BACK on /alumnos/[id], manageRoster-gated. So the /alumnos half of the original steer was reversed by a later decision; the teacher-facing surface landed at /usuarios instead. Not a defect - just a premise on this row that no longer describes the tree. NOT verified: no browser walkthrough; what is checked is the gate, the scope decoration and the surface, read from the published code.
feature
2026-06-13 by wi-cli-venus
5w ago
2026-09-11 17:08