openedx-learning 0.11.1__py2.py3-none-any.whl → 0.11.2__py2.py3-none-any.whl

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.
@@ -1,4 +1,4 @@
1
1
  """
2
2
  Open edX Learning ("Learning Core").
3
3
  """
4
- __version__ = "0.11.1"
4
+ __version__ = "0.11.2"
@@ -15,6 +15,7 @@ from .models import Collection
15
15
  __all__ = [
16
16
  "create_collection",
17
17
  "get_collection",
18
+ "get_collections",
18
19
  "get_learning_package_collections",
19
20
  "update_collection",
20
21
  ]
@@ -77,4 +78,15 @@ def get_learning_package_collections(learning_package_id: int) -> QuerySet[Colle
77
78
  """
78
79
  return Collection.objects \
79
80
  .filter(learning_package_id=learning_package_id, enabled=True) \
80
- .select_related("learning_package")
81
+ .select_related("learning_package") \
82
+ .order_by('pk')
83
+
84
+
85
+ def get_collections(enabled: bool | None = None) -> QuerySet[Collection]:
86
+ """
87
+ Get all collections, optionally caller can filter by enabled flag
88
+ """
89
+ qs = Collection.objects.all()
90
+ if enabled is not None:
91
+ qs = qs.filter(enabled=enabled)
92
+ return qs.select_related("learning_package").order_by('pk')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openedx-learning
3
- Version: 0.11.1
3
+ Version: 0.11.2
4
4
  Summary: Open edX Learning Core and Tagging.
5
5
  Home-page: https://github.com/openedx/openedx-learning
6
6
  Author: David Ormsbee
@@ -18,12 +18,12 @@ Classifier: Programming Language :: Python :: 3.11
18
18
  Classifier: Programming Language :: Python :: 3.12
19
19
  Requires-Python: >=3.11
20
20
  License-File: LICENSE.txt
21
+ Requires-Dist: Django<5.0
21
22
  Requires-Dist: rules<4.0
22
23
  Requires-Dist: edx-drf-extensions
23
- Requires-Dist: celery
24
- Requires-Dist: attrs
25
24
  Requires-Dist: djangorestframework<4.0
26
- Requires-Dist: Django<5.0
25
+ Requires-Dist: attrs
26
+ Requires-Dist: celery
27
27
 
28
28
  Open edX Learning Core (and Tagging)
29
29
  ====================================
@@ -1,4 +1,4 @@
1
- openedx_learning/__init__.py,sha256=WHmySeEcWrQjNX67Sfy3ikRckRukGcPd2C61xga0d4I,68
1
+ openedx_learning/__init__.py,sha256=jEycplMzOABlZc9NUIkiXm-xHQUhJI-kaHVtqQ-5hDI,68
2
2
  openedx_learning/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  openedx_learning/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  openedx_learning/api/authoring.py,sha256=vbRpiQ2wOfN3oR2bbN0-bI2ra0QRtha9tVixKW1ENis,929
@@ -6,7 +6,7 @@ openedx_learning/api/authoring_models.py,sha256=PrhEYozI7nzC7N1v_sP1QgjwjRvLX6it
6
6
  openedx_learning/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  openedx_learning/apps/authoring/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  openedx_learning/apps/authoring/collections/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- openedx_learning/apps/authoring/collections/api.py,sha256=3blr4y40cGGqE7QXVQaexzhqMdeDrGa8JTw2wi6UU8M,2205
9
+ openedx_learning/apps/authoring/collections/api.py,sha256=lF6Wva4ySekwkJGy7z0Kv2pONW2Ho1YffnLYcJ1cyv4,2595
10
10
  openedx_learning/apps/authoring/collections/apps.py,sha256=67imy9vnyXml4cfLNGFJhuZr2yx1q92-xz4ih3yJgNU,416
11
11
  openedx_learning/apps/authoring/collections/models.py,sha256=K_hfFxMirAqntgL1yxoS8LjTJkVOHCszoR6PwMfJGQ8,2427
12
12
  openedx_learning/apps/authoring/collections/migrations/0001_initial.py,sha256=xcJoqMLROW9FTILYrz6UsyotVu9wBN5tRBwRoAWG6dg,1496
@@ -103,8 +103,8 @@ openedx_tagging/core/tagging/rest_api/v1/serializers.py,sha256=gbvEBLvsmfPc3swWz
103
103
  openedx_tagging/core/tagging/rest_api/v1/urls.py,sha256=dNUKCtUCx_YzrwlbEbpDfjGVQbb2QdJ1VuJCkladj6E,752
104
104
  openedx_tagging/core/tagging/rest_api/v1/views.py,sha256=ZRkSILdb8g5k_BcuuVVfdffEdY9vFQ_YtMa3JrN0Xz8,35581
105
105
  openedx_tagging/core/tagging/rest_api/v1/views_import.py,sha256=kbHUPe5A6WaaJ3J1lFIcYCt876ecLNQfd19m7YYub6c,1470
106
- openedx_learning-0.11.1.dist-info/LICENSE.txt,sha256=QTW2QN7q3XszgUAXm9Dzgtu5LXYKbR1SGnqMa7ufEuY,35139
107
- openedx_learning-0.11.1.dist-info/METADATA,sha256=rOqyDvQXf8aZxVVUF2ZnHOmbx7V7HXtsmUkp-P__cho,8777
108
- openedx_learning-0.11.1.dist-info/WHEEL,sha256=M4n4zmFKzQZk4mLCcycNIzIXO7YPKE_b5Cw4PnhHEg8,109
109
- openedx_learning-0.11.1.dist-info/top_level.txt,sha256=IYFbr5mgiEHd-LOtZmXj3q3a0bkGK1M9LY7GXgnfi4M,33
110
- openedx_learning-0.11.1.dist-info/RECORD,,
106
+ openedx_learning-0.11.2.dist-info/LICENSE.txt,sha256=QTW2QN7q3XszgUAXm9Dzgtu5LXYKbR1SGnqMa7ufEuY,35139
107
+ openedx_learning-0.11.2.dist-info/METADATA,sha256=7xfFEtSUdToIKa-HQVfKknu6_m_BQ62APno2fQulC_4,8777
108
+ openedx_learning-0.11.2.dist-info/WHEEL,sha256=GUeE9LxUgRABPG7YM0jCNs9cBsAIx0YAkzCB88PMLgc,109
109
+ openedx_learning-0.11.2.dist-info/top_level.txt,sha256=IYFbr5mgiEHd-LOtZmXj3q3a0bkGK1M9LY7GXgnfi4M,33
110
+ openedx_learning-0.11.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.2.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any