Block page if config is not set + format code

pull/3357/head
Julio Montoya 5 years ago
parent b7e740753e
commit 76155eab0a
  1. 2
      main/lp/learnpath.class.php
  2. 4
      main/work/publications.php
  3. 6
      main/work/work.lib.php

@ -6568,7 +6568,7 @@ class learnpath
/** /**
* This function builds the action menu. * This function builds the action menu.
* *
* @param bool $returnString Optional * @param bool $returnString Optional
* @param bool $showRequirementButtons Optional. Allow show the requirements button * @param bool $showRequirementButtons Optional. Allow show the requirements button
* @param bool $isConfigPage Optional. If is the config page, show the edit button * @param bool $isConfigPage Optional. If is the config page, show the edit button
* @param bool $allowExpand Optional. Allow show the expand/contract button * @param bool $allowExpand Optional. Allow show the expand/contract button

@ -7,6 +7,10 @@ $cidReset = true;
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
require_once 'work.lib.php'; require_once 'work.lib.php';
if (false === api_get_configuration_value('allow_my_student_publication_page')) {
api_not_allowed(true);
}
api_block_anonymous_users(); api_block_anonymous_users();
$htmlHeadXtra[] = api_get_jqgrid_js(); $htmlHeadXtra[] = api_get_jqgrid_js();

@ -1412,8 +1412,12 @@ function getAllWorkListStudent(
) { ) {
$workTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION); $workTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
$workTableAssignment = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT); $workTableAssignment = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);
$userId = api_get_user_id(); $userId = api_get_user_id();
if (empty($userId)) {
return [];
}
$courses = CourseManager::get_courses_list_by_user_id($userId, true); $courses = CourseManager::get_courses_list_by_user_id($userId, true);
if (!empty($where_condition)) { if (!empty($where_condition)) {

Loading…
Cancel
Save