Use api_is_allowed_in_course() instead of variable set in local.inc

pull/2487/head
jmontoyaa 8 years ago
parent 3025c3ae51
commit 7d02344054
  1. 2
      main/blog/blog_admin.php
  2. 2
      main/document/create_audio.php
  3. 2
      main/document/create_document.php
  4. 2
      main/document/create_draw.php
  5. 2
      main/document/create_paint.php
  6. 2
      main/document/record_audio.php
  7. 2
      main/document/webcam_clip.php
  8. 2
      main/group/group_overview.php
  9. 2
      main/user/user.php

@ -19,7 +19,7 @@ $blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT);
api_protect_course_script(true);
// ONLY USERS REGISTERED IN THE COURSE
if ((!$is_allowed_in_course || !$is_courseMember) && !api_is_allowed_to_edit()) {
if ((!api_is_allowed_in_course() || !$is_courseMember) && !api_is_allowed_to_edit()) {
api_not_allowed(true);//print headers/footers
}

@ -98,7 +98,7 @@ $interbreadcrumb[] = array(
"name" => get_lang('Documents')
);
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

@ -217,7 +217,7 @@ if (!$is_certificate_mode) {
$interbreadcrumb[]= array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
}
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

@ -90,7 +90,7 @@ $interbreadcrumb[] = array(
"name" => get_lang('Documents')
);
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

@ -94,7 +94,7 @@ $interbreadcrumb[] = array(
"name" => get_lang('Documents'),
);
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

@ -80,7 +80,7 @@ if (!empty($groupId)) {
$interbreadcrumb[] = array("url" => "./document.php?id=".$document_id.'&'.api_get_cidreq(), "name" => get_lang('Documents'));
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

@ -82,7 +82,7 @@ if (!empty($groupId)) {
$interbreadcrumb[] = array ("url" => "./document.php?id=".$document_id."&".api_get_cidreq(), "name" => get_lang('Documents'));
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

@ -67,7 +67,7 @@ if (isset($_GET['action'])) {
$interbreadcrumb[] = array('url' => 'group.php?'.api_get_cidreq(), 'name' => get_lang('Groups'));
if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') {
// So we are not in learnpath tool
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}
if (!api_is_allowed_to_edit(false, true)) {

@ -447,7 +447,7 @@ if (api_is_allowed_to_edit(null, true)) {
}
// $is_allowed_in_course is first defined in local.inc.php
if (!$is_allowed_in_course) {
if (!api_is_allowed_in_course()) {
api_not_allowed(true);
}

Loading…
Cancel
Save