Pārlūkot izejas kodu

Minor - format code

jmontoyaa 7 gadi atpakaļ
vecāks
revīzija
e6e9249025
2 mainītis faili ar 9 papildinājumiem un 8 dzēšanām
  1. 1 0
      main/group/group.php
  2. 8 8
      main/inc/lib/groupmanager.lib.php

+ 1 - 0
main/group/group.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),

+ 8 - 8
main/inc/lib/groupmanager.lib.php

@@ -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)) {