From f996a94acb40b2ada7bf573040cd5fcec3e3d67e Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Mon, 1 Sep 2025 14:47:47 +0200 Subject: [PATCH 1/4] feat: make Learning Path key editable Use case: duplicating Learning Paths. --- learning_paths/admin.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/learning_paths/admin.py b/learning_paths/admin.py index 16342f4..d9694e0 100644 --- a/learning_paths/admin.py +++ b/learning_paths/admin.py @@ -163,7 +163,6 @@ class LearningPathAdmin(DjangoObjectActions, admin.ModelAdmin): "invite_only", ) list_filter = ("invite_only",) - readonly_fields = ("key",) inlines = [ LearningPathStepInline, @@ -174,12 +173,6 @@ class LearningPathAdmin(DjangoObjectActions, admin.ModelAdmin): change_actions = ("duplicate_learning_path",) - def get_readonly_fields(self, request, obj=None): - """Make key read-only only for existing objects.""" - if obj: # Editing an existing object. - return self.readonly_fields - return () # Allow all fields during creation. - def save_related(self, request, form, formsets, change): """Save related objects and enroll users in the learning path.""" super().save_related(request, form, formsets, change) From 35629e3b0dfa00c7724789cc22a8ec36d31d3c09 Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Mon, 1 Sep 2025 14:54:43 +0200 Subject: [PATCH 2/4] feat: remove grading criteria from Django admin This model is no longer used. --- learning_paths/admin.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/learning_paths/admin.py b/learning_paths/admin.py index d9694e0..b04c0d2 100644 --- a/learning_paths/admin.py +++ b/learning_paths/admin.py @@ -21,7 +21,6 @@ LearningPathEnrollment, LearningPathEnrollmentAllowed, LearningPathEnrollmentAudit, - LearningPathGradingCriteria, LearningPathStep, RequiredSkill, Skill, @@ -107,13 +106,6 @@ class RequiredSkillInline(admin.TabularInline): model = RequiredSkill -class LearningPathGradingCriteriaInline(admin.TabularInline): - """Inline Admin for Learning path grading criteria.""" - - model = LearningPathGradingCriteria - verbose_name = "Certificate Criteria" - - class BulkEnrollUsersForm(forms.ModelForm): """Form to bulk enroll users in a learning path.""" @@ -168,7 +160,6 @@ class LearningPathAdmin(DjangoObjectActions, admin.ModelAdmin): LearningPathStepInline, RequiredSkillInline, AcquiredSkillInline, - LearningPathGradingCriteriaInline, ] change_actions = ("duplicate_learning_path",) From 98d6edb98f86da69bc40651f8b71d0e94cd8a301 Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Mon, 1 Sep 2025 14:55:20 +0200 Subject: [PATCH 3/4] feat: display only the course key in LP steps "Sequential order" and "weight" are currently unused. --- learning_paths/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/learning_paths/admin.py b/learning_paths/admin.py index b04c0d2..13f0dfe 100644 --- a/learning_paths/admin.py +++ b/learning_paths/admin.py @@ -92,6 +92,7 @@ class LearningPathStepInline(admin.TabularInline): model = LearningPathStep form = LearningPathStepForm + fields = ("course_key",) class AcquiredSkillInline(admin.TabularInline): From e5c8877f7fec86b3ecb64855615d14a9b58a07fa Mon Sep 17 00:00:00 2001 From: Agrendalath Date: Mon, 1 Sep 2025 14:58:42 +0200 Subject: [PATCH 4/4] chore: bump version --- CHANGELOG.rst | 14 ++++++++++++++ learning_paths/__init__.py | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 156b91c..1b70094 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,20 @@ Unreleased * +0.3.5 - 2025-09-01 +****************** + +Changed +======= + +* Allow changing the Learning Path key in the Django admin interface. + +Removed +======= + +* Grading criteria from the Django admin interface. +* Step weight and order from the Django admin interface. + 0.3.4 - 2025-08-02 ****************** diff --git a/learning_paths/__init__.py b/learning_paths/__init__.py index b701867..f90c958 100644 --- a/learning_paths/__init__.py +++ b/learning_paths/__init__.py @@ -2,4 +2,4 @@ Learning Paths plugin. """ -__version__ = "0.3.4" +__version__ = "0.3.5"