Skip to content

Commit

Permalink
Fix comment question permission check
Browse files Browse the repository at this point in the history
Comment questions were being created with no context because we were
checking the wrong permission
  • Loading branch information
gormster committed Nov 22, 2019
1 parent 1b3e34b commit 62b93c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local/teameval/question/comment/classes/question.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function context_data(renderer_base $output, $locked = false) {
$context->editingcontext = $this->edit_form_data();
$context->editinglocked = $this->any_response_submitted();
$context->submissioncontext = $this->submission_view($locked)->export_for_template($output);
} else if (team_evaluation::check_capability($this->teameval, ['local/teameval:createquestionnaire'], ['doanything' => false])) {
} else if (team_evaluation::check_capability($this->teameval, ['local/teameval:submitquestionnaire'], ['doanything' => false])) {
$context->submissioncontext = $this->submission_view($locked)->export_for_template($output);
}

Expand Down

0 comments on commit 62b93c5

Please sign in to comment.