Browse Source

Minor format code

Julio Montoya 9 năm trước cách đây
mục cha
commit
697f0341e8

+ 2 - 2
main/gradebook/index.php

@@ -271,7 +271,7 @@ if (isset($_GET['movelink'])) {
 if (isset($_GET['visiblecat'])) {
     GradebookUtils::block_students();
 
-    if (isset ($_GET['set_visible'])) {
+    if (isset($_GET['set_visible'])) {
         $visibility_command= 1;
     } else {
         $visibility_command= 0;
@@ -723,7 +723,6 @@ if (isset($_GET['studentoverview'])) {
         }
         unset($cats);
     }
-
     $cats = Category::load($category, null, null, null, null, null, false);
 
     //with this fix the teacher only can view 1 gradebook
@@ -878,6 +877,7 @@ if (isset($first_time) && $first_time==1 && api_is_allowed_to_edit(null,true)) {
             }
         }
 
+
         $i = 0;
         $allcat = array();
         /** @var Category $cat */

+ 0 - 1
main/gradebook/lib/be/abstractlink.class.php

@@ -274,7 +274,6 @@ abstract class AbstractLink implements GradebookItem
             }
             $sql .= ' visible = '.intval($visible);
         }
-
         $result = Database::query($sql);
         $links = AbstractLink::create_objects_from_sql_result($result);
 

+ 1 - 1
main/gradebook/lib/fe/gradebooktable.class.php

@@ -54,6 +54,7 @@ class GradebookTable extends SortableTable
             'ASC',
             'gradebook_list'
         );
+
         $this->evals_links = array_merge($evals, $links);
         $this->currentcat = $currentcat;
         $this->cats = $cats;
@@ -236,7 +237,6 @@ class GradebookTable extends SortableTable
 
         // Categories.
         foreach ($data_array as $data) {
-
             // list of items inside the gradebook (exercises, lps, forums, etc)
             $row  = array();
             /** @var AbstractLink $item */

+ 9 - 13
main/gradebook/lib/gradebook_data_generator.class.php

@@ -11,17 +11,14 @@
 class GradebookDataGenerator
 {
     // Sorting types constants
-    const GDG_SORT_TYPE            = 1;
-    const GDG_SORT_NAME            = 2;
-    const GDG_SORT_DESCRIPTION     = 4;
-    const GDG_SORT_WEIGHT          = 8;
-    const GDG_SORT_DATE            = 16;
-
-    const GDG_SORT_ASC             = 32;
-    const GDG_SORT_DESC            = 64;
-
-    const GDG_SORT_ID              = 128;
-
+    const GDG_SORT_TYPE = 1;
+    const GDG_SORT_NAME = 2;
+    const GDG_SORT_DESCRIPTION = 4;
+    const GDG_SORT_WEIGHT = 8;
+    const GDG_SORT_DATE = 16;
+    const GDG_SORT_ASC = 32;
+    const GDG_SORT_DESC = 64;
+    const GDG_SORT_ID = 128;
 
     private $items;
     private $evals_links;
@@ -148,7 +145,7 @@ class GradebookDataGenerator
             $row[] = $item->get_weight();
             if (count($this->evals_links) > 0) {
                 // Items inside a category.
-                if (!api_is_allowed_to_edit() || $status_user != 1 ) {
+                if (!api_is_allowed_to_edit() || $status_user != 1) {
                     $resultColumn = $this->build_result_column(
                         api_get_user_id(),
                         $item,
@@ -211,7 +208,6 @@ class GradebookDataGenerator
 
                 $score = AbstractLink::getCurrentUserRanking($rankingStudentList);
                 $row['ranking'] = $scoreDisplay->display_score($score, SCORE_DIV);
-
             }
             $data[] = $row;
         }