learningequality / kolibri

Kolibri Learning Platform: the offline app for universal education
https://learningequality.org/kolibri/
MIT License
907 stars 806 forks source link

Use new content management utility functions for import channel and delete content #13278

Open thesujai opened 2 months ago

thesujai commented 2 months ago

While the recent refactoring of content management commands (see #9266) has improved our codebase, there are still instances where the legacy approach is used. Specifically, in the following locations: DeleteContent Delete Content ImportChannel

Instead of invoking the management commands in these cases, we should update the code to use the corresponding utility functions: For importing a channel, use: content.utils.channel_transfer.transfer_channel For deleting content, use: content.utils.content_delete.delete_content

This change will keep our code up-to-date with our latest updates and make unit testing must simpler

manuaishika commented 2 months ago

hi @rtibbles could you please assign this issue to me?

rtibbles commented 2 months ago

Hi @manuaishika - I have assigned you as you just got in first, please let me know how you plan to tackle this issue.

rtibbles commented 2 months ago

@KumarVivekPathak are you serious? https://github.com/learningequality/kolibri/blob/develop/kolibri/core/content/utils/content_delete.py

It's right there.

This makes me suspect that this github comment was generated by an LLM - please consider the content of what you post and don't use the output of an LLM without any critical reflection.

learning-equality-bot[bot] commented 1 month ago

Automatically unassigning @manuaishika due to no comments here, or updates on the associated pull request for 1 month. @manuaishika, if you're still interested in this issue or already have work in progress, please message us here, and we'll assign you again. Thank you!

iamshobhraj commented 1 month ago

Hi @rtibbles @thesujai, can I help with this? Also just to be sure, I'm assuming there are other instances with legacy code apart from the ones mentioned in the issue?

AlexVelezLl commented 1 month ago

Hi @iamshobhraj! I will assign this issue to you! For now, let's stick to the scope of the issue and resolve only the places the issue mentions, regardless of whether there are other instances with legacy code.

iamshobhraj commented 4 weeks ago

@AlexVelezLl i opened a pr related to this issue. can you review it?

AlexVelezLl commented 4 weeks ago

Thanks @iamshobhraj! I'll take a look at it this week :)