Remove the channel labels from the non-public ContentNode API #12842
Labels
APP: Coach
Re: Coach App (lessons, quizzes, groups, reports, etc.)
DEV: backend
Python, databases, networking, filesystem...
Milestone
[General guidance: Product issues should describe the feature, but are not actually technically specced for dev work.]
Overview
Following-up from #12759 - there is no longer a need for the ContentNode API to provide a list of labels for the channels as we have removed the ability to select a Channel to search by through the filters interface. The user's search will be filtered instead, automatically, by scoping to the channel (or topic) they're currently in.
Guidance
We need to be sure that the channel labels are still made available through the public API so that older Kolibris which do have the option to search by a particular Channel will not run into any issues.
For searching the user's local Kolibri, however, from here on the labels are unnecessary data and processing.
A good place to start might be:
kolibri/kolibri/core/content/utils/search.py
Line 140 in 458bd60
and the
_get_available_channels
function there.Additionally, you'll see that the labels are generated in a method in the
OptionalContentNodePagination
class:kolibri/kolibri/core/content/api.py
Line 841 in 458bd60
which is used both in the public and private APIs'
pagination_class
field.It could perhaps be as simple as adding a flag
use_deprecated_channels_labels=False
to that class, then handling theTrue
case within the existingOptionalContentNodePagination
class -- then subclassing it and setting that subclass's field toTrue
to pass it into the public content node viewset'spagination_class
field.Acceptance criteria
The text was updated successfully, but these errors were encountered: