From a1ed62089fd5b752310bb77b0ef895b210f6a8c8 Mon Sep 17 00:00:00 2001 From: cewing Date: Thu, 18 Dec 2014 23:28:57 -0800 Subject: [PATCH] MIT: CCX. Code Quality fixes Remove unused assertion. Login is required so this will never be used. No point in having it here. --- lms/djangoapps/pocs/utils.py | 3 +-- lms/djangoapps/pocs/views.py | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lms/djangoapps/pocs/utils.py b/lms/djangoapps/pocs/utils.py index b597caafd4..f39017fcd3 100644 --- a/lms/djangoapps/pocs/utils.py +++ b/lms/djangoapps/pocs/utils.py @@ -4,7 +4,6 @@ POC Enrollment operations for use by Coach APIs. Does not include any access control, be sure to check access before calling. """ -import json from django.contrib.auth.models import User from django.conf import settings from django.core.urlresolvers import reverse @@ -13,7 +12,6 @@ from django.core.mail import send_mail from courseware.courses import get_course_about_section from courseware.courses import get_course_by_id from edxmako.shortcuts import render_to_string -from opaque_keys.edx.locations import SlashSeparatedCourseKey from microsite_configuration import microsite @@ -24,6 +22,7 @@ from .models import ( ) from .overrides import get_current_poc + class EmailEnrollmentState(object): """ Store the complete enrollment state of an email in a class """ def __init__(self, poc, email): diff --git a/lms/djangoapps/pocs/views.py b/lms/djangoapps/pocs/views.py index 7573dbdd5f..4f9eb50a4c 100644 --- a/lms/djangoapps/pocs/views.py +++ b/lms/djangoapps/pocs/views.py @@ -464,10 +464,6 @@ def swich_active_poc(request, course_id, poc_id=None): """set the active POC for the logged-in user """ user = request.user - if not user.is_authenticated(): - return HttpResponseForbidden( - _('Only registered students may change POC views.') - ) course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id) # will raise Http404 if course_id is bad course = get_course_by_id(course_key)