Remove course bypass_home setting and references
This commit is contained in:
@@ -907,22 +907,12 @@ class ViewsTestCase(BaseViewsTestCase):
|
||||
def test_bypass_course_info(self):
|
||||
course_id = six.text_type(self.course_key)
|
||||
|
||||
self.assertFalse(self.course.bypass_home)
|
||||
|
||||
response = self.client.get(reverse('info', args=[course_id]))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
response = self.client.get(reverse('info', args=[course_id]), HTTP_REFERER=reverse('dashboard'))
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
self.course.bypass_home = True
|
||||
self.store.update_item(self.course, self.user.id)
|
||||
self.assertTrue(self.course.bypass_home)
|
||||
|
||||
response = self.client.get(reverse('info', args=[course_id]), HTTP_REFERER=reverse('dashboard'))
|
||||
|
||||
self.assertRedirects(response, reverse('courseware', args=[course_id]), fetch_redirect_response=False)
|
||||
|
||||
response = self.client.get(reverse('info', args=[course_id]), HTTP_REFERER='foo')
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
@@ -460,13 +460,6 @@ def course_info(request, course_id):
|
||||
if not user_can_skip_entrance_exam(user, course):
|
||||
return redirect(reverse('courseware', args=[text_type(course.id)]))
|
||||
|
||||
# TODO: LEARNER-611: Remove deprecated course.bypass_home.
|
||||
# If the user is coming from the dashboard and bypass_home setting is set,
|
||||
# redirect them straight to the courseware page.
|
||||
is_from_dashboard = reverse('dashboard') in request.META.get('HTTP_REFERER', [])
|
||||
if course.bypass_home and is_from_dashboard:
|
||||
return redirect(reverse('courseware', args=[course_id]))
|
||||
|
||||
# Construct the dates fragment
|
||||
dates_fragment = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user