simpify process_survey_link
This commit is contained in:
@@ -133,11 +133,7 @@ def process_survey_link(survey_link, user):
|
||||
If {UNIQUE_ID} appears in the link, replace it with a unique id for the user.
|
||||
Currently, this is sha1(user.username). Otherwise, return survey_link.
|
||||
"""
|
||||
to_replace = '{UNIQUE_ID}'
|
||||
if to_replace in survey_link:
|
||||
return survey_link.replace(to_replace, unique_id_for_user(user))
|
||||
|
||||
return survey_link
|
||||
return survey_link.format(UNIQUE_ID=unique_id_for_user(user))
|
||||
|
||||
|
||||
def cert_info(user, course):
|
||||
|
||||
Reference in New Issue
Block a user