learning-paths-plugin 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/CHANGELOG.rst +14 -0
  2. {learning_paths_plugin-0.4.0/learning_paths_plugin.egg-info → learning_paths_plugin-0.5.0}/PKG-INFO +15 -1
  3. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/__init__.py +1 -1
  4. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/admin.py +1 -1
  5. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/serializers.py +7 -0
  6. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/views.py +2 -0
  7. learning_paths_plugin-0.5.0/learning_paths/migrations/0016_alter_learningpathstep_options.py +17 -0
  8. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/models.py +2 -0
  9. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0/learning_paths_plugin.egg-info}/PKG-INFO +15 -1
  10. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths_plugin.egg-info/SOURCES.txt +1 -0
  11. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/LICENSE.txt +0 -0
  12. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/MANIFEST.in +0 -0
  13. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/README.rst +0 -0
  14. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/__init__.py +0 -0
  15. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/urls.py +0 -0
  16. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/__init__.py +0 -0
  17. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/filters.py +0 -0
  18. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/permissions.py +0 -0
  19. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/urls.py +0 -0
  20. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/api/v1/utils.py +0 -0
  21. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/apps.py +0 -0
  22. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/compat.py +0 -0
  23. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/conftest.py +0 -0
  24. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/keys.py +0 -0
  25. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0001_initial.py +0 -0
  26. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0002_learningpath_uuid.py +0 -0
  27. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0003_learningpath_subtitle.py +0 -0
  28. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0004_auto_20240207_1633.py +0 -0
  29. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0005_learningpathstep_weight_learningpathgradingcriteria.py +0 -0
  30. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0006_enrollment_models.py +0 -0
  31. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0007_replace_uuid_with_learningpathkey.py +0 -0
  32. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0008_remove_learningpathstep_relative_due_date_in_days.py +0 -0
  33. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0009_remove_learningpath_slug.py +0 -0
  34. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0010_learningpath_invite_only.py +0 -0
  35. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0011_replace_learningpath_image_url_with_image.py +0 -0
  36. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0012_alter_learningpath_subtitle.py +0 -0
  37. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0013_enrollment_audit.py +0 -0
  38. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0014_remove_learningpath_duration_in_days_and_more.py +0 -0
  39. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/0015_make_skill_level_optional.py +0 -0
  40. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/migrations/__init__.py +0 -0
  41. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/receivers.py +0 -0
  42. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/settings.py +0 -0
  43. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/templates/learning_paths/base.html +0 -0
  44. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths/urls.py +0 -0
  45. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths_plugin.egg-info/dependency_links.txt +0 -0
  46. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths_plugin.egg-info/entry_points.txt +0 -0
  47. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths_plugin.egg-info/not-zip-safe +0 -0
  48. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths_plugin.egg-info/requires.txt +0 -0
  49. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/learning_paths_plugin.egg-info/top_level.txt +0 -0
  50. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/pyproject.toml +0 -0
  51. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/requirements/base.in +0 -0
  52. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/requirements/constraints.txt +0 -0
  53. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/setup.cfg +0 -0
  54. {learning_paths_plugin-0.4.0 → learning_paths_plugin-0.5.0}/setup.py +0 -0
@@ -16,6 +16,20 @@ Unreleased
16
16
 
17
17
  *
18
18
 
19
+ 0.5.0 - 2026-08-11
20
+ ******************
21
+
22
+ Added
23
+ =====
24
+
25
+ * Step order in the Django admin interface.
26
+
27
+ Changed
28
+ =======
29
+
30
+ * Order the Learning Path steps by their sequential order in the API, with the
31
+ steps that have no explicit order at the end.
32
+
19
33
  0.4.0 - 2026-06-12
20
34
  ******************
21
35
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: learning-paths-plugin
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Learning Paths plugin
5
5
  Home-page: https://github.com/open-craft/learning-paths-plugin
6
6
  Author: OpenCraft
@@ -120,6 +120,20 @@ Unreleased
120
120
 
121
121
  *
122
122
 
123
+ 0.5.0 - 2026-08-11
124
+ ******************
125
+
126
+ Added
127
+ =====
128
+
129
+ * Step order in the Django admin interface.
130
+
131
+ Changed
132
+ =======
133
+
134
+ * Order the Learning Path steps by their sequential order in the API, with the
135
+ steps that have no explicit order at the end.
136
+
123
137
  0.4.0 - 2026-06-12
