Technical HAR Analysis: `gtifem.ru` + `xfem.ru`

Date: 2026-04-26

1. Scope

This note fixes the technical `As-Is` picture from the provided HAR files and turns it into a `To-Be` MVP bridge design between two existing systems:

The goal of this analysis is not to restate the HAR files, but to identify:

2. Input Materials

Analyzed HAR files:

Important note:

These two files should be treated as weak evidence and not as the basis for integration design.

3. Executive Conclusion

The current process is a two-system workflow with a manual human bridge in the middle.

The teacher today performs four different translations by hand:

  1. reads the student work outside both systems;
  2. converts academic judgement into a level on `gtifem.ru`;
  3. converts that level into a numeric score for `xfem.ru`;
  4. identifies the right BRS column and the right student row manually before signing the statement.

The MVP bridge must therefore appear **after the faculty-side academic decision is approved** and **before the BRS-side statement is locked**.

In strict terms, the MVP should automate:

The MVP should **not** auto-sign a BRS statement in the first safe implementation.

4. Confirmed Endpoint Map

4.1 `gtifem.ru`

Business actionMethod + endpointInteraction typeWhat is confirmed
Open teacher portfolio table`GET https://gtifem.ru/portfolio/`Server-rendered HTML pageThe portfolio page arrives as full HTML with rows, action links, hidden moderation form, work ids, and row data.
Open review modalNo separate requestPure UI action in browserThe moderation form is already embedded in the portfolio HTML as hidden block `id='moderate'`.
Preview work report before final approval`POST https://gtifem.ru/portfolio/` with `id=<work_id>&action=print`AJAX request returning HTMLThe server returns printable HTML report.
Save teacher decision`POST https://gtifem.ru/portfolio/` with multipart form data including `mod`, `RATING`, `THEME`, `COMMENTS`, `ACTION=edit`, `id`, `MOD_ID`, `moderate`AJAX form submitThis is the real persistence call for the faculty-side decision.
Change competencies`POST https://gtifem.ru/portfolio/` via `upd_competence(this)`AJAX form submitCompetency editing is inline and asynchronous.
Delete work row`POST https://gtifem.ru/portfolio/` with `ACTION=delete`AJAX callDeletion is row-level AJAX action.

Key faculty-side evidence

From the portfolio HTML and inline JS:

The preview window script does only this:

That means the real server-side approval is still the later `ACTION=edit` AJAX submission.

Strict conclusion on faculty-side approval

Faculty-side approval is a **two-step UI flow but a one-step persistence flow**:

  1. `action=print` = preview only, no durable save;
  2. `ACTION=edit` = durable teacher decision save.

For `mod=Y` / `Принято`, the preview window is part of the acceptance ritual.

For `mod=R` / `На доработку`, the JS hides preview and reveals direct submit instead, so the rejection/rework path is shorter.

This difference matters for MVP event detection.

4.2 `xfem.ru`

Business actionMethod + endpointInteraction typeWhat is confirmed
Open new statement category screen`GET https://xfem.ru/grade/report/custom/custom.php?courseid=12636`Server-rendered HTML pageFirst page before choosing category.
Open statement creation form for concrete category`GET https://xfem.ru/grade/report/custom/custom.php?categid=2&courseid=12636`Server-rendered HTML pageReal HTML form with statement fields.
Save new statement`POST https://xfem.ru/grade/report/custom/custom.php`HTML form submit + redirectReturns `303 See Other`, then redirects to score table page.
Open score table edit mode`GET https://xfem.ru/grade/report/custom/index.php?plugin=custom&id=12636&sesskey=...&edit=1`Server-rendered HTML pageMain edit form with hundreds of grade inputs.
Save score values`POST https://xfem.ru/grade/report/custom/index.php`Batch HTML form submitSaves many grade fields at once and returns full HTML page.
Persist UI scroll preference`POST https://xfem.ru/grade/report/custom/ajax_lock_preference.php`AJAX callService call, not grade business logic.
Open non-edit table mode`GET https://xfem.ru/grade/report/custom/index.php?plugin=custom&id=12636&sesskey=...&edit=0`Server-rendered HTML pageNon-edit table view before signing flow.
Sign / lock filled statement column`POST https://xfem.ru/grade/report/custom/ajax/lock.php` with `courseid`, `eid`, `action=locksaved`AJAX JSON callReal lock endpoint for official signature / blocking.

5. Interaction Type Classification

5.1 Pure UI actions without server request

5.2 Server-rendered HTML pages

These are not clean JSON APIs. They are full HTML pages and must be treated as unstable UI contracts.

