Update Learner Profile › Edit Learner Profile
🎬 Simulate: Recoverable · AF-1A.4A Reset

Edit Learner Profile

Personal Information
S
Current photo
Accepted file formats and maximum file size are set by platform configuration.
Contact
Changing your email requires a verification code sent to the new address before the change is saved.
+856
Changing your mobile number requires a verification code sent to the new number before the change is saved.
Institution Affiliations
Institution Faculty Major Student ID Status
Vientiane Technical College (VTT) Faculty of Information Technology Information Technology VTT-2024-0042 Active Edit
Champasak Technical-Vocational College Faculty of Engineering Electronics CPK-2023-0118 Pending
Luang Prabang Technical College Faculty of Engineering Civil Engineering LP-2025-0007 Pending
Affiliation request submitted — pending administrator approval
📝 Spec notes — UC-IDP.09 / SCR-IDP.25 (fields, actions, requirements)
Identity
  • Screen: SCR-IDP.25 — Edit Learner Profile
  • Use case: UC-IDP.09 — Update Learner Profile
Brief description

Displays and allows editing of a learner's profile — pre-filled with current values across three content sections. Personal Information: first name, last name, date of birth, gender, profile photo — saved by the Save button. Contact: email and mobile number — changing either requires a verification code sent to the new contact before the change is applied (SS-IDP.15); verification is handled by SUC-IDP-01 (email) or SUC-IDP-02 (mobile). Institution Affiliations: shows all affiliations as a table (Institution | Faculty | Major | Student ID | Status). Each Active row has an "Edit" button to change faculty, major, or student ID inline (AF 1B) — the Faculty dropdown, Major dropdown, and Student ID become editable with Save/Cancel; if the updated details do not match the roster, the row shows "Pending Affiliation Update" until the Program Administrator acts. An "Add Institution" button below the table opens an inline form; submitting triggers roster validation (SS-IDP.04). Institution actions are processed immediately and are not part of the Save button flow.

Fields
  • firstname "First name" — text · lookup · always · required · max_length: 100 · Personal Information
  • lastname "Last name" — text · lookup · always · required · max_length: 100 · Personal Information
  • date_of_birth "Date of birth" — date · lookup · always · optional · max: today · Personal Information
  • gender "Gender" — enum [M, F, O] · lookup · always · optional · Personal Information
  • profile_photo "Profile photo" — file · lookup · always · optional · format/size limits are admin-configurable (see additional req. 6) · Personal Information
  • email "Email" — text · lookup · always · required · format: email, max_length: 255 · changing triggers uniqueness check + SUC-IDP-01 (AF-2A) · Contact
  • country_code "Country code" — text · literal "+856" · always · read-only prefix before mobile input · Contact
  • mobile "Mobile number" — phone · lookup · always · optional · format: phone · changing triggers uniqueness check + SUC-IDP-02 (AF-2B) · Contact
  • affiliation_institution_name "Institution" — text · lookup (institution name resolved via institution_id → Institute.name) · always · read-only · table display column · Institution Affiliations
  • affiliation_faculty "Faculty" — text · lookup (faculty name resolved via faculty_id → Faculty.name) · always · read-only · table display column; field edit_faculty_id rendered in place when edit_mode · Institution Affiliations
  • affiliation_major "Major" — text · lookup (major name resolved via major_id → Major.name) · always · read-only · table display column; field edit_major_id rendered in place when edit_mode · Institution Affiliations
  • affiliation_student_id "Student ID" — text · lookup · always · read-only · becomes editable via edit_affiliation (AF 1B); field edit_student_id rendered in place when edit_mode · Institution Affiliations
  • affiliation_status "Status" — enum [Active, Pending, "Pending Affiliation Update"] · lookup · always · read-only · Institution Affiliations
  • new_institution_id "Institution" — enum · options: Active institutions (Institute) · visible when add_mode == true · required in add mode · sorted A–Z; excludes institutions where learner already has an Active or Pending affiliation · Institution Affiliations (add form)
  • new_faculty_id "Faculty" — enum · options: all active Faculties · visible when add_mode == true · required in add mode · sorted A–Z; not filtered by institution; resets when the institution selection changes · Institution Affiliations (add form)
  • new_major_id "Major" — enum · options: active Majors under new_faculty_id · visible when add_mode == true · required in add mode · sorted A–Z; reloaded and cleared when faculty changes · Institution Affiliations (add form)
  • new_student_id "Student ID" — text · literal · visible when add_mode == true · required in add mode · max_length: 50 · Institution Affiliations (add form)
  • edit_faculty_id "Faculty" — enum · options: all Faculties, pre-filled with current faculty · visible when edit_mode == true · required in edit mode · sorted A–Z; changing clears edit_major_id · Institution Affiliations (row edit)
  • edit_major_id "Major" — enum · options: Active Majors under edit_faculty_id (SS-IDP.33) · visible when edit_mode == true · required in edit mode · sorted A–Z; refreshed and cleared when edit_faculty_id changes · Institution Affiliations (row edit)
  • edit_student_id "Student ID" — text · lookup, pre-filled with current student ID · visible when edit_mode == true · required in edit mode · max_length: 50 · replaces affiliation_student_id cell in the edit row · Institution Affiliations (row edit)