124
138
  ******************
125
139
 
@@ -2,4 +2,4 @@
2
2
  Learning Paths plugin.
3
3
  """
4
4
 
5
- __version__ = "0.4.0"
5
+ __version__ = "0.5.0"
@@ -93,7 +93,7 @@ class LearningPathStepInline(admin.TabularInline):
93
93
 
94
94
  model = LearningPathStep
95
95
  form = LearningPathStepForm
96
- fields = ("course_key",)
96
+ fields = ("course_key", "order")
97
97
 
98
98
 
99
99
  class AcquiredSkillInline(admin.TabularInline):
@@ -95,6 +95,13 @@ class LearningPathGradeSerializer(serializers.Serializer):
95
95
 
96
96
 
97
97
  class LearningPathStepSerializer(serializers.ModelSerializer):
98
+ """
99
+ Serializer for a Learning Path step.
100
+
101
+ The steps are serialized in the order defined by the ``order`` field, with
102
+ the steps that have no explicit order at the end.
103
+ """
104
+
98
105
  class Meta:
99
106
  model = LearningPathStep
100
107
  fields = ["order", "course_key", "course_dates", "weight"]
@@ -152,6 +152,8 @@ class LearningPathViewSet(viewsets.ReadOnlyModelViewSet):
152
152
  def get_queryset(self):
153
153
  """
154
154
  Get all learning paths and prefetch the related data.
155
+
156
+ The steps are prefetched in their sequential order, with the steps that have no explicit order at the end.
155
157
  """
156
158
  user = self.request.user
157
159
  queryset = LearningPath.objects.get_paths_visible_to_user(user).prefetch_related(
@@ -0,0 +1,17 @@
1
+ # Generated by Django 4.2.23 on 2026-08-10 21:57
2
+
3
+ from django.db import migrations, models
4
+
5
+
6
+ class Migration(migrations.Migration):
7
+
8
+ dependencies = [
9
+ ("learning_paths", "0015_make_skill_level_optional"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterModelOptions(
14
+ name="learningpathstep",
15
+ options={"ordering": (models.OrderBy(models.F("order"), nulls_last=True), "id")},
16
+ ),
17
+ ]
@@ -195,6 +195,8 @@ class LearningPathStep(TimeStampedModel):
195
195
  """Model options."""
196
196
 
197
197
  unique_together = ("learning_path", "course_key")
198
+ # Steps without an explicit order are listed last, in the order of their creation.
199
+ ordering = (models.F("order").asc(nulls_last=True), "id")
198
200
 
199
201
  course_key = CourseKeyField(max_length=255)
200
202
  learning_path = models.ForeignKey(LearningPath, related_name="steps", on_delete=models.CASCADE)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: learning-paths-plugin
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Learning Paths plugin
5
5
  Home-page: https://github.com/open-craft/learning-paths-plugin
6
6
  Author: OpenCraft
@@ -120,6 +120,20 @@ Unreleased
120
120
 
121
121
  *
122
122
 
123
+ 0.5.0 - 2026-08-11
124
+ ******************
125
+
126
+ Added
127
+ =====
128
+
129
+ * Step order in the Django admin interface.
130
+
131
+ Changed
132
+ =======
133
+
134
+ * Order the Learning Path steps by their sequential order in the API, with the
135
+ steps that have no explicit order at the end.
136
+
123
137
  0.4.0 - 2026-06-12
124
138
  ******************
125
139
 
@@ -39,6 +39,7 @@ learning_paths/migrations/0012_alter_learningpath_subtitle.py
39
39
  learning_paths/migrations/0013_enrollment_audit.py
40
40
  learning_paths/migrations/0014_remove_learningpath_duration_in_days_and_more.py
41
41
  learning_paths/migrations/0015_make_skill_level_optional.py
42
+ learning_paths/migrations/0016_alter_learningpathstep_options.py
42
43
  learning_paths/migrations/__init__.py
43
44
  learning_paths/templates/learning_paths/base.html
44
45
  learning_paths_plugin.egg-info/PKG-INFO