When hidden course tools we also block the access to the page with a api_not_allowed a new variables is needed: $current_course_tool = TOOL_ATTENDANCE; see BT#4138. Admins have access everywhere

skala
Julio Montoya 14 years ago
parent 63c4cd173c
commit 5a453927dd
  1. 1
      main/announcements/announcements.php
  2. 3
      main/attendance/index.php
  3. 3
      main/blog/blog.php
  4. 1
      main/blog/blog_admin.php
  5. 2
      main/calendar/agenda.php
  6. 2
      main/calendar/agenda_js.php
  7. 3
      main/chat/chat.php
  8. 1
      main/course_description/index.php
  9. 2
      main/course_info/delete_course.php
  10. 4
      main/course_info/infocours.php
  11. 5
      main/course_info/maintenance.php
  12. 2
      main/course_progress/index.php
  13. 6
      main/coursecopy/backup.php
  14. 3
      main/coursecopy/copy_course.php
  15. 3
      main/coursecopy/copy_course_session.php
  16. 2
      main/coursecopy/create_backup.php
  17. 2
      main/coursecopy/import_backup.php
  18. 3
      main/coursecopy/recycle_course.php
  19. 3
      main/document/document.php
  20. 3
      main/dropbox/dropbox_init.inc.php
  21. 5
      main/exercice/admin.php
  22. 2
      main/exercice/exercice.php
  23. 1
      main/exercice/exercise_submit.php
  24. 1
      main/exercice/overview.php
  25. 2
      main/forum/index.php
  26. 1
      main/forum/viewforum.php
  27. 1
      main/forum/viewthread.php
  28. 2
      main/glossary/index.php
  29. 3
      main/gradebook/gradebook_add_eval.php
  30. 3
      main/gradebook/gradebook_add_link.php
  31. 3
      main/gradebook/gradebook_add_link_select_course.php
  32. 3
      main/gradebook/gradebook_add_result.php
  33. 4
      main/gradebook/gradebook_display_certificate.php
  34. 4
      main/gradebook/gradebook_edit_all.php
  35. 4
      main/gradebook/gradebook_flatview.php
  36. 3
      main/gradebook/index.php
  37. 1
      main/group/group.php
  38. 7
      main/group/group_category.php
  39. 4
      main/group/group_creation.php
  40. 4
      main/group/group_edit.php
  41. 7
      main/group/group_overview.php
  42. 5
      main/group/group_space.php
  43. 11
      main/inc/lib/course_home.lib.php
  44. 20
      main/inc/lib/main_api.lib.php
  45. 2
      main/link/link.php
  46. 1
      main/newscorm/lp_controller.php
  47. 5
      main/notebook/index.php
  48. 3
      main/survey/survey.php
  49. 4
      main/survey/survey_list.php
  50. 3
      main/user/subscribe_user.php
  51. 2
      main/user/user.php
  52. 10
      main/wiki/index.php
  53. 3
      main/work/download.php
  54. 9
      main/work/downloadfolder.inc.php
  55. 2
      main/work/view.php
  56. 9
      main/work/work.php

@ -24,6 +24,7 @@ $use_anonymous = true;
// setting the global file that gets the general configuration, the databases, the languages, ...
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_ANNOUNCEMENT;
$this_section=SECTION_COURSES;
$nameTools = get_lang('ToolAnnouncement');

@ -18,10 +18,11 @@ require_once api_get_path(LIBRARY_PATH).'attendance.lib.php';
require_once api_get_path(LIBRARY_PATH).'app_view.php';
require_once api_get_path(LIBRARY_PATH).'ezpdf/class.ezpdf.php';
require_once 'attendance_controller.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/gradebook_functions.inc.php';
require_once api_get_path(SYS_CODE_PATH).'gradebook/lib/fe/exportgradebook.php';
$current_course_tool = TOOL_ATTENDANCE;
// current section
$this_section = SECTION_COURSES;

@ -13,7 +13,8 @@ $language_file = "blog";
$blog_id = intval($_GET['blog_id']);
require_once '../inc/global.inc.php';
$this_section=SECTION_COURSES;
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_BLOGS;
/* ACCESS RIGHTS */

@ -12,6 +12,7 @@
$language_file = 'blog';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_BLOGS;
$this_section = SECTION_COURSES;

