Skip to content

Implement table-driven F.O.S. lesson completion - #28

Open
ToumanLin wants to merge 1 commit into
reiserFSs:masterfrom
ToumanLin:codex/fos-course-completion
Open

Implement table-driven F.O.S. lesson completion#28
ToumanLin wants to merge 1 commit into
reiserFSs:masterfrom
ToumanLin:codex/fos-course-completion

Conversation

@ToumanLin

Copy link
Copy Markdown

Problem

F.O.S. lessons and assessments can be entered and played, but valid lesson-result submissions are rejected because the server does not evaluate the configured lesson completion requirement. This prevents progress from being persisted and can leave later assessments and rewards unavailable.

Summary

  • Resolve submitted lessons from the authoritative course-stage table.
  • Read and evaluate the configured finish condition and score threshold.
  • Persist successfully completed C1/C2 lessons.
  • Preserve existing exam scoring, pending/saved result, downgrade, and reward behavior.
  • Reject invalid stages, result types, and insufficient scores without granting progress.
  • Preserve duplicate-claim and retry behavior.
  • Add coverage for lessons, real exams, persistence, rewards, downgrade handling, and BSON relog.

Data sources

Lesson completion is derived from authoritative course tables and the submitted result. No stage-specific captured values or response snapshots are embedded in runtime code.

Testing

  • dotnet build AscNet/AscNet.csproj
  • dotnet run --project AscNet.Test/AscNet.Test.csproj -- --course-only

@reiserFSs

Copy link
Copy Markdown
Owner

Reviewed against 67b9b1ec794540da4a805f9b5deb2a0adca54b7f. Hold pending confirmation of the lesson-completion rule.

The project builds, --course-only passes, and GitHub reports a clean merge. No published CI checks were reported.

The actual runtime change in CourseModule.cs:44-53 treats every lesson chapter as having a completion rule and sets it clear once all configured stage IDs have saved records. It does not read the configured lesson FinishCondition/score threshold described in the PR body; those fields are not present in the inspected CourseStage schema.

The client consumes the server's chapter IsClear flag. Its stage-record presence checks and distinction between completion and maximum points do not independently establish the proposed chapter-completion formula. The added C1/C2 tests exercise the chosen formula using full-star results, rather than providing an independent oracle for it.

Please provide authoritative source or a controlled retail transition establishing the rule, and align the description/tests with that evidence. Alternatively, this needs explicit maintainer approval as a documented local policy rather than a claim of established parity.

To be clear: I have not established that a zero-star result must be rejected or that lessons require full stars. The blocker is the missing authority for the formerly unsupported chapter-clear rule, not a proven score-threshold defect. No changes were pushed during review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants