From 65c2fcc91747ed5ffdf56792c3f486a236fb9265 Mon Sep 17 00:00:00 2001 From: Luis Felipe Castano Date: Tue, 13 May 2025 10:55:50 -0500 Subject: [PATCH] chore: Add access to students registered in the course when the course visibility is none --- lms/djangoapps/courseware/access.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/courseware/access.py b/lms/djangoapps/courseware/access.py index 74f1d74f837..5c870e898a6 100644 --- a/lms/djangoapps/courseware/access.py +++ b/lms/djangoapps/courseware/access.py @@ -61,7 +61,7 @@ get_pre_requisite_courses_not_completed, is_prerequisite_courses_enabled ) -from xmodule.course_block import CATALOG_VISIBILITY_ABOUT, CATALOG_VISIBILITY_CATALOG_AND_ABOUT, CourseBlock # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.course_block import CATALOG_VISIBILITY_ABOUT, CATALOG_VISIBILITY_CATALOG_AND_ABOUT, CATALOG_VISIBILITY_NONE, CourseBlock # lint-amnesty, pylint: disable=wrong-import-order from xmodule.error_block import ErrorBlock # lint-amnesty, pylint: disable=wrong-import-order from xmodule.partitions.partitions import NoSuchUserPartitionError, NoSuchUserPartitionGroupError # lint-amnesty, pylint: disable=wrong-import-order @@ -395,6 +395,7 @@ def can_see_in_catalog(): return ( _has_catalog_visibility(courselike, CATALOG_VISIBILITY_CATALOG_AND_ABOUT) or _has_staff_access_to_block(user, courselike, courselike.id) + or (can_load() and _has_catalog_visibility(courselike, CATALOG_VISIBILITY_NONE)) ) @function_trace('can_see_about_page') @@ -408,6 +409,7 @@ def can_see_about_page(): _has_catalog_visibility(courselike, CATALOG_VISIBILITY_CATALOG_AND_ABOUT) or _has_catalog_visibility(courselike, CATALOG_VISIBILITY_ABOUT) or _has_staff_access_to_block(user, courselike, courselike.id) + or (can_load() and _has_catalog_visibility(courselike, CATALOG_VISIBILITY_NONE)) ) checkers = {