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" diff --git a/learning_paths/admin.py b/learning_paths/admin.py index 16342f4..13f0dfe 100644 --- a/learning_paths/admin.py +++ b/learning_paths/admin.py @@ -21,7 +21,6 @@ LearningPathEnrollment, LearningPathEnrollmentAllowed, LearningPathEnrollmentAudit, - LearningPathGradingCriteria, LearningPathStep, RequiredSkill, Skill, @@ -93,6 +92,7 @@ class LearningPathStepInline(admin.TabularInline): model = LearningPathStep form = LearningPathStepForm + fields = ("course_key",) class AcquiredSkillInline(admin.TabularInline): @@ -107,13 +107,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.""" @@ -163,23 +156,15 @@ class LearningPathAdmin(DjangoObjectActions, admin.ModelAdmin): "invite_only", ) list_filter = ("invite_only",) - readonly_fields = ("key",) inlines = [ LearningPathStepInline, RequiredSkillInline, AcquiredSkillInline, - LearningPathGradingCriteriaInline, ] 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)