Minor - merge from 1.11.x

pull/2487/head
jmontoyaa 8 years ago
parent 43175468f0
commit f7db318ca4
  1. 7
      main/admin/add_users_to_usergroup.php
  2. 12
      main/admin/career_diagram.php
  3. 6
      main/admin/configure_homepage.php
  4. 2
      main/admin/example.csv
  5. 2
      main/admin/example_class.csv
  6. 2
      main/admin/example_session.csv
  7. 8
      main/admin/index.php
  8. 2
      main/admin/ldap_import_students_to_session.php
  9. 11
      main/admin/skill.php
  10. 2
      main/admin/skill_example.csv
  11. 60
      main/admin/skill_level.php
  12. 54
      main/admin/skill_profile.php
  13. 2
      main/admin/user_edit.php
  14. 23
      main/admin/user_import.php
  15. 18
      main/announcements/announcements.php

@ -88,7 +88,6 @@ function change_select(val) {
</script>'; </script>';
$form_sent = 0; $form_sent = 0;
$extra_field_list = UserManager::get_extra_fields(); $extra_field_list = UserManager::get_extra_fields();
$new_field_list = []; $new_field_list = [];
if (is_array($extra_field_list)) { if (is_array($extra_field_list)) {
@ -124,12 +123,14 @@ if (isset($_POST['form_sent']) && $_POST['form_sent']) {
// If "social group" you need to select a role // If "social group" you need to select a role
if ($groupInfo['group_type'] == 1 && empty($relation)) { if ($groupInfo['group_type'] == 1 && empty($relation)) {
Display::addFlash(Display::return_message(get_lang('SelectRole'))); Display::addFlash(Display::return_message(get_lang('SelectRole'), 'warning'));
header('Location: '.api_get_self().'?id='.$id);
exit;
} }
if ($form_sent == 1) { if ($form_sent == 1) {
Display::addFlash(Display::return_message(get_lang('Updated'))); Display::addFlash(Display::return_message(get_lang('Updated')));
//added a parameter to send emails when registering a user // Added a parameter to send emails when registering a user
$usergroup->subscribe_users_to_usergroup( $usergroup->subscribe_users_to_usergroup(
$id, $id,
$elements_posted, $elements_posted,

@ -107,14 +107,16 @@ $tpl = new Template(get_lang('Diagram'));
$html = Display::page_subheader2($careerInfo['name'].$urlToString); $html = Display::page_subheader2($careerInfo['name'].$urlToString);
if (!empty($item) && isset($item['value']) && !empty($item['value'])) { if (!empty($item) && isset($item['value']) && !empty($item['value'])) {
$graph = unserialize($item['value']); $graph = unserialize($item['value']);
$html .= Career::renderDiagram($careerInfo, $graph); $html .= Career::renderDiagramByColumn($graph, $tpl);
} else { } else {
Display::addFlash( Display::addFlash(
Display::return_message( Display::return_message(
sprintf(get_lang('CareerXDoesntHaveADiagram'), $careerInfo['name']), sprintf(get_lang('CareerXDoesntHaveADiagram'), $careerInfo['name']),
'warning' 'warning'
) )
); );
} }
$tpl->assign('content', $html); $tpl->assign('content', $html);
$tpl->display_one_col_template(); $layout = $tpl->get_template('career/diagram.tpl');
$tpl->display($layout);

@ -1010,10 +1010,10 @@ switch ($action) {
<div class="col-md-3"> <div class="col-md-3">
<!-- login block --> <!-- login block -->
<div id="login_block" class="panel panel-default"> <div id="login-block" class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<?php echo api_display_language_form(); ?> <?php echo api_display_language_form(false, true); ?>
<form id="formLogin" class="form-horizontal"> <form id="form-login" class="form-horizontal">
<div class="input-group"> <div class="input-group">
<div class="input-group-addon"><em class="fa fa-user"></em></div> <div class="input-group-addon"><em class="fa fa-user"></em></div>
<input class="form-control" type="text" id="login" value="" disabled="disabled"/> <input class="form-control" type="text" id="login" value="" disabled="disabled"/>

@ -1,3 +1,3 @@
LastName;FirstName;Email;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;Courses LastName;FirstName;Email;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;Courses
Mcfly;Marty;marty@example.com;marty;secret;platform;12345678;001-123-456-789;user;COURSE1|COURSE2|COURSE3 Mcfly;Marty;marty@example.com;marty;secret;platform;12345678;001-123-456-789;user;COURSE1|COURSE2|COURSE3
Brown;Emmert;drbrown@example.net;emmert;;platform;;;teacher;COURSE2 Brown;Emmert;drbrown@example.net;emmert;;platform;;;teacher;COURSE2

1 LastName FirstName Email UserName Password AuthSource OfficialCode PhoneNumber Status Courses
2 Mcfly Marty marty@example.com marty secret platform 12345678 001-123-456-789 user COURSE1|COURSE2|COURSE3
3 Brown Emmert drbrown@example.net emmert platform teacher COURSE2

@ -1,3 +1,3 @@
name;description; name;description;
Class A4;20 students in general courses Class A4;20 students in general courses
Class B5;20 students from technical background Class B5;20 students from technical background

1 name;description;
2 Class A4;20 students in general courses
3 Class B5;20 students from technical background

@ -1,3 +1,3 @@
SessionName;Coach;DateStart;DateEnd;Users;Courses SessionName;Coach;DateStart;DateEnd;Users;Courses
Session1;jmontoya;2008/08/08;2020/12/12;username1|username2;course1[coach1][username1,username2]|course2[coach1][username1,username2] Session1;jmontoya;2008/08/08;2020/12/12;username1|username2;course1[coach1][username1,username2]|course2[coach1][username1,username2]
Session2;jmontoya;2008/08/08;2020/12/12;username1|username2;course1[coach1][username1,username2]|course2[coach1][username1,username2] Session2;jmontoya;2008/08/08;2020/12/12;username1|username2;course1[coach1][username1,username2]|course2[coach1][username1,username2]

1 SessionName Coach DateStart DateEnd Users Courses
2 Session1 jmontoya 2008/08/08 2020/12/12 username1|username2 course1[coach1][username1,username2]|course2[coach1][username1,username2]
3 Session2 jmontoya 2008/08/08 2020/12/12 username1|username2 course1[coach1][username1,username2]|course2[coach1][username1,username2]

@ -270,9 +270,17 @@ if (api_is_platform_admin()) {
} }
} }
if (api_get_plugin_setting('dictionary', 'enable_plugin_dictionary') == 'true') {
$items[] = [
'url' => api_get_path(WEB_PLUGIN_PATH).'dictionary/terms.php',
'label' => get_lang('Dictionary'),
];
}
if (api_get_setting('allow_terms_conditions') == 'true') { if (api_get_setting('allow_terms_conditions') == 'true') {
$items[] = ['url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions')]; $items[] = ['url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions')];
} }
$blocks['platform']['items'] = $items; $blocks['platform']['items'] = $items;
$blocks['platform']['extra'] = null; $blocks['platform']['extra'] = null;
} }

@ -14,7 +14,7 @@ require_once '../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN; $this_section = SECTION_PLATFORM_ADMIN;
// Access restrictions // Access restrictions
api_protect_admin_script(); api_protect_admin_script();
require('../auth/ldap/authldap.php'); require '../auth/ldap/authldap.php';
$annee_base = date('Y'); $annee_base = date('Y');

@ -66,14 +66,15 @@ switch ($action) {
$values = $form->exportValues(); $values = $form->exportValues();
$profile = $em->getRepository('ChamiloSkillBundle:Profile')->find($values['profile_id']); $profile = $em->getRepository('ChamiloSkillBundle:Profile')->find($values['profile_id']);
$item->setProfile($profile); if ($profile) {
$item->setProfile($profile);
$em->persist($item); $em->persist($item);
$em->flush(); $em->flush();
Display::addFlash(Display::return_message(get_lang('Updated')));
}
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
} }
break; break;
case 'delete': case 'delete':
$toolbarAction = Display::toolbarAction('toolbar', [Display::url(get_lang('List'), $listAction)]); $toolbarAction = Display::toolbarAction('toolbar', [Display::url(get_lang('List'), $listAction)]);

@ -1,4 +1,4 @@
id;parent_id;name;description id;parent_id;name;description
2;1;Reflection; 2;1;Reflection;
3;1;Manage learning; 3;1;Manage learning;
4;1;Information literacy; 4;1;Information literacy;

1 id parent_id name description
2 2 1 Reflection
3 3 1 Manage learning
4 4 1 Information literacy

@ -1,6 +1,8 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
use Chamilo\SkillBundle\Entity\Level;
/** /**
* Add a skill Level. * Add a skill Level.
* *
@ -27,14 +29,14 @@ $id = isset($_GET['id']) ? $_GET['id'] : '';
$item = null; $item = null;
if (!empty($id)) { if (!empty($id)) {
/** @var \Chamilo\SkillBundle\Entity\Level $item */ /** @var Level $item */
$item = $em->getRepository('ChamiloSkillBundle:Level')->find($id); $item = $em->getRepository('ChamiloSkillBundle:Level')->find($id);
if (!$item) { if (!$item) {
api_not_allowed(); api_not_allowed();
} }
} }
$form = new FormValidator('Level', 'GET', api_get_self().'?action='.$action.'&id='.$id); $form = new FormValidator('level', 'GET', api_get_self().'?action='.$action.'&id='.$id);
$form->addText('name', get_lang('Name')); $form->addText('name', get_lang('Name'));
$form->addText('short_name', get_lang('ShortName')); $form->addText('short_name', get_lang('ShortName'));
$form->addSelectFromCollection('profile_id', get_lang('Profile'), $profiles); $form->addSelectFromCollection('profile_id', get_lang('Profile'), $profiles);
@ -49,29 +51,37 @@ if (!empty($item)) {
'profile_id' => $item->getProfile()->getId(), 'profile_id' => $item->getProfile()->getId(),
]); ]);
} }
$formToDisplay = $form->returnForm();
$formToDisplay = '';
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')]; $interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('SkillProfile')]; $interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'admin/skill.php', 'name' => get_lang('ManageSkillsLevels')];
$interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('SkillLevel')];
$tpl = new Template($action);
switch ($action) { switch ($action) {
case 'add': case 'add':
$tpl->assign('form', $formToDisplay); $formToDisplay = $form->returnForm();
if ($form->validate()) { if ($form->validate()) {
$values = $form->exportValues(); $values = $form->exportValues();
$item = new \Chamilo\SkillBundle\Entity\Level(); if (isset($values['profile_id']) && !empty($values['profile_id'])) {
$item->setName($values['name']); $profile = $em->getRepository('ChamiloSkillBundle:Profile')->find($values['profile_id']);
$item->setShortName($values['short_name']); if ($profile) {
$profile = $em->getRepository('ChamiloSkillBundle:Profile')->find($values['profile_id']); $item = new Level();
$item->setProfile($profile); $item->setName($values['name']);
$item->setShortName($values['short_name']);
$em->persist($item); $item->setProfile($profile);
$em->flush(); $em->persist($item);
$em->flush();
Display::addFlash(Display::return_message(get_lang('Added')));
} else {
Display::addFlash(Display::return_message(get_lang('Added')));
}
} else {
Display::addFlash(Display::return_message(get_lang('YouNeedToCreateASkillProfile')));
}
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
} }
$toolbarAction = Display::url( $toolbarAction = Display::url(
Display::return_icon( Display::return_icon(
'list_badges.png', 'list_badges.png',
@ -84,7 +94,7 @@ switch ($action) {
); );
break; break;
case 'edit': case 'edit':
$tpl->assign('form', $formToDisplay); $formToDisplay = $form->returnForm();
$toolbarAction = Display::url( $toolbarAction = Display::url(
Display::return_icon( Display::return_icon(
'list_badges.png', 'list_badges.png',
@ -102,7 +112,9 @@ switch ($action) {
$item->setName($values['name']); $item->setName($values['name']);
$item->setShortName($values['short_name']); $item->setShortName($values['short_name']);
$profile = $em->getRepository('ChamiloSkillBundle:Profile')->find($values['profile_id']); $profile = $em->getRepository('ChamiloSkillBundle:Profile')->find($values['profile_id']);
$item->setProfile($profile); if ($profile) {
$item->setProfile($profile);
}
$em->persist($item); $em->persist($item);
$em->flush(); $em->flush();
@ -121,8 +133,11 @@ switch ($action) {
$listAction, $listAction,
['title' => get_lang('List')] ['title' => get_lang('List')]
); );
$em->remove($item); if ($item) {
$em->flush(); $em->remove($item);
$em->flush();
Display::addFlash(Display::return_message(get_lang('Deleted')));
}
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
@ -140,12 +155,11 @@ switch ($action) {
); );
} }
$tpl = new Template($action);
$tpl->assign('form', $formToDisplay);
$tpl->assign('list', $list); $tpl->assign('list', $list);
$templateName = $tpl->get_template('admin/skill_level.tpl'); $templateName = $tpl->get_template('admin/skill_level.tpl');
$contentTemplate = $tpl->fetch($templateName); $contentTemplate = $tpl->fetch($templateName);
$tpl->assign( $tpl->assign('actions', Display::toolbarAction('toolbar', [$toolbarAction]));
'actions',
Display::toolbarAction('toolbar', [$toolbarAction])
);
$tpl->assign('content', $contentTemplate); $tpl->assign('content', $contentTemplate);
$tpl->display_one_col_template(); $tpl->display_one_col_template();

@ -1,6 +1,9 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
use Chamilo\SkillBundle\Entity\Level;
use Chamilo\SkillBundle\Entity\Profile;
/** /**
* Add a skill Profile. * Add a skill Profile.
* *
@ -42,7 +45,7 @@ if (!empty($item)) {
$formToDisplay = $form->returnForm(); $formToDisplay = $form->returnForm();
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')]; $interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$interbreadcrumb[] = ['url' => 'skill.php', 'name' => get_lang('ManageSkillsLevels')]; $interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'admin/skill.php', 'name' => get_lang('ManageSkillsLevels')];
$interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('SkillProfile')]; $interbreadcrumb[] = ['url' => api_get_self(), 'name' => get_lang('SkillProfile')];
$toolbar = null; $toolbar = null;
@ -50,29 +53,32 @@ $toolbar = null;
$tpl = new Template($action); $tpl = new Template($action);
switch ($action) { switch ($action) {
case 'move_up': case 'move_up':
/** @var \Chamilo\SkillBundle\Entity\Level $item */ /** @var Level $item */
$item = $em->getRepository('ChamiloSkillBundle:Level')->find($_GET['level_id']); $item = $em->getRepository('ChamiloSkillBundle:Level')->find($_GET['level_id']);
if ($item) {
$position = $item->getPosition(); $position = $item->getPosition();
if (!empty($position)) {
if (!empty($position)) { $item->setPosition($position - 1);
$item->setPosition($position - 1); }
$em->persist($item);
$em->flush();
Display::addFlash(Display::return_message(get_lang('Updated')));
} }
$em->persist($item);
$em->flush();
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
break; break;
case 'move_down': case 'move_down':
/** @var \Chamilo\SkillBundle\Entity\Level $item */ /** @var Level $item */
$item = $em->getRepository('ChamiloSkillBundle:Level')->find($_GET['level_id']); $item = $em->getRepository('ChamiloSkillBundle:Level')->find($_GET['level_id']);
if ($item) {
$position = $item->getPosition();
$item->setPosition($position + 1);
$em->persist($item);
$em->flush();
Display::addFlash(Display::return_message(get_lang('Updated')));
}
$position = $item->getPosition();
$item->setPosition($position + 1);
$em->persist($item);
$em->flush();
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
break; break;
@ -80,10 +86,12 @@ switch ($action) {
$tpl->assign('form', $formToDisplay); $tpl->assign('form', $formToDisplay);
if ($form->validate()) { if ($form->validate()) {
$values = $form->exportValues(); $values = $form->exportValues();
$item = new \Chamilo\SkillBundle\Entity\Profile(); $item = new Profile();
$item->setName($values['name']); $item->setName($values['name']);
$em->persist($item); $em->persist($item);
$em->flush(); $em->flush();
Display::addFlash(Display::return_message(get_lang('Added')));
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
} }
@ -116,6 +124,7 @@ switch ($action) {
$item->setName($values['name']); $item->setName($values['name']);
$em->persist($item); $em->persist($item);
$em->flush(); $em->flush();
Display::addFlash(Display::return_message(get_lang('Updated')));
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
} }
@ -132,11 +141,16 @@ switch ($action) {
$listAction, $listAction,
['title' => get_lang('List')] ['title' => get_lang('List')]
); );
$em->remove($item);
$em->flush(); try {
$em->remove($item);
$em->flush();
Display::addFlash(Display::return_message(get_lang('Deleted')));
} catch (Exception $e) {
Display::addFlash(Display::return_message(get_lang('DeleteError'), 'error'));
}
header('Location: '.$listAction); header('Location: '.$listAction);
exit; exit;
break; break;
default: default:
$toolbar = Display::url( $toolbar = Display::url(

@ -399,7 +399,7 @@ if ($form->validate()) {
$language = $user['language']; $language = $user['language'];
$address = isset($user['address']) ? $user['address'] : null; $address = isset($user['address']) ? $user['address'] : null;
if ($user['radio_expiration_date'] == '1' && !$user_data['platform_admin']) { if (!$user_data['platform_admin'] && $user['radio_expiration_date'] == '1') {
$expiration_date = $user['expiration_date']; $expiration_date = $user['expiration_date'];
} else { } else {
$expiration_date = null; $expiration_date = null;

@ -54,13 +54,13 @@ function validate_data($users, $checkUniqueEmail = false)
$errors[] = $user; $errors[] = $user;
} }
// 2.2. Check whether the username was used twice in import file. // 2.2. Check whether the username was used twice in import file.
if (isset($usernames[$user['UserName']])) { if (isset($usernames[$username])) {
$user['error'] = get_lang('UserNameUsedTwice'); $user['error'] = get_lang('UserNameUsedTwice');
$errors[] = $user; $errors[] = $user;
} }
$usernames[$user['UserName']] = 1; $usernames[$username] = 1;
// 2.3. Check whether username is already occupied. // 2.3. Check whether username is already occupied.
if (!UserManager::is_username_available($user['UserName'])) { if (!UserManager::is_username_available($username)) {
$user['error'] = get_lang('UserNameNotAvailable'); $user['error'] = get_lang('UserNameNotAvailable');
$errors[] = $user; $errors[] = $user;
} }
@ -264,8 +264,21 @@ function save_data($users)
*/ */
function parse_csv_data($file) function parse_csv_data($file)
{ {
$users = Import :: csvToArray($file); $users = Import::csvToArray($file);
$allowRandom = api_get_configuration_value('generate_random_login');
if ($allowRandom) {
$factory = new RandomLib\Factory();
$generator = $factory->getLowStrengthGenerator();
$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
}
foreach ($users as $index => $user) { foreach ($users as $index => $user) {
if (isset($user['UserName'])) {
if ($allowRandom) {
$username = $generator->generateString(10, $chars);
$user['UserName'] = $username;
}
}
if (isset($user['Courses'])) { if (isset($user['Courses'])) {
$user['Courses'] = explode('|', trim($user['Courses'])); $user['Courses'] = explode('|', trim($user['Courses']));
} }
@ -493,7 +506,7 @@ if (isset($_POST['formSent']) && $_POST['formSent'] && $_FILES['import_file']['s
} }
} }
Display :: display_header($tool_name); Display::display_header($tool_name);
$form = new FormValidator('user_import', 'post', api_get_self()); $form = new FormValidator('user_import', 'post', api_get_self());
$form->addElement('header', '', $tool_name); $form->addElement('header', '', $tool_name);

@ -64,19 +64,19 @@ $tbl_announcement = Database::get_course_table(TABLE_ANNOUNCEMENT);
$tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY); $tbl_item_property = Database::get_course_table(TABLE_ITEM_PROPERTY);
$isTutor = false; $isTutor = false;
if (!empty($group_id)) { if (!empty($group_id)) {
$group_properties = GroupManager:: get_group_properties($group_id); $groupProperties = GroupManager:: get_group_properties($group_id);
$interbreadcrumb[] = [ $interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH)."group/group.php?".api_get_cidreq(), "url" => api_get_path(WEB_CODE_PATH)."group/group.php?".api_get_cidreq(),
"name" => get_lang('Groups'), "name" => get_lang('Groups'),
]; ];
$interbreadcrumb[] = [ $interbreadcrumb[] = [
"url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), "url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace').' '.$group_properties['name'], "name" => get_lang('GroupSpace').' '.$groupProperties['name'],
]; ];
if ($allowToEdit === false) { if ($allowToEdit === false) {
// Check if user is tutor group // Check if user is tutor group
$isTutor = GroupManager::is_tutor_of_group(api_get_user_id(), $group_properties, $courseId); $isTutor = GroupManager::is_tutor_of_group(api_get_user_id(), $groupProperties, $courseId);
if ($isTutor) { if ($isTutor) {
$allowToEdit = true; $allowToEdit = true;
} }
@ -119,8 +119,8 @@ switch ($action) {
FROM $tbl_announcement announcement, FROM $tbl_announcement announcement,
$tbl_item_property itemproperty $tbl_item_property itemproperty
WHERE WHERE
announcement.c_id = $courseId AND announcement.c_id = $courseId AND
itemproperty.c_id = $courseId AND itemproperty.c_id = $courseId AND
itemproperty.ref = announcement.id AND itemproperty.ref = announcement.id AND
itemproperty.tool = '".TOOL_ANNOUNCEMENT."' AND itemproperty.tool = '".TOOL_ANNOUNCEMENT."' AND
itemproperty.visibility <> 2 itemproperty.visibility <> 2
@ -455,7 +455,7 @@ switch ($action) {
} }
$element = CourseManager::addUserGroupMultiSelect($form, []); $element = CourseManager::addUserGroupMultiSelect($form, []);
} else { } else {
$element = CourseManager::addGroupMultiSelect($form, $group_properties, []); $element = CourseManager::addGroupMultiSelect($form, $groupProperties, []);
} }
$form->addHtml('</div>'); $form->addHtml('</div>');
@ -567,7 +567,7 @@ switch ($action) {
$sendToUsersInSession $sendToUsersInSession
); );
/* MAIL FUNCTION */ // Send mail
if (isset($_POST['email_ann']) && empty($_POST['onlyThoseMails'])) { if (isset($_POST['email_ann']) && empty($_POST['onlyThoseMails'])) {
AnnouncementManager::sendEmail( AnnouncementManager::sendEmail(
api_get_course_info(), api_get_course_info(),
@ -624,7 +624,7 @@ switch ($action) {
) )
); );
/* MAIL FUNCTION */ // Send mail
if (isset($data['email_ann']) && $data['email_ann']) { if (isset($data['email_ann']) && $data['email_ann']) {
AnnouncementManager::sendEmail( AnnouncementManager::sendEmail(
api_get_course_info(), api_get_course_info(),
@ -647,7 +647,7 @@ if (!empty($_GET['remind_inactive'])) {
} }
if (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath') { if (empty($_GET['origin']) or $_GET['origin'] !== 'learnpath') {
//we are not in the learning path // We are not in the learning path
Display::display_header($nameTools, get_lang('Announcements')); Display::display_header($nameTools, get_lang('Announcements'));
} }

Loading…
Cancel
Save