mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-05-06 12:37:23 -04:00
cat
This commit is contained in:
@@ -668,3 +668,8 @@ if USE_LTI:
|
|||||||
# SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
# SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
|
||||||
# Consider using cached_db for reliability if sessions are lost between many LTI launches
|
# Consider using cached_db for reliability if sessions are lost between many LTI launches
|
||||||
RELATED_MEDIA_STRATEGY = "no_related"
|
RELATED_MEDIA_STRATEGY = "no_related"
|
||||||
|
|
||||||
|
# Whether LMS course categories (is_lms_course=True) appear in the public
|
||||||
|
# category list. Off by default — LMS courses are internal LTI constructs
|
||||||
|
# and are not meaningful to regular MediaCMS users.
|
||||||
|
SHOW_LMS_COURSES_IN_CATEGORIES = False
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
VERSION = "8.0.1b"
|
VERSION = "8.0.1c"
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ class CategoryList(APIView):
|
|||||||
rbac_categories = request.user.get_rbac_categories_as_member()
|
rbac_categories = request.user.get_rbac_categories_as_member()
|
||||||
categories = categories.union(rbac_categories)
|
categories = categories.union(rbac_categories)
|
||||||
|
|
||||||
|
if not getattr(settings, 'SHOW_LMS_COURSES_IN_CATEGORIES', True):
|
||||||
|
categories = categories.filter(is_lms_course=False)
|
||||||
|
|
||||||
categories = categories.order_by("title")
|
categories = categories.order_by("title")
|
||||||
|
|
||||||
serializer = CategorySerializer(categories, many=True, context={"request": request})
|
serializer = CategorySerializer(categories, many=True, context={"request": request})
|
||||||
|
|||||||
Reference in New Issue
Block a user