Actions
  • save "Save" — enabled when required_fields_valid · triggers UC-IDP.09-M-2 (personal info + contact only; institution actions are separate)
  • cancel "Cancel" — always enabled · navigates away without saving
  • add_institution "Add Institution" — enabled when add_mode == false · triggers UC-IDP.09-A-1A-1 (opens inline add form)
  • submit_add_institution "Add" — enabled when new_institution_id != null && new_faculty_id != null && new_major_id != null && new_student_id != "" · triggers UC-IDP.09-A-1A-3 (roster validation)
  • cancel_add_institution "Cancel" (add form) — always enabled · closes inline add form; no data saved
  • edit_affiliation "Edit" — per-row; enabled when affiliation_status == Active && edit_mode == false · triggers UC-IDP.09-A-1B-1
  • save_affiliation "Save" (row edit) — per-row; enabled when edit_faculty_id != null && edit_major_id != null && edit_student_id != "" · triggers UC-IDP.09-A-1B-3 (roster re-validation)
  • cancel_edit_affiliation "Cancel" (row edit) — per-row; always enabled · exits edit_mode; restores original faculty, major, and student ID display
Additional requirements
  1. If email or mobile is changed from its current value, show an inline warning below the field immediately on blur: "This change requires verification — a code will be sent to the new contact before it is saved." [refs: —]
  2. Validation errors must appear inline below the failing field — not as a popup or toast aggregating all errors. [refs: NFR-04]
  3. Country code (+856) and Mobile number must display as a unit in the Contact region — country_code is a read-only prefix before the mobile input at all times; mobile must pass format: phone consistent with SCR-IDP.01. [refs: —]
  4. Institution dropdown (new_institution_id) in the Add Institution form loads only Active institutions from the Institute master, sorted A–Z; institutions where the learner already has an Active or Pending affiliation must be excluded from the list. [refs: —]
  5. When a new affiliation does not match the roster (AF 1A.4A), the Pending row must show "Affiliation request submitted — pending administrator approval" in the Status cell. When an Edit affiliation does not match (AF 1B.4A), the affected row must show "Affiliation update submitted — pending administrator approval". Both appear as inline status text — not popups or toasts. [refs: SS-IDP.04]
  6. Profile photo upload is subject to configurable limits set by the Super Administrator via system configuration (IDP module): accepted file formats (e.g. JPG, PNG, WEBP) and maximum file size. Files that exceed the configured limit or are in a disallowed format must be rejected with an inline error. Image compression is handled automatically by the system and is not user-configurable. [refs: —]
  7. If the learner selects an institution that already has an Active or Pending affiliation, show an inline error below the institution dropdown: "You already have an affiliation or a pending request for this institution." The Add button must be disabled until a valid (non-duplicate) institution is selected. [refs: —]
  8. The Faculty dropdown (new_faculty_id) shows all active Faculties sorted A–Z — it is not filtered by the selected institution; it resets when the institution selection changes. The Major dropdown (new_major_id) shows only active Majors under the selected Faculty, sorted A–Z; it resets when the Faculty selection changes. The Add button must remain disabled until Institution, Faculty, Major, and Student ID are all provided. [refs: —]
  9. The Faculty dropdown (edit_faculty_id) in the edit-mode row loads all faculties sorted A–Z, pre-filled with the current faculty. The Major dropdown (edit_major_id) loads only Active Majors under the selected edit_faculty_id, sorted A–Z; refreshed and cleared whenever edit_faculty_id changes (SS-IDP.33). The Save button (save_affiliation) must remain disabled until edit_faculty_id, edit_major_id, and edit_student_id are all provided. [refs: SS-IDP.33]