Clarify published status on activities

Created on 6 August 2024, 9 months ago

Problem/Motivation

Activities have a 'published' status field but don't extend EditorialContentEntityBase or equivalent.

We should either:

1. Clarify what status means - i.e. can an activity be part of a lesson but unpublished, what happens if it gets published etc. If we did want to support that, we'd need to handle it when building navigation and etc.

2. If we don't need published/unpublished for activities within lessons and don't support it, should we remove this altogether?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Activities and answers

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @catch
  • 🇵🇱Poland Graber

    I have no idea really, we need a discussion to decide if activity status will be needed at all and if it'll be, what will happen to activities already used in existing lessons?

  • 🇵🇱Poland Graber

    I'll remove it for now.

  • 🇨🇦Canada ob3ron Canada

    I have a use-case where multiple people will be collaborating on a course, so having the ability to save a draft for discussion would be highly desirable. Then it can be published when there's consensus on the content.

    This is somewhat related to 🐛 Unexpected behaviours when editing lessons Active

    Overall the ability to continuously improve on courses, even while students are actively taking them, seems like an important feature of an LMS platform. Not that it's necessarily easy to achieve!

  • 🇬🇧United Kingdom catch

    If we extend EditorialContentEntityBase then I think we'd get workspaces support for free, and we could then only reset student progress when the default revision is changed in 📌 Handle modifications to courses that are already started by some students Active .

  • 🇬🇧United Kingdom catch

    I think we should do this, and it would be better to do it prior to a stable release because it will involve an upgrade path to add the columns.

    I think that we can hide publishing status from the UI by default, so that it would normally only be used by workspaces.

    The tricky part that I'm not sure about is what to do with lessons/activities that are unpublished in course navigation, probably we should behave as if they don't exit.

    The big advantage of this is that when combined with workspaces, it would be possible to make draft edits to activities or entire lessons, and only have to clear student progress when those changes are published.

  • 🇵🇱Poland Graber

    I think there should be validation - only activities not being referenced by any published lesson and lessons not being referenced by any published course can be unpublished. Also there should be no way to reference an unpublished entity.
    Should be doable with constraints and status filters for widget reference views.

    Ok.. taking it so we can go for the stable :)
    We'll worry about revisions later.

  • Merge request !75Add publishing status to lessons and activities. → (Merged) created by Graber
  • 🇵🇱Poland Graber

    Ready for review :)

  • 🇵🇱Poland Graber

    Merging current work to minimize risk of divergent branches.

  • Pipeline finished with Skipped
    15 days ago
    #470100
    • graber committed d68e2d0e on 1.0.x
      Issue #3466154: Implement EditorialContentEntityBase for activities and...
  • 🇬🇧United Kingdom catch

    Missed this one but it looks good, including the upgrade path.

  • 🇨🇦Canada ob3ron Canada

    Not sure if you were implementing Workspaces yet, but I tried editing lessons and courses in a Staging workspace and on saving them got an error: Return value must be of type int, false returned.

    A small "nice to have" when throwing an error trying to unpublish a lesson/activity, would be to list the courses/lessons that it is being used in. Currently the error message says, eg: "This activity cannot be unpublished as it is a part of at least one published lesson" but there is no easy way to find out what lesson(s) it is in.

    • graber committed f52caecb on 1.0.x
      Issue #3466154: Add parent entity labels to violation message.
      
  • 🇵🇱Poland Graber

    Can't figure out how to display links (HTML) from constraint validation messages though. For now we have entity labels. Closing this as fixed, feel free to create follow-ups if needed.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024