Update app.py
Browse files
app.py
CHANGED
|
@@ -13,9 +13,12 @@ def process_survey(survey_id, submission_id):
|
|
| 13 |
encoded_params = urlencode(params)
|
| 14 |
|
| 15 |
match_param = f'{{"_id": {{"$oid": "{submission_id}"}}}}'
|
| 16 |
-
encoded_match_param = quote(match_param)
|
| 17 |
|
| 18 |
-
survey_url = f"{base_url}?{encoded_params}&match={
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
try:
|
| 21 |
response = requests.get(survey_url)
|
|
@@ -35,6 +38,7 @@ def display_survey():
|
|
| 35 |
# Construct the full URL using urljoin to ensure proper formatting
|
| 36 |
survey_url = urljoin(base_url, f"{group_id}/surveys/{survey_id}/submissions/new")
|
| 37 |
|
|
|
|
| 38 |
print(survey_url)
|
| 39 |
|
| 40 |
iframe_html = f'<iframe src="{survey_url}" width="100%" height="600px"></iframe>'
|
|
|
|
| 13 |
encoded_params = urlencode(params)
|
| 14 |
|
| 15 |
match_param = f'{{"_id": {{"$oid": "{submission_id}"}}}}'
|
| 16 |
+
#encoded_match_param = quote(match_param)
|
| 17 |
|
| 18 |
+
survey_url = f"{base_url}?{encoded_params}&match={match_param}"
|
| 19 |
+
|
| 20 |
+
print("PROCESS_SURVEY")
|
| 21 |
+
print(survey_url)
|
| 22 |
|
| 23 |
try:
|
| 24 |
response = requests.get(survey_url)
|
|
|
|
| 38 |
# Construct the full URL using urljoin to ensure proper formatting
|
| 39 |
survey_url = urljoin(base_url, f"{group_id}/surveys/{survey_id}/submissions/new")
|
| 40 |
|
| 41 |
+
print("DISPLAY_SURVEY")
|
| 42 |
print(survey_url)
|
| 43 |
|
| 44 |
iframe_html = f'<iframe src="{survey_url}" width="100%" height="600px"></iframe>'
|