Skip to content
Snippets Groups Projects
Commit d723bb71 authored by Victor Shnayder's avatar Victor Shnayder
Browse files

simpify process_survey_link

parent d1eec9bc
No related merge requests found
...@@ -133,11 +133,7 @@ def process_survey_link(survey_link, user): ...@@ -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. 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. Currently, this is sha1(user.username). Otherwise, return survey_link.
""" """
to_replace = '{UNIQUE_ID}' return survey_link.format(UNIQUE_ID=unique_id_for_user(user))
if to_replace in survey_link:
return survey_link.replace(to_replace, unique_id_for_user(user))
return survey_link
def cert_info(user, course): def cert_info(user, course):
......
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