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
4 changes: 0 additions & 4 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,6 @@
# e.g. COURSE_BLOCKS_API_EXTRA_FIELDS = [ ('course', 'other_course_settings'), ("problem", "weight") ]
COURSE_BLOCKS_API_EXTRA_FIELDS = []

# Setting to redirect unauthenticated users to the login page when enrolling from the course about
# page instead of showing an error message. After successful login redirects them back to the course about page.
REDIRECT_UNAUTHENTICATED_USER_TO_LOGIN_ON_ENROLL = False

# Settings for the course reviews tool template and identification key, set either to None to disable course reviews
COURSE_REVIEWS_TOOL_PROVIDER_FRAGMENT_NAME = 'coursetalk-reviews-fragment.html'
COURSE_REVIEWS_TOOL_PROVIDER_PLATFORM_KEY = 'edx'
Expand Down
9 changes: 2 additions & 7 deletions lms/templates/courseware/course_about.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,8 @@
location.href = xhr.responseText;
}
} else if (xhr.status == 403) {
%if settings.REDIRECT_UNAUTHENTICATED_USER_TO_LOGIN_ON_ENROLL:
location.replace("${reverse('signin_user') | n, js_escaped_string}?next=${request.path | u}");
%else:
$('#register_error').text(
(xhr.responseText ? xhr.responseText : "${_("An error has occurred. Please ensure that you are logged in to enroll.") | n, js_escaped_string}")
).css("display", "block");
%endif
// redirect unauthenticated user to the login page
location.replace("${reverse('signin_user') | n, js_escaped_string}?next=" + encodeURIComponent("${request.path | n, js_escaped_string}"));
} else {
$('#register_error').text(
(xhr.responseText ? xhr.responseText : "${_("An error occurred. Please try again later.") | n, js_escaped_string}")
Expand Down