Minor - format code

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent f4d492c362
commit e6e9249025
  1. 1
      main/group/group.php
  2. 16
      main/inc/lib/groupmanager.lib.php

@ -238,6 +238,7 @@ if (api_get_setting('allow_group_categories') === 'true') {
// Edit
$actions .= '<a href="group_category.php?'.api_get_cidreq().'&id='.$categoryId.'" title="'.get_lang('Edit').'">'.
Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a>';
// Delete
$actions .= Display::url(
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL),

@ -1821,21 +1821,21 @@ class GroupManager
$sql = "SELECT group_id FROM $tbl_group
WHERE c_id = $course_id AND user_id = '$user_id'";
$groupres = Database::query($sql);
$result = Database::query($sql);
if ($groupres) {
while ($myrow = Database::fetch_array($groupres)) {
$groups[] = $myrow['group_id'];
if ($result) {
while ($row = Database::fetch_array($result)) {
$groups[] = $row['group_id'];
}
}
//Also loading if i'm the tutor
$sql = "SELECT group_id FROM $tbl_group_tutor
WHERE c_id = $course_id AND user_id = '$user_id'";
$groupres = Database::query($sql);
if ($groupres) {
while ($myrow = Database::fetch_array($groupres)) {
$groups[] = $myrow['group_id'];
$result = Database::query($sql);
if ($result) {
while ($row = Database::fetch_array($result)) {
$groups[] = $row['group_id'];
}
}
if (!empty($groups)) {

Loading…
Cancel
Save