Commit 9c48a485 by Chris Dodge

use standard edx-platform configuration to specify if we can accept HTTPS callacks

parent 2c0bcc34
...@@ -355,12 +355,14 @@ def create_exam_attempt(exam_id, user_id, taking_as_proctored=False): ...@@ -355,12 +355,14 @@ def create_exam_attempt(exam_id, user_id, taking_as_proctored=False):
external_id = None external_id = None
if taking_as_proctored: if taking_as_proctored:
callback_url = 'http://{hostname}{path}'.format( scheme = 'https' if getattr(settings, 'HTTPS', 'on') == 'on' else 'http'
callback_url = '{scheme}://{hostname}{path}'.format(
scheme=scheme,
hostname=settings.SITE_NAME, hostname=settings.SITE_NAME,
path=reverse( path=reverse(
'edx_proctoring.anonymous.proctoring_launch_callback.start_exam', 'edx_proctoring.anonymous.proctoring_launch_callback.start_exam',
args=[attempt_code] args=[attempt_code]
) ),
) )
# get the name of the user, if the service is available # get the name of the user, if the service is available
......
...@@ -18,6 +18,7 @@ TIME_ZONE = {} ...@@ -18,6 +18,7 @@ TIME_ZONE = {}
SECRET_KEY='SHHHHHH' SECRET_KEY='SHHHHHH'
PLATFORM_NAME='Open edX' PLATFORM_NAME='Open edX'
FEATURES = {} FEATURES = {}
HTTPS = 'off'
DATABASES = { DATABASES = {
'default': { 'default': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment