Skip to content
Snippets Groups Projects
Commit 8256ea79 authored by Devin Zuczek's avatar Devin Zuczek Committed by Devin Zuczek
Browse files

Issue #2387701 by djdevin, busboy: Questions removed from list when user does not have node access

parent 6d4bbd17
No related branches found
No related tags found
No related merge requests found
......@@ -1071,10 +1071,9 @@ function quiz_questions_form_validate($form, $form_state) {
list($nid, $vid) = explode('-', $id, 2);
// If a node isn't one of the questionstypes we remove it from the question list
$has_questions = (Boolean) db_select('node', 'n')
$has_questions = (bool) db_select('node', 'n')
->fields('n', array('nid'))
->condition('type', $question_types, 'IN')
->addTag('node_access')
->condition('n.nid', $nid)
->execute()
->fetchField();
......
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