# Business rules — ieb-inde-3

Evidence date: 2026-10-13. Inspected revision: `main` at `ce71caf`.

Provenance: **Documented** only where the readme or config states the rule. Everything else below is **Implemented** or, where marked, **Inferred**.

Website root: `INDE-3/Evolution Software Unified Framework/Evolution Software Unified Framework/core_custom/INDE-3/`.

## Identity

BR-001. The readme does not define a business name for code INDE-3. It defines Exams as INDE-1. **Documented.**

BR-002. Mail subjects built by `examHandler` start with `IEB:`. The app setting `website` is `IEB:: Website`. **Implemented** for the mail prefix. **Documented** for the setting.

BR-003. The active connection catalog is `Framework_INDE-3_Demo`. A commented setting names `Framework_INDE-3`. Which catalog is production is **Unknown / Requires Confirmation**.

## Subject record

BR-004. Subject code is not editable on the form. **Implemented.**

BR-005. After the subject exists, year, level, paper, type, and subject name are not editable. **Implemented.**

BR-006. If the document password is empty at populate, the system fills it and the field is read-only. The value is four random characters, a number from 0 through 1000, and four random characters. **Implemented.** This is not described as a cryptographic secret. **Inferred.**

BR-007. A user whose framework type is below SuperUser cannot change the five resource roles and cannot use the main save buttons on an existing subject. **Implemented.**

BR-008. The status picklist is editable only by the user whose `recId` is stored as the reviewer. **Implemented.**

BR-009. **Inferred conflict.** BR-007 hides save for everyone below SuperUser. BR-008 enables status for the reviewer regardless of framework type. A reviewer who is WebsiteUser or PowerUser can change the status control and cannot click save. Whether reviewers are SuperUser or above is **Unknown / Requires Confirmation**.

BR-010. Resource role is the first match in this order: examiner, reviewer, internal moderator, external moderator, assessment specialist. **Implemented.**

BR-011. Only examiner and reviewer see the control that adds a document pack (child surface `3037`). **Implemented.**

## Subject list

BR-012. A user below SuperUser sees a subject only when `user.userDisplay` equals the examiner, reviewer, internal moderator, external moderator, or assessment specialist column. **Implemented.** Dated 2018-02-08.

BR-013. The subject form stores those roles as `recId` strings. The grid compares `userDisplay`. If the column holds the id, the filter does not select the rows the form writes. **Inferred** conflict. **Unknown / Requires Confirmation** which value the published grid column contains.

## Document pack number

BR-014. Pack number and revision are not editable. **Implemented.**

BR-015. When the revision box is `0`, revision is one plus the count of active `publ_ExaminationDocumentPack` rows for the parent subject. **Implemented.**

BR-016. An empty pack number is `{year}-{type}-{level}-{paper}-{subject code}-Rev{revision}`. **Implemented.**

| Lookup display | Token |
|---|---|
| `year-end` | `Y` |
| any other type display | `S` |
| `grade 12` through `grade 8` | `G12` through `G8` |
| any other level display | `G0` |
| `paper 1` through `paper 6` | `P1` through `P6` |
| any other paper display | `P0` |

Comparisons are lower-case. A missing lookup therefore becomes `S`, `G0`, or `P0`. **Implemented.**

BR-017. Populating a new pack (`recId == 0`) saves it immediately. **Implemented.**

## Document upload

BR-018. The upload-complete control and the new examination-document button (child surface `3038`) are visible only to the parent subject's examiner or reviewer. **Implemented.**

BR-019. Examiner upload sets status `1083` (examiner uploaded, review ready) and logs "Examination documents uploaded". **Implemented.**

BR-020. Reviewer upload sets status `1084` (reviewer uploaded, IM release ready) and logs "Revised examination documents uploaded". **Implemented.**

BR-021. Both uploads stamp the status-change time, save the subject, call status mail, and write an internal collaboration note (`fieldName` 93) against the parent subject id. **Implemented.**

BR-022. Status `1084` has no recipients in `EmailExamStatus`. The reviewer upload still calls that method. **Implemented.** No mail is sent for that status. **Inferred** from the empty case, not from a comment that says mail is intentionally skipped.

## Status change by the reviewer

BR-023. A status change is logged and mailed only when all of these are true: the posted status differs, the current user is the reviewer, the subject already exists, and at least one active document pack exists. **Implemented.**

BR-024. The pack used in the log is the active pack with the highest revision. **Implemented.**

BR-025. These new statuses are written as an external log (`fieldName` 94, title "External Moderation Log"): `1107`, `1108`, `1088`, `1106`. Every other status in that switch, including print ready and the internal statuses, is an internal log (`fieldName` 93). **Implemented.**

BR-026. The generated save copies the selected status onto the object even when BR-023 does not run. A status can therefore be stored without a collaboration note and without status mail. **Implemented.**

BR-027. When BR-023 runs, the note is saved first. Status, status-change time, and status mail run only if `SaveCollaborationLog` returns true. **Implemented.**

## Status mail

