Skip to content
Snippets Groups Projects
Commit 3dcda983 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

switch language before sending personal notifications after a questionnaire is...

switch language before sending personal notifications after a questionnaire is answered, fixes #4385

Closes #4385

Merge request studip/studip!3194
parent f3d12943
No related branches found
No related tags found
No related merge requests found
......@@ -939,15 +939,18 @@ class QuestionnaireController extends AuthenticatedController
$anonymous_answer->store();
}
if (!$answered_before && !$this->questionnaire['anonymous'] && ($this->questionnaire['user_id'] !== $GLOBALS['user']->id)) {
$url = URLHelper::getURL("dispatch.php/questionnaire/evaluate/" . $this->questionnaire->getId(), [], true);
setTempLanguage($this->questionnaire->user_id);
PersonalNotifications::add(
$this->questionnaire['user_id'],
$url,
sprintf(_("%s hat an der Befragung '%s' teilgenommen."), $GLOBALS['user']->getFullName(), $this->questionnaire['title']),
"questionnaire_" . $this->questionnaire->getId(),
$this->questionnaire->user_id,
URLHelper::getURL('dispatch.php/questionnaire/evaluate/' . $this->questionnaire->id, [], true),
sprintf(_("%s hat an der Befragung '%s' teilgenommen."), $GLOBALS['user']->getFullName(), $this->questionnaire->title),
"questionnaire_" . $this->questionnaire->id,
Icon::create('vote'),
true
);
restoreLanguage();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment