Skip to content

Create minimal lp_dump management command for Learning Core #331

@ormsbee

Description

@ormsbee

Acceptance Criteria

App requirements:

  • Create an lp_dump command in a new openedx_learning.apps.authoring.backup_restore app.
  • Most application logic should be in an api.py module in that new app, which the management command would call.
  • Like all openedx_learning apps, the AppConfig should set the label to have an "oel_" prefix, i.e. "oel_backup_restore".
  • The new app should be added to our .importlinter file, as the second-lowest dependency layer (just above publishing).

In terms of the output of the lp_dump command itself:

  • It will take two mandatory arguments: (1) the key of the LearningPackage to dump, (2) the name of the output zip file.
  • The output zip file will have a single package.toml file in it.
  • We will need to add a lib to our requirements to write TOML, probably TOML Kit, since it can write comments and do ordering.
  • The contents of the package.toml will be most of the fields in LearningPackage: title, key, description, created, and updated. Don't add uuid yet, as we have to think through some of the implications more.
  • (Optional) If it's easy, adding a comment at the top of the package.toml file indicating the datetime of export would be helpful.

There's no need to make this part of the public authoring API yet. Note that primary keys are server-specific and should not be part of the file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions