Skip to content
Snippets Groups Projects
Commit e667553d authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Resolve "Fragebögen zu früh sichtbar"

parent b68344ed
No related branches found
No related tags found
No related merge requests found
...@@ -622,7 +622,7 @@ class QuestionnaireController extends AuthenticatedController ...@@ -622,7 +622,7 @@ class QuestionnaireController extends AuthenticatedController
if ($one->isStopped() && $one->resultsVisible()) { if ($one->isStopped() && $one->resultsVisible()) {
$stopped_visible++; $stopped_visible++;
} }
if ($one->isStopped() && (!$one->resultsVisible() || !Request::get("questionnaire_showall"))) { if (($one->isStopped() || !$one->isViewable()) && (!$one->resultsVisible() || !Request::get("questionnaire_showall"))) {
unset($this->questionnaire_data[$i]); unset($this->questionnaire_data[$i]);
continue; continue;
} }
......
...@@ -85,6 +85,9 @@ class Questionnaire extends SimpleORMap implements PrivacyObject ...@@ -85,6 +85,9 @@ class Questionnaire extends SimpleORMap implements PrivacyObject
if ($this->isEditable()) { if ($this->isEditable()) {
return true; return true;
} }
if (!$this->isStarted()) {
return false;
}
foreach ($this->assignments as $assignment) { foreach ($this->assignments as $assignment) {
if ($assignment['range_id'] === "public") { if ($assignment['range_id'] === "public") {
return true; return true;
......
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