Question manager can't manage extra question fields.

skala
Julio Montoya 13 years ago
parent 4b7a62ca60
commit b1d8d3baf0
  1. 8
      main/admin/extra_field_options.php
  2. 8
      main/admin/extra_field_workflow.php
  3. 8
      main/admin/extra_fields.php
  4. 5
      main/admin/index.php
  5. 6
      main/inc/services.php
  6. 1
      main/template/default/admin/questionmanager/questionmanager.tpl

@ -15,13 +15,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
if ($type == 'question') {
if (!(api_is_platform_admin() || api_is_question_manager())) {
api_not_allowed(true);
}
} else {
api_protect_admin_script();
}
api_protect_admin_script();
//Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();

@ -15,13 +15,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
$type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
if ($type == 'question') {
if (!(api_is_platform_admin() || api_is_question_manager())) {
api_not_allowed(true);
}
} else {
api_protect_admin_script();
}
api_protect_admin_script();
// setting breadcrumbs
$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));

@ -14,13 +14,7 @@ require_once '../inc/global.inc.php';
$extraFieldType = isset($_REQUEST['type']) ? $_REQUEST['type'] : null;
$this_section = SECTION_PLATFORM_ADMIN;
if ($extraFieldType == 'question') {
if (!(api_is_platform_admin() || api_is_question_manager())) {
api_not_allowed(true);
}
} else {
api_protect_admin_script();
}
api_protect_admin_script();
//Add the JS needed to use the jqgrid
$htmlHeadXtra[] = api_get_jqgrid_js();

@ -10,11 +10,6 @@
// Language files that need to be included.
$language_file = array('admin', 'tracking','coursebackup');
/*
if (api_is_question_manager()) {
header('Location: '.api_get_path(WEB_PUBLIC_PATH).'admin/questionmanager');
exit;
}*/
// Setting the section (for the tabs).
$this_section = SECTION_PLATFORM_ADMIN;

@ -104,9 +104,9 @@ $app['security.role_hierarchy'] = array(
$app['security.access_rules'] = array(
//array('^/admin', 'ROLE_ADMIN', 'https'),
array('^/admin/administrator', 'ROLE_ADMIN'),
array('^/main/admin/extra_fields.php', 'ROLE_QUESTION_MANAGER'),
array('^/main/admin/extra_field_options.php', 'ROLE_QUESTION_MANAGER'),
array('^/main/admin/extra_field_workflow.php', 'ROLE_QUESTION_MANAGER'),
//array('^/main/admin/extra_fields.php', 'ROLE_QUESTION_MANAGER'),
//array('^/main/admin/extra_field_options.php', 'ROLE_QUESTION_MANAGER'),
//array('^/main/admin/extra_field_workflow.php', 'ROLE_QUESTION_MANAGER'),
array('^/main/admin/.*', 'ROLE_ADMIN'),
array('^/admin/questionmanager', 'ROLE_QUESTION_MANAGER'),
array('^/main/.*', array('ROLE_STUDENT'))

@ -9,7 +9,6 @@
<a href="{{ url('admin_questions') }}">
{{ 'Questions' | get_lang }}</a>
</li>
<li><a href="{{ _p.web }}main/admin/extra_fields.php?type=question">{{ 'ExtraFields' | get_lang }}</a></li>
<li><a href="{{ url('admin_category_new')}}">{{ 'AddACategory' | get_lang }}</a></li>
</ul>

Loading…
Cancel
Save