5.3 Regular HTML form submissions

These are classical PHP form posts, not resource-oriented REST APIs.

5.4 AJAX submissions

6. Confirmed Faculty-Side Technical Model

The teacher portfolio page already contains enough local state to support the moderation workflow:

Example row evidence also shows:

This is important because `gtifem.ru` does expose a faculty-side student identity handle, but it is a **different namespace** from BRS-side student ids.

7. Confirmed BRS-Side Technical Model

7.1 Statement creation form

The concrete statement form on `xfem.ru` contains:

Observed save payload:

`id=0` means create, not update.

The server does **not** return a clean machine-readable created statement object. It redirects back to the table.

7.2 Score table edit mode

The edit page contains multiple forms, but the main one is:

with hidden fields:

and many cell fields of the form:

Observed counts in the captured save sample:

This confirms that saving one or a few values is still handled as a **batch form post**, not as a per-cell endpoint.

7.3 Internal id model on BRS-side

The same statement column is represented in several linked ways:

Strict conclusion:

This relation is critical for the MVP writer.

7.4 Lock/sign model

The visible UI link on the page may point to `saved_lock.php?id=...&eid=i493222`, but the actual lock operation in browser execution is an AJAX call:

with:

Observed JSON response keys:

Observed lock result:

Strict conclusion:

8. What the Weak HAR Files Do Not Prove

8.1 `3_xfem_login.har`

This file does **not** capture the actual `xfem.ru` login flow.

It contains:

Therefore it does not prove:

Any documentation that would claim these points from the provided file would be overstated.

8.2 `4_xfem_open_scores_table.har`

This file is not useful for table-load mechanics.

It contains only websocket noise and does not capture the intended table-opening requests.

9. The Real Technical Gap

The bridge problem is not only “send score from A to B”.

There are at least seven different gaps.

Gap 1. Semantic model mismatch

`gtifem.ru` stores:

`xfem.ru` stores:

The systems do not share a native “same assessment object”.

Gap 2. Student identity mismatch

Faculty-side uses one student identity namespace, for example:

BRS-side uses another namespace, for example:

These ids are not shown to be the same.

This means the MVP cannot safely rely on:

It needs a crosswalk.

Gap 3. Scale conversion gap

`gtifem.ru` level values:

`xfem.ru` expects numeric values.

There is no evidence that a universal fixed mapping should be hardcoded for all work types, all disciplines, and all statement categories.

Therefore the MVP needs a configurable conversion layer, not a magic formula.

Gap 4. Statement resolution gap

To write into BRS, the system must know:

The create-statement POST does not return a compact created object with `column_id`.

So after statement creation, the adapter must re-open or parse the returned table HTML and resolve the newly created column by stable attributes.

Gap 5. Transport mismatch

Faculty-side save is AJAX to a page endpoint returning non-structured content (`Array1` in captured sample).

BRS-side grade save is a large batch HTML form post.

This means the MVP bridge cannot be a thin “call two JSON APIs” service.

It must be a browser-aware or HTML-aware adapter.

Gap 6. Timing / officiality mismatch

Faculty-side officiality happens at `ACTION=edit` after teacher approval flow.

BRS-side officiality happens at `action=locksaved`.

The safe transfer window lies strictly between them:

Gap 7. Audit and idempotency gap

Neither flow, in the captured form, provides a shared transfer id.

Without a dedicated bridge record, the system cannot safely answer:

The MVP therefore needs its own audit ledger.

10. Draft `To-Be` MVP Bridge

10.1 Recommended architecture

The first technically realistic bridge should contain these modules:

  1. `Faculty Decision Collector`
  2. `Approval Normalizer`
  3. `Student Identity Crosswalk`
  4. `Rule Pack / Level-to-Score Mapper`
  5. `BRS Statement Resolver / Creator`
  6. `BRS Form Writer`
  7. `Lock Guard`
  8. `Audit Ledger`

10.2 Recommended boundary

The bridge should start from the first durable faculty-side approval event:

but should not immediately write to BRS in the safest first version.

The safest first boundary is:

10.3 Proposed `approved_transfer_record`

Minimum bridge object:

transfer_id
source_system = gtifem
source_work_id
faculty_student_id
faculty_teacher_id
student_fio
group_code
module_name
work_type_name
competencies[]
faculty_status_code
faculty_status_text
faculty_level_code
faculty_level_text
review_text
faculty_saved_at
rule_pack_id
rule_pack_version
target_system = xfem
xfem_courseid
xfem_student_id
xfem_categid
xfem_typeid
xfem_statement_description
xfem_statement_date
xfem_column_id
desired_numeric_score
existing_numeric_score
transfer_mode
transfer_status
lock_state_before_write
write_attempted_at
write_result
lock_state_after_write

This record should live outside both legacy systems.

10.4 Recommended end-to-end MVP sequence

Teacher checks work
-> faculty-side approval saved on gtifem.ru
-> bridge captures/reads approved decision
-> bridge normalizes decision and resolves student identity
-> bridge converts level to numeric score by rule pack
-> bridge resolves target BRS statement/column
-> bridge loads current BRS edit form
-> bridge verifies column is not locked
-> bridge compares current and desired value
-> bridge writes score through batch form post
-> bridge records audit trail
-> teacher reviews BRS result
-> teacher signs BRS statement manually

11. Where Teacher Approval Must Remain

In the safest MVP, teacher approval should remain at two layers:

  1. **Academic approval** on `gtifem.ru`
  2. - teacher decides status, level, review text; - this remains the authoritative academic judgement.

  1. **Official BRS signature** on `xfem.ru`
  2. - teacher still signs the statement/column after reviewing the transferred scores.

This keeps the AI/adapter out of the final official locking action in early rollout.

12. Level-to-Score Conversion Strategy

Do **not** hardcode one global conversion for all work types.

Instead use a versioned rule pack, for example:

rule_pack_id = vit_2025_2026_portfolio_practice_v1

if module = "Введение в информационные технологии"
and faculty_work_type in {portfolio work types mapped to practical/lab evaluation}
and faculty_level = "Продвинутый"
then numeric_score = ...

The exact numeric mapping must be approved by academic owners.

From an engineering perspective, the correct design is:

13. How the MVP Should Find the Right BRS Column

The adapter should not rely on free-text title only.

It should resolve target statement using a deterministic tuple:

Then it should re-open the BRS table and resolve:

This should be treated as the canonical resolved column identity.

14. How the MVP Should Write Scores Safely

Recommended write algorithm:

  1. Open BRS edit mode with current authenticated session.
  2. Parse the current HTML form.
  3. Resolve the exact `student_id` and `column_id`.
  4. Read current `oldgrade_*` / `grade_*`.
  5. Check lock indicators for the target column.
  6. If locked, abort and log.
  7. If target value already equals desired value, mark idempotent success and do not rewrite.
  8. If different, mutate only the intended `grade_<student_id>_<column_id>` values inside the current form snapshot.
  9. Submit the batch form back to `POST /grade/report/custom/index.php`.
  10. Re-read returned HTML and verify the value now matches.
  11. Log result.

This is safer than synthesizing a “small custom POST” from scratch.

15. Idempotency Rules for the Bridge

The MVP must be idempotent.

Suggested rules:

16. Technical Limitations and Guardrails

These constraints should be explicitly stated in any technical design.

Session / security

HTML dependency

Official locking

Write semantics

Auditability

17. Recommended MVP Modes

Mode A. Safe draft-only mode

What it does:

Best for:

Mode B. Assisted transfer mode

What it does:

Best for:

Mode C. Automatic fill into unlocked statement

What it does:

Best for:

Hard prohibition

The MVP should not:

18. What Additional HAR Captures Are Still Needed

Mandatory re-capture:

  1. `xfem` login flow
  2. - current `3_xfem_login.har` does not contain the intended evidence. - reshoot from clean Network: - open login page; - submit credentials; - capture redirects; - open first authenticated page.

Optional but useful re-capture:

  1. Clean `xfem` open score table flow outside edit mode
  2. - current `4_xfem_open_scores_table.har` is not useful. - not critical for MVP because edit mode and save flow are already captured, but still useful for full documentation.

Optional only if deeper faculty-side automation is planned:

  1. Clean faculty-side acceptance chain from:
  2. - opening modal; - previewing report; - clicking preview `Подписать`; - final `ACTION=edit` submission.

This is not strictly required anymore for endpoint mapping, because the current captures and inline JS are already enough to identify the real persistence boundary.

19. Final Technical Position

The MVP bridge should be placed here:

gtifem faculty approval saved
-> approved transfer record created
-> level-to-score conversion by rule pack
-> student crosswalk resolution
-> BRS statement resolution / creation
-> unlocked BRS batch form write
-> teacher reviews and signs in BRS

This is the first implementation point that is both:

The most important non-obvious conclusion from the HAR analysis is this:

**the bridge is not “AI checks work and writes grade”.**

The real bridge is:

**approved academic decision -> normalized transfer record -> rule-based numeric fixation in an unlocked BRS statement -> human official signature.**

That is the correct MVP boundary.