From f0b074b880f3814b8d1e5d84a07df87fb963d0c3 Mon Sep 17 00:00:00 2001 From: John Jarvis Date: Fri, 1 Nov 2013 12:05:59 -0400 Subject: [PATCH] also adding insecure option to regenerate_user command --- .../certificates/management/commands/regenerate_user.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lms/djangoapps/certificates/management/commands/regenerate_user.py b/lms/djangoapps/certificates/management/commands/regenerate_user.py index 55f0cc1850..c2b8898498 100644 --- a/lms/djangoapps/certificates/management/commands/regenerate_user.py +++ b/lms/djangoapps/certificates/management/commands/regenerate_user.py @@ -19,6 +19,11 @@ class Command(BaseCommand): dest='noop', default=False, help="Don't grade or add certificate requests to the queue"), + make_option('--insecure', + action='store_true', + dest='insecure', + default=False, + help="Don't use https for the callback url to the LMS, useful in http test environments"), make_option('-c', '--course', metavar='COURSE_ID', dest='course', @@ -52,6 +57,8 @@ class Command(BaseCommand): if not options['noop']: # Add the certificate request to the queue xq = XQueueCertInterface() + if options['insecure']: + xq.use_https = False ret = xq.regen_cert(student, course_id, course=course) print '{0} - {1}'.format(student, ret) else: