Skip to content
Permalink
Browse files

Add setting "block_student_publication_add_documents" BT#14986

Block "add documents" in student publication feature
  • Loading branch information...
jmontoyaa committed Oct 22, 2018
1 parent c8980da commit 501dcbe38a6069a96e6159068e7e488077397673
Showing with 13 additions and 2 deletions.
  1. +3 −0 main/install/configuration.dist.php
  2. +5 −0 main/work/add_document.php
  3. +5 −2 main/work/work_list_all.php
@@ -978,6 +978,9 @@
// Block student publication edition BT#14985
// $_configuration['block_student_publication_edition'] = false;
// Block student publication add documents BT#14986
//$_configuration['block_student_publication_add_documents'] = false;
// Enable system to manage e-mail templates in users registration forms
/*CREATE TABLE mail_template(
id int not null primary key auto_increment,
@@ -14,6 +14,11 @@
api_not_allowed(true);
}
$blockAddDocuments = api_get_configuration_value('block_student_publication_add_documents');
if ($blockAddDocuments) {
api_not_allowed(true);
}
$my_folder_data = get_work_data_by_id($workId);
if (empty($my_folder_data)) {
api_not_allowed(true);
@@ -169,8 +169,11 @@
Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_session_edit(false, true) && !empty($workId) && !$isDrhOfCourse) {
$actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_document.php?'.api_get_cidreq().'&id='.$workId.'">';
$actionsLeft .= Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM).'</a>';
$blockAddDocuments = api_get_configuration_value('block_student_publication_add_documents');
if (!$blockAddDocuments) {
$actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_document.php?'.api_get_cidreq().'&id='.$workId.'">';
$actionsLeft .= Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM).'</a>';
}
$actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_user.php?'.api_get_cidreq().'&id='.$workId.'">';
$actionsLeft .= Display::return_icon('addworkuser.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).'</a>';

0 comments on commit 501dcbe

Please sign in to comment.
You can’t perform that action at this time.