diff --git a/app/controllers/questionnaire.php b/app/controllers/questionnaire.php index f407c071a2da81e0c9513caae53c4366aa68d141..895dd16743eb5c5e635cc82ba1e11212874776a6 100644 --- a/app/controllers/questionnaire.php +++ b/app/controllers/questionnaire.php @@ -622,7 +622,7 @@ class QuestionnaireController extends AuthenticatedController if ($one->isStopped() && $one->resultsVisible()) { $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]); continue; } diff --git a/lib/models/Questionnaire.php b/lib/models/Questionnaire.php index 486db17b9d0b170083995197f935bac41ad7b955..7483483df59b35c4963af70daf30dedee260b4fd 100644 --- a/lib/models/Questionnaire.php +++ b/lib/models/Questionnaire.php @@ -85,6 +85,9 @@ class Questionnaire extends SimpleORMap implements PrivacyObject if ($this->isEditable()) { return true; } + if (!$this->isStarted()) { + return false; + } foreach ($this->assignments as $assignment) { if ($assignment['range_id'] === "public") { return true;