Skip to content

[BUG FIX] [MER-5795] Rework 3 - Fix alternatives rendering in instructor preview - #6782

Merged
eliknebel merged 3 commits into
hotfix-v0.34.1from
MER-5795-native-ab-experiments-prototype-with-adaptive-support-rework3
Aug 18, 2026
Merged

[BUG FIX] [MER-5795] Rework 3 - Fix alternatives rendering in instructor preview#6782
eliknebel merged 3 commits into
hotfix-v0.34.1from
MER-5795-native-ab-experiments-prototype-with-adaptive-support-rework3

Conversation

@eliknebel

@eliknebel eliknebel commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes a 500 error when instructor preview renders pages containing Alternatives or experiment decision points.
  • Loads section-scoped Alternatives groups once and shares them across the preview render context.
  • Preserves preview behavior for both experiment-controlled and learner-preference Alternatives.
  • Adds policy-specific guidance explaining how to preview alternatives and how learner selections or experiment assignments behave in delivery.
  • Adds regression coverage for experiment tabs, learner-preference controls, and instructor preview rendering.
  • Updates the xAPI ETL Lambda and dependency layer builds to Python 3.12.
  • Requires binary dependency wheels and updates deployment documentation for the new runtime.

Root cause

Instructor preview did not provide either a preloaded Alternatives group map or the fallback group resolver required by Oli.Rendering.Alternatives. Rendering an Alternatives element therefore attempted to invoke a nil function and returned a 500 response.

User impact

Instructors can preview pages containing learner-preference Alternatives and experiment decision points without a crash. Preview notices clarify how to inspect each alternative and how the corresponding delivery policy behaves for learners.

Testing

  • mix test test/oli/rendering/alternatives/html_test.exs test/oli_web/live/delivery/instructor/preview_lesson_live_test.exs
    • 44 tests, 0 failures
  • mix test test/oli/resources/alternatives_test.exs
    • 14 tests, 0 failures

Related issues

@github-actions

Copy link
Copy Markdown
Contributor

Risk score: 0 → risk/low

Generated by 🚫 dangerJS against 5c53c7e

@eliknebel
eliknebel marked this pull request as ready for review August 18, 2026 15:43
@github-actions

Copy link
Copy Markdown
Contributor

AI Review — security

No issues found

@github-actions

Copy link
Copy Markdown
Contributor

AI Review — performance

No issues found

@github-actions

Copy link
Copy Markdown
Contributor

AI Review — elixir

No issues found

@eliknebel
eliknebel merged commit 3347dd8 into hotfix-v0.34.1 Aug 18, 2026
21 checks passed
@eliknebel
eliknebel deleted the MER-5795-native-ab-experiments-prototype-with-adaptive-support-rework3 branch August 18, 2026 16:17
eliknebel added a commit that referenced this pull request Aug 21, 2026
…tor preview (#6782)

* fix an issue with ETL lambda building

* Fix alternatives in instructor preview

* Refine alternatives preview guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants