Minor - merge from 1.11.x

pull/3006/head
Julio 5 years ago
parent 562606f618
commit 55720d57b3
  1. 6
      main/group/group_space.php
  2. 16
      main/group/member_settings.php
  3. 18
      main/group/tutor_settings.php

@ -44,7 +44,7 @@ if (!GroupManager::userHasAccessToBrowse($user_id, $current_group, api_get_sessi
* User wants to register in this group
*/
if (!empty($_GET['selfReg']) &&
GroupManager :: is_self_registration_allowed($user_id, $current_group)
GroupManager::is_self_registration_allowed($user_id, $current_group)
) {
GroupManager::subscribe_users($user_id, $current_group);
Display::addFlash(Display::return_message(get_lang('GroupNowMember')));
@ -54,7 +54,7 @@ if (!empty($_GET['selfReg']) &&
* User wants to unregister from this group
*/
if (!empty($_GET['selfUnReg']) &&
GroupManager :: is_self_unregistration_allowed($user_id, $current_group)
GroupManager::is_self_unregistration_allowed($user_id, $current_group)
) {
GroupManager::unsubscribe_users($user_id, $current_group);
Display::addFlash(
@ -84,7 +84,7 @@ echo '<a href="'.api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq()
* Register to group
*/
$subscribe_group = '';
if (GroupManager :: is_self_registration_allowed($user_id, $current_group)) {
if (GroupManager::is_self_registration_allowed($user_id, $current_group)) {
$subscribe_group = '<a class="btn btn-default" href="'.api_get_self().'?selfReg=1&group_id='.$current_group['id'].'" onclick="javascript: if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."'".')) return false;">'.
get_lang('RegIntoGroup').'</a>';
}

@ -32,22 +32,6 @@ if (!api_is_allowed_to_edit(false, true) && !$is_group_member) {
api_not_allowed(true);
}
/**
* List all users registered to the course.
*/
function search_members_keyword($firstname, $lastname, $username, $official_code, $keyword)
{
if (api_strripos($firstname, $keyword) !== false ||
api_strripos($lastname, $keyword) !== false ||
api_strripos($username, $keyword) !== false ||
api_strripos($official_code, $keyword) !== false
) {
return true;
} else {
return false;
}
}
/**
* Function to sort users after getting the list in the DB.
* Necessary because there are 2 or 3 queries. Called by usort().

@ -32,24 +32,6 @@ if (!api_is_allowed_to_edit(false, true) && !$is_group_member) {
api_not_allowed(true);
}
/* FUNCTIONS */
/**
* List all users registered to the course.
*/
function search_members_keyword($firstname, $lastname, $username, $official_code, $keyword)
{
if (api_strripos($firstname, $keyword) !== false ||
api_strripos($lastname, $keyword) !== false ||
api_strripos($username, $keyword) !== false ||
api_strripos($official_code, $keyword) !== false
) {
return true;
} else {
return false;
}
}
/**
* Function to sort users after getting the list in the DB.
* Necessary because there are 2 or 3 queries. Called by usort().

Loading…
Cancel
Save