@require_http_methods(['GET'])
@login_required
def user_verification_status(request):
 course_id = request.GET.get('course_id', None)
 if (course_id is None):
  return HttpResponseBadRequest()
 course_key = CourseLocator.from_string(course_id)
 (enrollment_mode, __) = CourseEnrollment.enrollment_mode_for_user(request.user, course_key)
 is_verification_required = (enrollment_mode in CourseMode.VERIFIED_MODES)
 return JsonResponse({'is_verification_required': is_verification_required})

@ require_http_methods ( [ 'GET' ] ) @ login_required def user_verification_status ( request ) : course_id = request . GET . get ( 'course_id' , None ) if ( course_id is None ) : return HttpResponseBadRequest ( ) course_key = CourseLocator . from_string ( course_id ) ( enrollment_mode , __ ) = CourseEnrollment . enrollment_mode_for_user ( request . user , course_key ) is_verification_required = ( enrollment_mode in CourseMode . VERIFIED_MODES ) return JsonResponse ( { 'is_verification_required' : is_verification_required } )
check for user verification status .