Skip to content

[BUG FIX] [MER-5979] Preserve scored superactivity wrapper links - #304

Merged
rgachuhi merged 1 commit into
masterfrom
MER-5979-fix-superactivity-wrapper-links
Sep 25, 2026
Merged

rgachuhi merged 1 commit into
masterfrom
MER-5979-fix-superactivity-wrapper-links

Conversation

@andersweinstein

@andersweinstein andersweinstein commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes MER-5979, a regression introduced by #303 when generated superactivity wrapper pages and their embedded activities began retaining the same legacy resource ID for provenance.

With that shared ID, derivative-reference resolution preferred the activity for every wb:inline placeholder. An inline reference from another workbook page therefore embedded the activity directly instead of linking to its scored wrapper page. In the Discrete Math Primer, this left the five Simplification wrapper pages unreachable and removed their expected assignment and assessment-reporting behavior.

Fix

  • Identify synthesized scored superactivity wrappers before placeholder resolution mutates their models.
  • Resolve a placeholder inside its own wrapper to the embedded activity.
  • Resolve the same placeholder from another page to an internal link to the scored wrapper.
  • Preserve ordinary inline superactivity embedding and explicit activity_link behavior.

This retains the shared legacy ID needed for activity provenance and skill-model spreadsheet processing.

Coverage

Regression tests cover:

  • linked/navigable superactivities;
  • CTAT2 activities;
  • high-stakes embedded activities, including the category used by the DMP Simplification exercises;
  • ordinary embedded activities that should remain inline.

Verification

  • AWS_S3_PORT=9000 npm test -- --runInBand — 148 tests passed
  • npm run lint — no errors; three pre-existing warnings in src/resources/webcontent.ts
  • git diff --check
  • Migrated the actual DMP source from the v_1_9-echo_migration branch using its inline organization and inspected the generated digest. Simplification problems 1–5 each appear once as a link from the ungraded Simplification lesson to a distinct graded wrapper page; every wrapper contains exactly one reference to the matching oli_embedded activity. The unreferenced Problem 6 descriptor is correctly absent.

Related legacy DMP migration source: https://svn.oli.cmu.edu/svn/content/principles_of_computing/discrete_math_primer/branches/v_1_9-echo_migration

@rgachuhi
rgachuhi merged commit cd842ce into master Sep 25, 2026
2 checks passed
@rgachuhi
rgachuhi deleted the MER-5979-fix-superactivity-wrapper-links branch September 25, 2026 19:50
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