Skip to content

Add management command to backfill default Learning Activities #3400

@rtibbles

Description

@rtibbles

Target: Hotfixes

  • Cherry-pick commits that add Learning Activities and other new metadata fields + migrations
  • If needed cherry-pick other commits if there are intervening migration updates
  • Create a management command that goes through all content nodes in batches and fills in a default value based on kind. Can skip non-null values to allow easy rerunning.

Default mapping should be:

kind_activity_map = {
    content_kinds.EXERCISE: learning_activities.PRACTICE,
    content_kinds.VIDEO: learning_activities.WATCH,
    content_kinds.AUDIO: learning_activities.LISTEN,
    content_kinds.DOCUMENT: learning_activities.READ,
    content_kinds.HTML5: learning_activities.EXPLORE,
    content_kinds.H5P: learning_activities.EXPLORE,
    content_kinds.SLIDESHOW: learning_activities.READ,
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions