Skip to content

Commit

Permalink
Validate access to teachers when show question - refs BT#11562
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Oct 4, 2016
1 parent 260ea62 commit cbb5dff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main/inc/ajax/exercise.ajax.php
Expand Up @@ -505,6 +505,13 @@
echo 'ok';
break;
case 'show_question':
$isAllowedToEdit = api_is_allowed_to_edit(null, true, false, false);

if (!$isAllowedToEdit) {
api_not_allowed(true);
exit;
}

$questionId = isset($_GET['question']) ? intval($_GET['question']) : 0;
$exerciseId = isset($_REQUEST['exercise']) ? intval($_REQUEST['exercise']) : 0;

Expand Down

0 comments on commit cbb5dff

Please sign in to comment.