
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview
Until now, AuditedSpecialPermissionsLicenses are already set up and working as a double check for editors before creating Community Library Submissions. Now, we need to set the distributable field of these licenses to true when a CommunityLibrarySubmission is approved or when public Channels are published.
Technical details
- On the
AuditedSpecialPermissionsLicense model, add a new @classmethod method mark_channel_version_as_distributable, this method will receive a channel_version_id, and will set distributable=True to all AuditedSpecialPermissionsLicense whose channel_versions include that channel_version_id.
- Call
AuditedSpecialPermissionsLicense.mark_channel_version_as_distributable in the add_to_community_library method after export_channel_to_kolibri_public.
- For this, query the
ChannelVersion object using the channel_id and channel_version properties.
- Call
AuditedSpecialPermissionsLicense.mark_channel_version_as_distributable in the publish workflow if the channel being published is public, after this line.
- For this, we can use the
channel.version_info to get the current ChannelVersion object.
- Unit tests should be added for both workflows.
Acceptance criteria
AuditedSpecialPermissionsLicense records are marked as distributable after approving a Community Library Submission, and after a public channel is published.
- Unit tests have been added.
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Until now, AuditedSpecialPermissionsLicenses are already set up and working as a double check for editors before creating Community Library Submissions. Now, we need to set the
distributablefield of these licenses to true when a CommunityLibrarySubmission is approved or when public Channels are published.Technical details
AuditedSpecialPermissionsLicensemodel, add a new@classmethodmethodmark_channel_version_as_distributable, this method will receive achannel_version_id, and will setdistributable=Trueto allAuditedSpecialPermissionsLicensewhosechannel_versionsinclude thatchannel_version_id.AuditedSpecialPermissionsLicense.mark_channel_version_as_distributablein theadd_to_community_librarymethod afterexport_channel_to_kolibri_public.ChannelVersionobject using thechannel_idandchannel_versionproperties.AuditedSpecialPermissionsLicense.mark_channel_version_as_distributablein the publish workflow if the channel being published ispublic, after this line.channel.version_infoto get the currentChannelVersionobject.Acceptance criteria
AuditedSpecialPermissionsLicenserecords are marked as distributable after approving a Community Library Submission, and after a public channel is published.