Skip to content

Update curriculum data to include FSD structure #1359

@huyenltnguyen

Description

@huyenltnguyen

Description

With FSD now contains chapters and modules, the data generated by the build-external-curricula-data script is not sufficient for building the FSD UI (the data only contains a list of blocks, without any relationship between them).

We will need to update the script and the JSON schema. This will introduce breaking changes, so we are going to release them in v3 (v2 is reserved for some changes that are currently on hold). This will introduce breaking changes, so we are going to release them in v2 (not v3).

Changes

The curriculum data now has two schemas. This depends on the type of the curriculum: block-based or chapter-based.

Block-based curriculum

New schema:

{
  "curriculum-name": {
    "intro": [
      "curriculum intro 1",
      "curriculum intro 2"
    ],
    "blocks": [ // changed from object to array
      {
        "intro": [ // in v1, each block has both `intro` and `desc` and they contain the same text. I'm dropping `desc` in v3 
          "block intro 1",
          "block intro 2",
        ],
        "meta": { // changed from `challenges` to `meta` to communicate the object content better (block meta vs challenges meta)
          ... // the content is same as v1
        }
      }
    ]
  }
}

Chapter-based curriculum

New schema:

{
  "curriculum-name": {
    "intro": [
      "curriculum intro 1",
      "curriculum intro 2"
    ],
    "chapters": [ // `chapters` is the outermost node rather than `blocks`
      {
        "dashedName": "chapter-dashed-name",
        "modules": [
          "dashedName": "module-dashed-name",
          "blocks": [ // changed from object to array
            {
              "intro": [
                "block-intro-1",
                "block-intro-2",
              ],
              "meta": { // changed from `challenges` to `meta` to communicate the object content better (block meta vs challenges meta)
                ... // the content is same as v1
              } 
            }
          ] 
        ]
      }
    ]
  }
}

submit-types.json

Move this file under /v3. (It's currently not versioned.)

available-superblocks.json

Group super blocks by stage (core, english, legacy, professional).

Tasks

  • Update the script to include chapters and modules in FSD data
  • Update the script to add blockType and blockLayout under each block object
  • Switch the version to v3

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