BR-028. Status mail uses template name `Examination Moderation Status` and template type OutboundResponse. If that template row is missing, the body stays empty and mail can still be sent when a recipient was chosen. **Implemented.**

BR-029. Recipients:

| Status id | Who is addressed |
|---|---|
| 1093, 1084, 1109, 1110 | Nobody |
| 1083 | Reviewer |
| 2160 | Examiner |
| 1085 | Internal moderator |
| 1088 | External moderator |
| 1086, 1087, 1106, 1107, 1108 | Reviewer and examiner, one message, addresses joined with a semicolon |

**Implemented.**

BR-030. The message subject is `IEB: {subject name} ({status display})`. The from address is the setup communication email. BCC is app setting `bcc`. The sender label passed to `communication.SendAnEmail` is `System Notice :: IEB Exams`. **Implemented.**

BR-031. The body table lists subject, status, newest active pack and revision, the user who saved, and the status-change time. **Implemented.**

BR-032. Collaboration-log mail uses template `Examination Moderation Log` and is addressed to the reviewer, including when the log was written by the examiner. Subject `IEB: {subject name} - Log Update by System Post`. **Implemented.** The resource-type argument at the call from `SaveCollaborationLog` is the literal `System Post`.

## Moderation editing

BR-033. On the external form, criterion feedback buttons, progress-save buttons, save-moderation, and `saveGroup` are visible only for the external moderator. **Implemented.**

BR-034. On the internal form, the same class of controls is visible only for the internal moderator. **Implemented.**

BR-035. Both moderation forms hide the main save button and the save dropdown after applying BR-033 or BR-034. **Implemented.** Progress-save is a different button.

BR-036. Criterion compliance ids: `1125` no compliance, `1126` limited compliance, `1127` compliance in most respects, `1128` compliance in all respects. A value of `0` or below is shown as blank, not as a status name. **Implemented.**

BR-037. Display colour: 1125 and 1126 are `compliance-red`, 1127 is `compliance-orange`, 1128 is `compliance-green`. **Implemented.**

BR-038. Overall result ids: `1132` not approved, must be submitted for another moderation (red); `1131` conditionally approved, to be submitted for a second moderation (red); `1130` conditionally approved, not to be submitted for a second moderation (orange); `1129` approved (green). **Implemented.**

BR-039. The compliance summary is omitted unless the overall summary field (`EM12` or `IM12`) is greater than zero. **Implemented.**

BR-040. External feedback tables for criteria 6–11 use child surface ids `3094`–`3099`. Internal feedback tables use `3062`, `3063`, then `3065`–`3073` (`3064` is not in that list). **Implemented** in `ReturnComplianceSummary`. The button ids in `SetState` are a wider set (`3088`–`3100` external, `3062`–`3074` internal) and include evidence-table buttons. **Implemented.**

BR-041. Feedback rows come from `sp_INDE_GetCriterionFeedbackData` with the surface id, the parent pack item id, and the current user id. The procedure is not in this repository. **Implemented** call. **Unknown** what the procedure returns beyond the columns the HTML reader expects: a column ending `_Number`, one ending `_ReasonforNoncompliance`, and one ending `_RecommendationforImprovement` or `_RecommendationforEMprovement`.

BR-042. If those three columns are not all found, the feedback table header is written and no data rows are added. If the procedure returns no rows, the text is `No feedback`. **Implemented.**

## Permissions and access

BR-043. Framework user types are WebsiteUser 1, PowerUser 2, SuperUser 3, AdminUser 4, CustomUser 5. **Implemented** in `pNums.cs`.

BR-044. The examination grid rule uses `userType < SuperUser`. It does not apply the `mimicUserType` / CustomUser pattern used elsewhere in the generated framework. **Implemented** in the custom region. **Inferred** that a CustomUser (type 5) is not filtered by BR-012, because 5 is not below SuperUser.

BR-045. Session timeout for this website is 20 minutes. **Documented** in `Web.config`.

BR-046. How sign-in, password reset, and `Admin_SignIn.aspx` decide who may open the examination canvas was not traced. **Unknown / Requires Confirmation.**

## Data and configuration rules that affect behaviour

BR-047. Published examination rows use the `publ_` prefix. Users use the `pal_` prefix. **Implemented.**

BR-048. Pack-number tokens depend on lookup display text, not on lookup ids. Renaming a lookup display changes future pack numbers. **Inferred** from BR-016.

BR-049. `WebAddy` `http://localhost:35474` is written into status-mail image URLs. **Implemented.**

BR-050. `MediSwitchResponses` is `0`. Examination code does not call MediSwitch. **Documented** setting. **Implemented** absence from `examHandler`.

## Explicitly not inferred

- That INDE-3 is the product the readme calls Exams. The readme says Exams = INDE-1.
- That the demo catalog is production.
- That a reviewer can save a status change when their framework type is below SuperUser.
- That the subject grid filter matches the ids stored on the subject.
- That `sp_INDE_GetCriterionFeedbackData` exists in `Framework_INDE-3_Demo`.
- That any scheduler job advances examination status. No such job was identified.
- A full organisation name for IEB.