@ -12,8 +12,8 @@ $language_file = array('agenda','group');
// use anonymous mode when accessing this course tool
$use_anonymous = true;
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_CALENDAR_EVENT;
api_protect_course_script(true);

@ -17,6 +17,8 @@ require_once '../inc/global.inc.php';
require_once 'agenda.lib.php';
require_once 'agenda.inc.php';
$current_course_tool = TOOL_CALENDAR_EVENT;
$htmlHeadXtra[] = api_get_jquery_libraries_js(array('jquery-ui','jquery-ui-i18n'));
$htmlHeadXtra[] = api_get_js('qtip2/jquery.qtip.min.js');
$htmlHeadXtra[] = api_get_js('fullcalendar/fullcalendar.min.js');

@ -9,8 +9,9 @@
*/
$language_file = array('chat');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_CHAT;
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
$this_section = SECTION_COURSES;
$nameTools = get_lang('ToolChat');

@ -12,6 +12,7 @@ $language_file = array ('course_description', 'pedaSuggest', 'accessibility');
// including files
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_DESCRIPTION;
require_once api_get_path(LIBRARY_PATH).'course_description.lib.php';
require_once api_get_path(LIBRARY_PATH).'app_view.php';

@ -18,6 +18,8 @@ require_once '../inc/global.inc.php';
require_once '../gradebook/lib/be/gradebookitem.class.php';
require_once '../gradebook/lib/be/category.class.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
$current_course_code = $_course['official_code'];
$current_course_name = $_course['name'];

@ -19,6 +19,7 @@
// Language files that need to be included
$language_file = array('create_course', 'course_info', 'admin');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_SETTING;
$this_section = SECTION_COURSES;
$nameTools = get_lang('ModifInfo');
@ -27,6 +28,9 @@ $nameTools = get_lang('ModifInfo');
require_once api_get_path(INCLUDE_PATH).'conf/course_info.conf.php';
require_once api_get_path(LIBRARY_PATH).'pdf.lib.php';
api_protect_course_script(true);
api_block_anonymous_users();
/* Constants and variables */
define('MODULE_HELP_NAME', 'Settings');
define('COURSE_CHANGE_PROPERTIES', 'COURSE_CHANGE_PROPERTIES');

@ -10,11 +10,14 @@
// Language files that need to be included
$language_file = array('admin','create_course', 'course_info', 'coursebackup');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
$this_section = SECTION_COURSES;
$nameTools = get_lang('Maintenance');
api_protect_course_script(true);
api_block_anonymous_users();
Display :: display_header($nameTools);
echo Display::page_header($nameTools);

@ -23,6 +23,8 @@ require_once 'thematic_controller.php';
// current section
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_COURSE_PROGRESS;
// protect a course script
api_protect_course_script(true);

@ -13,7 +13,11 @@
$language_file = array('exercice', 'coursebackup', 'admin');
// Including the global initialization file
require '../inc/global.inc.php';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
api_block_anonymous_users();
// Check access rights (only teachers allowed)
if (!api_is_allowed_to_edit()) {

@ -11,6 +11,9 @@ $language_file = array('exercice', 'coursebackup', 'admin');
// Setting the global file that gets the general configuration, the databases, the languages, ...
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
// Including additional libraries
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';

@ -17,6 +17,9 @@ $language_file = array('coursebackup', 'admin');
$cidReset = true;
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
require_once api_get_path(LIBRARY_PATH).'fileManage.lib.php';
require_once api_get_path(LIBRARY_PATH).'xajax/xajax.inc.php';

@ -14,6 +14,8 @@ $language_file = array('exercice', 'admin', 'coursebackup');
// Including the global initialization file
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
// Check access rights (only teachers are allowed here)
if (!api_is_allowed_to_edit()) {

@ -16,6 +16,8 @@ $language_file = array('exercice', 'coursebackup', 'admin');
// Including the global initialization file
require '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
// Check access rights (only teachers are allowed here)
if (!api_is_allowed_to_edit()) {

@ -14,6 +14,9 @@ $language_file = array ('exercice', 'admin', 'course_info', 'coursebackup');
// Including the global initialization file
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
api_protect_course_script(true);
// Check access rights (only teachers are allowed here)
if (!api_is_allowed_to_edit()) {

@ -34,10 +34,11 @@
// Language files that need to be included
$language_file = array('document', 'slideshow', 'gradebook', 'create_course');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_DOCUMENT;
$this_section = SECTION_COURSES;
require_once 'document.inc.php';
$lib_path = api_get_path(LIBRARY_PATH);

@ -35,8 +35,7 @@ $language_file = 'dropbox';
// including the basic Chamilo initialisation file
require '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'security.lib.php';
$current_course_tool = TOOL_DROPBOX;
// the dropbox configuration parameters
require_once 'dropbox_config.inc.php';

@ -56,8 +56,11 @@ $language_file = 'exercice';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$current_course_tool = TOOL_QUIZ;
$this_section = SECTION_COURSES;
$this_section=SECTION_COURSES;
// Access control
api_protect_course_script(true);
$is_allowedToEdit = api_is_allowed_to_edit(null,true);

@ -17,6 +17,8 @@ $language_file = array('exercice','tracking');
// including the global library
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_QUIZ;
require_once '../gradebook/lib/be.inc.php';
// Setting the tabs

@ -37,6 +37,7 @@ $debug = 1; //debug value is set in the exercise.class.php file
$language_file = 'exercice';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_QUIZ;
require_once 'exercise.lib.php';
$this_section = SECTION_COURSES;

@ -13,6 +13,7 @@ $language_file = 'exercice';
require_once 'exercise.class.php';
require_once '../inc/global.inc.php';
require_once 'exercise.lib.php';
$current_course_tool = TOOL_QUIZ;
// Clear the exercise session just in case
if (isset ($_SESSION['objExercise'])) {

@ -29,7 +29,7 @@ $language_file = 'forum';
// Including the global initialization file.
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_FORUM;
$htmlHeadXtra[] = '<script type="text/javascript">
$(document).ready(function(){ $(\'.hide-me\').slideUp() });

@ -27,6 +27,7 @@ $language_file = array('forum', 'group');
// Including the global initialization file.
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_FORUM;
// Notification for unauthorized people.
api_protect_course_script(true);

@ -11,6 +11,7 @@ $language_file = array ('forum', 'group');
// Including the global initialization file.
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_FORUM;
// The section (tabs.)
$this_section = SECTION_COURSES;

@ -15,6 +15,8 @@ require_once api_get_path(LIBRARY_PATH).'glossary.lib.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'import.lib.php';
$current_course_tool = TOOL_GLOSSARY;
// The section (tabs).
$this_section = SECTION_COURSES;

@ -12,6 +12,9 @@ require_once '../inc/global.inc.php';
require_once 'lib/be.inc.php';
require_once 'lib/gradebook_functions.inc.php';
require_once 'lib/fe/evalform.class.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
api_block_anonymous_users();
block_students();

@ -15,6 +15,9 @@ require_once 'lib/gradebook_functions.inc.php';
require_once 'lib/fe/linkform.class.php';
require_once 'lib/fe/linkaddeditform.class.php';
require_once '../forum/forumfunction.inc.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
api_block_anonymous_users();
block_students();

@ -14,6 +14,9 @@ require_once '../inc/global.inc.php';
require_once 'lib/be.inc.php';
require_once 'lib/gradebook_functions.inc.php';
require_once 'lib/fe/catform.class.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
api_block_anonymous_users();
block_students();

@ -15,6 +15,9 @@ require_once 'lib/gradebook_functions.inc.php';
require_once 'lib/fe/evalform.class.php';
require_once 'lib/fe/displaygradebook.php';
require_once 'lib/scoredisplay.class.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
api_block_anonymous_users();
block_students();

@ -11,6 +11,10 @@
$language_file = 'gradebook';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
require_once 'lib/gradebook_functions.inc.php';
require_once 'lib/be.inc.php';
require_once 'lib/gradebook_data_generator.class.php';

@ -12,6 +12,10 @@ $language_file= 'gradebook';
$cidReset= true;
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
require_once 'lib/be.inc.php';
require_once 'lib/scoredisplay.class.php';

@ -10,6 +10,10 @@
$language_file = 'gradebook';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
require_once 'lib/be.inc.php';
require_once 'lib/fe/dataform.class.php';
require_once 'lib/fe/userform.class.php';

@ -10,6 +10,9 @@ $language_file= 'gradebook';
$cidReset= false;
$_in_course = true;
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_GRADEBOOK;
api_protect_course_script();
$course_code = api_get_course_id();
$stud_id = api_get_user_id();

@ -20,6 +20,7 @@ $language_file = 'group';
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GROUP;
// Notice for unauthorized people.
api_protect_course_script(true);

@ -10,8 +10,13 @@ $language_file = 'group';
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GROUP;
// Notice for unauthorized people.
api_protect_course_script(true);
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
if (!api_is_allowed_to_edit(false,true) || !(isset ($_GET['id']) || isset ($_POST['id']) || isset ($_GET['action']) || isset ($_POST['action']))) {
api_not_allowed();
}

@ -12,6 +12,10 @@ $language_file = 'group';
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GROUP;
// Notice for unauthorized people.
api_protect_course_script(true);
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'classmanager.lib.php';

@ -18,6 +18,10 @@ $language_file = 'group';
require '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GROUP;
// Notice for unauthorized people.
api_protect_course_script(true);
/* Libraries & settings */

@ -21,12 +21,15 @@ $language_file = 'group';
require '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_GROUP;
// Notice for unauthorized people.
api_protect_course_script(true);
$nameTools = get_lang('GroupOverview');
/* Libraries */
include_once api_get_path(LIBRARY_PATH).'course.lib.php';
include_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
include_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
@ -126,4 +129,4 @@ foreach ($categories as $index => $category) {
if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath') {
Display::display_footer();
}
}

@ -15,6 +15,11 @@
$language_file = 'group';
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_GROUP;
// Notice for unauthorized people.
api_protect_course_script(true);
/* Libraries & config files */

@ -465,20 +465,25 @@ class CourseHome {
$list = api_get_settings('Tools','list', api_get_current_access_url_id());
$hide_list = array();
$check = false;
foreach ($list as $line) {
//Admin can see all tools even if the course_hide_tools configuration is set
if ($is_platform_admin) {
continue;
}
if ($line['variable'] == 'course_hide_tools' and $line['selected_value'] == 'true') {
$hide_list[] = $line['subkey'];
$check = true;
}
}
while ($temp_row = Database::fetch_assoc($result)) {
if ($check) {
if (!in_array($temp_row['name'],$hide_list)) {
if (!in_array($temp_row['name'], $hide_list)) {
$all_tools_list[] = $temp_row;
} else {
}
} else {
$all_tools_list[] = $temp_row;
$all_tools_list[] = $temp_row;
}
}

@ -725,14 +725,15 @@ function api_valid_email($address) {
* @author Roan Embrechts
*/
function api_protect_course_script($print_headers = false) {
global $is_allowed_in_course;
global $is_allowed_in_course, $current_course_tool;
$is_visible = false;
if (api_is_platform_admin()) {
return true;
}
$course_info = api_get_course_info();
if (isset($course_info) && !empty($course_info['visibility'])) {
switch($course_info['visibility']) {
switch ($course_info['visibility']) {
default:
case 0: //Completely closed: the course is only accessible to the teachers.
if (api_get_user_id() && !api_is_anonymous() && (api_is_allowed_to_edit())) {
@ -753,7 +754,19 @@ function api_protect_course_script($print_headers = false) {
$is_visible = true;
break;
}
}
}
//Check tool visibility: check the course_hide_tools variable in the settings_current table
if ($is_visible == true) {
if (!empty($current_course_tool)) {
$tool_visibility = api_get_setting('course_hide_tools', $current_course_tool);
if (!empty($tool_visibility)) {
if ($tool_visibility == 'true') {
$is_visible = false;
}
}
}
}
if (!$is_visible) {
api_not_allowed($print_headers);
@ -5721,3 +5734,4 @@ function api_grading_model_functions($grading_model, $action = 'to_array') {
}
return $return;
}

@ -26,6 +26,8 @@ $language_file = array('link', 'admin');
// Including libraries
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_LINK;
require_once api_get_path(LIBRARY_PATH).'link.lib.php';
$this_section = SECTION_COURSES;

@ -28,6 +28,7 @@ $language_file[] = 'exercice';
// Including the global initialization file.
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_LEARNPATH;
if (api_get_setting('show_glossary_in_documents') == 'ismanual' || api_get_setting('show_glossary_in_documents') == 'isautomatic' ) {
$htmlHeadXtra[] = '<script type="text/javascript">

@ -14,6 +14,8 @@ $language_file = array('notebook');
// Including the global initialization file
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_NOTEBOOK;
require_once api_get_path(LIBRARY_PATH).'notebook.lib.php';
// The section (tabs)
@ -22,9 +24,6 @@ $this_section = SECTION_COURSES;
// Notice for unauthorized people.
api_protect_course_script(true);
// Including additional libraries
require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
// Additional javascript
$htmlHeadXtra[] = NotebookManager::javascript_notebook();
$htmlHeadXtra[] = '<script type="text/javascript">

@ -17,6 +17,9 @@ $language_file = 'survey';
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_SURVEY;
api_protect_course_script(true);
// Including additional libraries
require_once 'survey.lib.php';

@ -21,10 +21,12 @@ if (!isset ($_GET['cidReq'])){
// Including the global initialization file
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_SURVEY;
api_protect_course_script(true);
// Including additional libraries
require_once 'survey.lib.php';
require_once api_get_path(LIBRARY_PATH).'course.lib.php';
// Tracking
event_access_tool(TOOL_SURVEY);

@ -10,12 +10,13 @@
*/
// name of the language file that needs to be included
$language_file = array('registration','admin');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_USER;
// the section (for the tabs)
$this_section = SECTION_COURSES;
// notice for unauthorized people.
api_protect_course_script(true);

@ -26,8 +26,10 @@
$language_file = array('registration', 'admin', 'userInfo');
$use_anonymous = true;
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_USER;
$this_section = SECTION_COURSES;
// notice for unauthorized people.
api_protect_course_script(true);

@ -18,6 +18,8 @@ require_once '../inc/global.inc.php';
// section (for the tabs)
$this_section = SECTION_COURSES;
$current_course_tool = TOOL_WIKI;
// including additional library scripts
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
@ -68,15 +70,11 @@ $session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id);
$course_id = api_get_course_int_id();
/*
ACCESS
*/
/* ACCESS */
api_protect_course_script();
api_block_anonymous_users();
/*
TRACKING
*/
/* TRACKING */
event_access_tool(TOOL_WIKI);
/*

@ -11,8 +11,9 @@
*/
session_cache_limiter('public');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_STUDENTPUBLICATION;
$this_section = SECTION_COURSES;
require_once api_get_path(LIBRARY_PATH).'document.lib.php';

@ -9,6 +9,11 @@
$work_id = $_GET['id'];
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_STUDENTPUBLICATION;
//protection
api_protect_course_script(true);
require_once 'work.lib.php';
$work_data = get_work_data_by_id($work_id);
@ -110,8 +115,6 @@ function my_pre_add_callback($p_event, &$p_header) {
return 0;
}
/**
* Return the difference between two arrays, as an array of those key/values
* Use this as array_diff doesn't give the
@ -130,4 +133,4 @@ function diff($arr1, $arr2) {
}
}
return $res;
}
}

@ -3,6 +3,8 @@
$language_file = array('exercice', 'work', 'document', 'admin');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_STUDENTPUBLICATION;
require_once 'work.lib.php';
$id = isset($_REQUEST['id']) ? intval($_REQUEST['id']) : null;

@ -44,6 +44,11 @@
$language_file = array('exercice', 'work', 'document', 'admin');
require_once '../inc/global.inc.php';
$current_course_tool = TOOL_STUDENTPUBLICATION;
/* Configuration settings */
api_protect_course_script(true);
// Including necessary files
require_once 'work.lib.php';
@ -124,10 +129,6 @@ $sys_course_path = api_get_path(SYS_COURSE_PATH);
$course_dir = $sys_course_path . $_course['path'];
$base_work_dir = $course_dir . '/work';
/* Configuration settings */
api_protect_course_script(true);
$link_target_parameter = ""; // e.g. "target=\"_blank\"";
$display_list_users_without_publication = isset($_GET['list']) && Security::remove_XSS($_GET['list']) == 'without' ? true : false;

Loading…
Cancel
Save