Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add survey url text template #427

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions pool/app/message_template/message_template.ml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,15 @@ let public_experiment_params layout experiment =
Format.asprintf "experiments/%s" experiment_id |> to_absolute_path layout
in
let online_experiment_params =
let open OnlineExperiment in
experiment
|> Public.online_experiment
|> CCOption.is_some
|> function
| true -> [ "experumentSurveyRedirectUrl", experiment_url ^ "/start" ]
| false -> []
| Some online ->
[ "experumentSurveyRedirectUrl", experiment_url ^ "/start"
; "experimentSurveyUrl", SurveyUrl.value online.survey_url
]
| None -> []
in
[ "experimentId", experiment_id
; ( "experimentPublicTitle"
Expand Down
1 change: 1 addition & 0 deletions pool/app/pool_common/entity_i18n.ml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ type hint =
| ExperimentStatisticsSendingInvitations
| ExperimentWaitingList
| ExperumentSurveyRedirectUrl
| ExperimentSurveyUrl
| ExternalDataRequired
| FileUploadAcceptMime of string list
| FilterTemplates
Expand Down
6 changes: 6 additions & 0 deletions pool/app/pool_common/locales/i18n_de.ml
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,12 @@ Scheduled: Es läuft kein Mailing, aber zukünftige Mailings sind geplant|}
der Onlineumfrage weiter. Alternativ kann {experimentUrl} verwendet \
werden, mit dem Unterschied, dass der Kontakt die Teilnahme und \
Weiterleitung zusätzlich bestätigen muss."
| ExperimentSurveyUrl ->
"<strong>Nur für Online-Umfragen verwenden.</strong> Die externe URL der \
Onlineumfrage. Wird die URL der Umfrage in der Einladung verschickt, \
können eingeladene Kontakte diese starten, ohne dass eine Anmeldung \
erstellt wird. Sie können im Pool nicht einsehen, wer an der Umfrage \
teilgenommen hat."
| ExternalDataRequired ->
"Pro Anmeldung ist ein Identifikator für externe Daten obligatorisch \
(spätestens wenn eine Session abgeschlossen wird)."
Expand Down
5 changes: 5 additions & 0 deletions pool/app/pool_common/locales/i18n_en.ml
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ Scheduled: No mailing is running, but future mailings are scheduled.|}
URL of the online survey. Alternatively, {experimentUrl} can be used, \
with the difference that the contact must also confirm the participation \
and forwarding."
| ExperimentSurveyUrl ->
"<strong>Use for online surveys only.</strong> The external URL of the \
online survey. If the URL of the survey is sent in the invitation, \
invited contacts can start it without creating an assignment. You cannot \
see who participated in the survey in the assignment overview."
| ExternalDataRequired ->
"An external data identifier is required for every assignement (latest \
when a session is closed)."
Expand Down
4 changes: 3 additions & 1 deletion pool/web/view/component/component_message_text_elements.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ let message_template_hints =
let open Pool_common.I18n in
function
| ExperimentInvitation ->
[ "experumentSurveyRedirectUrl", ExperumentSurveyRedirectUrl ]
[ "experumentSurveyRedirectUrl", ExperumentSurveyRedirectUrl
; "experimentSurveyUrl", ExperimentSurveyUrl
]
| AccountSuspensionNotification
| AssignmentCancellation
| AssignmentConfirmation
Expand Down
Loading