Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
******************

Expand Down
2 changes: 1 addition & 1 deletion learning_paths/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Learning Paths plugin.
"""

__version__ = "0.3.4"
__version__ = "0.3.5"
17 changes: 1 addition & 16 deletions learning_paths/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
LearningPathEnrollment,
LearningPathEnrollmentAllowed,
LearningPathEnrollmentAudit,
LearningPathGradingCriteria,
LearningPathStep,
RequiredSkill,
Skill,
Expand Down Expand Up @@ -93,6 +92,7 @@ class LearningPathStepInline(admin.TabularInline):

model = LearningPathStep
form = LearningPathStepForm
fields = ("course_key",)


class AcquiredSkillInline(admin.TabularInline):
Expand All @@ -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."""

Expand Down Expand Up @@ -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)
Expand Down