Quiz Import Permissions Problem

mattf10
Forums
There is a problem with quiz import permissions always showing "Access Denied". This is true for User 1 too. Steps to recreate: Create new course (http://dev.opigno.org/course/3449/testing-quiz-import-permissions) as Administrator. Settings: select Quiz Import under Course Tools. Add user: Teacher with Manager and Teacher roles. Log in as teacher, access the course and click the "Quiz Import" icon. Takes you to this page: http://dev.opigno.org/node/3449/import-quiz with message "Access Denied". This is also true when you try to access the same page as Administrator. I discovered this problem with my local install, but since it's happening on your demo site, it appears to be a bug in the system. Please advise. Thanks
James Aparicio

Hi mattf10

Hi mattf10

We are aware of this. We will fix it on our next release.

In the meanwhile, inside the opigno_quiz_import_app.module in the function opigno_quiz_import_app_menu you can replace:

 

'node/%/import-quiz' => array(     'title' => 'Import Quiz',

      'access_arguments' => isset($node) ? array('node', $node->nid, 'import quiz questions xls') : array('import quiz questions xls'),

'access_callback' => isset($node) ? 'og_user_access' : 'user_access',

      'page callback' => 'drupal_get_form',      'page arguments' => array('opigno_quiz_import_app_import_form', 1),    ), by 

'node/%/import-quiz' => array(     'title' => 'Import Quiz',

      'access arguments' => array('node', 1, 'import quiz questions xls'),      'access callback' => 'og_user_access',      'page callback' => 'drupal_get_form',      'page arguments' => array('opigno_quiz_import_app_import_form', 1),    ),  Best regards 
mattf10

Great - thanks for the quick

Great - thanks for the quick response.