Block page if config is not set + format code

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

@ -7,6 +7,10 @@ $cidReset = true;
require_once __DIR__.'/../inc/global.inc.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();
$htmlHeadXtra[] = api_get_jqgrid_js();

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

Loading…
Cancel
Save