Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Only show relevant child sub contentobjects (fixes #211) #212

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Mar 20, 2024

fixes #211

Fix

  • Prevent all descendant sub contentobject appearing when _showAtCourseLevel: true and only show relevant contentobjects at each level

Testing

  • Using vanilla course, enable course.json:_pageLevelProgress._showAtCourseLevel
  • Add content object
  {
    "_id": "co-1",
    "_parentId": "course",
    "_type": "menu",
    "_classes": "",
    "_htmlClasses": "",
    "title": "Container",
    "displayTitle": "Container",
    "body": "Find out what presentation components are available within the core bundle and how you might consider using them within your courses.",
    "pageBody": "",
    "instruction": "Scroll down to see what presentation components are available as part of the v5 core bundle.",
    "_graphic": {
      "src": "course/en/images/menu-item.png",
      "alt": ""
    },
    "linkText": "View",
    "duration": "2 mins",
    "_pageLevelProgress": {
      "_isEnabled": true,
      "_showPageCompletion": false,
      "_excludeAssessments": false,
      "_isCompletionIndicatorEnabled": false
    }
  },
  • Change _parentId of other content objects to "co-1"
  • Switch to this branch of plp
  • Compile

image
image

@oliverfoster oliverfoster self-assigned this Mar 20, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@kirsty-hames kirsty-hames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected thanks

@kirsty-hames kirsty-hames merged commit b7d260b into master Apr 9, 2024
1 check passed
@kirsty-hames kirsty-hames deleted the issue/211 branch April 9, 2024 14:47
github-actions bot pushed a commit that referenced this pull request Apr 9, 2024
## [7.5.1](v7.5.0...v7.5.1) (2024-04-09)

### Fix

* Only display next relevant child sub contentobjects (fixes #211) (#212) ([b7d260b](b7d260b)), closes [#211](#211) [#212](#212)
Copy link

github-actions bot commented Apr 9, 2024

🎉 This PR is included in version 7.5.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submenu content objects duplicated with _showAtCourseLevel: true
4 participants