Skip to content

feat(marketplace): add data model, migrations, and permissions - #8476

Open
LWS49 wants to merge 8 commits into
masterfrom
lws49/feat-marketplace-pr1-foundation
Open

feat(marketplace): add data model, migrations, and permissions#8476
LWS49 wants to merge 8 commits into
masterfrom
lws49/feat-marketplace-pr1-foundation

Conversation

@LWS49

@LWS49 LWS49 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator
  • add Listing and Adoption models under Course::Assessment::Marketplace namespace, with course_assessment_marketplace_ prefix on both tables
  • Listing tracks published state and publisher, with a uniqueness constraint per assessment and an adoption_count helper
  • Adoption links a listing to a destination course and duplicated assessment, one adoption per duplicated assessment
  • wire has_one :marketplace_listing onto Course::Assessment
  • add AssessmentMarketplaceAbilityComponent: admins can publish listings, course managers/owners can access, duplicate, and preview published listings

@LWS49
LWS49 force-pushed the lws49/feat-marketplace-pr1-foundation branch 3 times, most recently from 833d37f to 9926c90 Compare July 8, 2026 04:05
@LWS49
LWS49 force-pushed the lws49/feat-ext-assessments-pr4-import branch 7 times, most recently from 19f4347 to e530ef0 Compare July 13, 2026 14:36
Base automatically changed from lws49/feat-ext-assessments-pr4-import to lws49/feat-gradebook-export July 13, 2026 14:40
Base automatically changed from lws49/feat-gradebook-export to master July 15, 2026 13:51
@LWS49
LWS49 force-pushed the lws49/feat-marketplace-pr1-foundation branch from 9926c90 to b34bd1d Compare July 17, 2026 08:06
@adi-herwana-nus

adi-herwana-nus commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Need to resolve merge conflicts (minor).
Otherwise, LGTM, this will be the base branch to merge the other marketplace features on top of.

- add Listing and Adoption models under Course::Assessment::Marketplace
  namespace, with course_assessment_marketplace_ prefix on both tables
- Listing tracks published state and publisher, with a uniqueness
  constraint per assessment and an adoption_count helper
- Adoption links a listing to a destination course and duplicated
  assessment, one adoption per duplicated assessment
- wire has_one :marketplace_listing onto Course::Assessment
- add AssessmentMarketplaceAbilityComponent: admins can publish listings,
  course managers/owners can access, duplicate, and preview published
  listings
@LWS49
LWS49 force-pushed the lws49/feat-marketplace-pr1-foundation branch from b34bd1d to 4e681d7 Compare July 29, 2026 10:26
LWS49 added 7 commits July 29, 2026 18:46
- add publish/remove listing endpoints (admin-gated create/destroy)
- expose canPublishToMarketplace + listing state on assessment show DTO
- add Publish/Remove to Marketplace button on the assessment header
- warn in the delete Prompt when a listed assessment is removed
- add MarketplaceAPI client, translations, and controller/FE specs
- add cross-instance listings index (published only, live counts)
- add browse page with title search, adoptions/newest sort, row select
- add sidebar admin entry + /courses/:id/marketplace route
- add "Import Assessments" button on assessments index (from_tab)
- add FE api/operations/types, controller + component specs
- add DuplicationJob: copies listings into a course tab, writes adoption
- add bulk duplicate endpoint enqueuing the job for selected listings
- add DuplicateConfirmation modal with row + bulk triggers, job polling
- add MarketplaceAPI.duplicate and duplicateListings poll operation
- serialize and assert live distinct-course adoption count in index
Add the read-only backend for the marketplace browse flow:

- listings#show serializes a curated, read-only view of a published
  assessment (config + per-question summaries) for the listing preview.
- questions#show serializes a single question's detail, dispatching to
  per-type detail partials (multiple/text/voice/forum/programming/
  rubric/scribing) so each renderer gets exactly the data it needs.
- The listings index gains destination tabs plus preview/duplicate URLs
  so the browse table can link into the flow and target a tab.

Type labels are serialized human-readable (question_type_readable) to
match the real assessment show page, while the demodulized discriminator
is kept for frontend renderer dispatch. The base controller pulls in
AssessmentsHelper so the preview views can reuse display_graded_test_types,
and the sidebar component now uses the :marketplace (storefront) icon.
…port

Extract the assessment/tab/question tree from AssessmentsListing into a
reusable DuplicationAssessmentTree component so both the duplication page
and the marketplace duplicate dialog render an identical tree. The old
DuplicateItemsConfirmation listing is rewired onto it.

Also add the shared table primitives the marketplace index needs:

- renderEmpty flows through TableTemplate -> Body -> MuiTable so a table
  can render a custom empty state when it has no rows.
- hideSelectAll drops the select-all header checkbox while keeping the
  per-row checkboxes.
- Register the storefront icon in COURSE_COMPONENT_ICONS.
Build the read-only browse experience on top of the preview endpoints:

- Marketplace index: single-toolbar table with pagination, empty states,
  hidden select-all, and links into the listing preview / duplicate flow.
- Listing preview page: read-only assessment config, per-question cards
  (type chip, staff-only notes, expandable options) and a Duplicate
  Assessment action.
- Question detail preview: header chip plus a renderer dispatcher with a
  renderer per question type (multiple/text/voice/forum/programming/
  rubric/scribing).
- Duplicate dialog now shows the destination course and the shared
  assessment tree.

Includes the api client, operations, types, translations and locale
strings backing the above.
Thread the origin assessment tab (from_tab) through the whole browse flow (index -> listing -> question preview and back) via withFromTab helpers,
so a duplication always imports into the tab the user started from no matter how they navigate. Add the route data handles that build the
marketplace / listing / question breadcrumbs, preserving from_tab on the crumb links.
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