Commit 547dc11c by polesye

Revert "Fix a malformed custom_parameter bug."

This reverts commit 75bdc1eebfd444bf00102b486a881f5776bbc407.
parent a6a5300b
...@@ -191,9 +191,8 @@ class LTIModule(LTIFields, XModule): ...@@ -191,9 +191,8 @@ class LTIModule(LTIFields, XModule):
try: try:
lti_id, key, secret = [i.strip() for i in lti_passport.split(':')] lti_id, key, secret = [i.strip() for i in lti_passport.split(':')]
except ValueError: except ValueError:
lti_id = key = secret = '' raise LTIError('Could not parse LTI passport: {0!r}. \
log.error('Could not parse LTI passport: {0!r}. \ Should be "id:key:secret" string.'.format(lti_passport))
Should be "id:key:secret" string.'.format(lti_passport))
if lti_id == self.lti_id.strip(): if lti_id == self.lti_id.strip():
client_key, client_secret = key, secret client_key, client_secret = key, secret
break break
...@@ -204,9 +203,8 @@ Should be "id:key:secret" string.'.format(lti_passport)) ...@@ -204,9 +203,8 @@ Should be "id:key:secret" string.'.format(lti_passport))
try: try:
param_name, param_value = [p.strip() for p in custom_parameter.split('=', 1)] param_name, param_value = [p.strip() for p in custom_parameter.split('=', 1)]
except ValueError: except ValueError:
param_name = param_value = '' raise LTIError('Could not parse custom parameter: {0!r}. \
log.error('Could not parse custom parameter: {0!r}. \ Should be "x=y" string.'.format(custom_parameter))
Should be "x=y" string.'.format(custom_parameter))
if param_name not in PARAMETERS: if param_name not in PARAMETERS:
param_name = 'custom_' + param_name param_name = 'custom_' + param_name
......
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