Completed
Push — 1.10.x ( f8eb4d...d4df8b )
by Julito
56:07
created
main/inc/lib/grade_model.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function __construct()
17 17
     {
18
-        $this->table =  Database::get_main_table(TABLE_GRADE_MODEL);
18
+        $this->table = Database::get_main_table(TABLE_GRADE_MODEL);
19 19
     }
20 20
 
21 21
     /**
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     {
55 55
 		// action links
56 56
 		echo '<div class="actions" style="margin-bottom:20px">';
57
-        echo '<a href="grade_models.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
58
-		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png',get_lang('Add'),'','32').'</a>';
57
+        echo '<a href="grade_models.php">'.Display::return_icon('back.png', get_lang('Back'), '', '32').'</a>';
58
+		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png', get_lang('Add'), '', '32').'</a>';
59 59
 		echo '</div>';
60 60
         echo Display::grid_html('grade_model');
61 61
 	}
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $form->addElement('hidden', 'components['.$i.'][id]', null);
128 128
 
129 129
             $template_percentage =
130
-            '<div id=' . $i . ' style="display: '.(($i<=$nr_items)?'inline':'none').';" class="form-group">                
130
+            '<div id='.$i.' style="display: '.(($i <= $nr_items) ? 'inline' : 'none').';" class="form-group">                
131 131
                 <label for="" class="col-sm-2 control-label">
132 132
                     {label}
133 133
                 </label>
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
 
142 142
             $template_title =
143 143
             '&nbsp{element} <!-- BEGIN error --> <span class="form_error">{error}</span><!-- END error -->
144
-             <a href="javascript:plusItem(' . ($counter+1) . ')">
145
-                '.Display::return_icon('add.png', get_lang('Add'), ['id' => 'plus-' . ($counter+1), 'style' => 'display: '.(($counter>=$nr_items) ? 'inline':'none') ]).'
144
+             <a href="javascript:plusItem(' . ($counter + 1).')">
145
+                '.Display::return_icon('add.png', get_lang('Add'), ['id' => 'plus-'.($counter + 1), 'style' => 'display: '.(($counter >= $nr_items) ? 'inline' : 'none')]).'
146 146
             </a>
147
-            <a href="javascript:minItem(' . ($counter) . ')">
148
-                '.Display::return_icon('delete.png', get_lang('Delete'), ['id' => 'min-' . ($counter), 'style' => 'display: '.(($counter>=$nr_items) ? 'inline':'none') ]).'
147
+            <a href="javascript:minItem(' . ($counter).')">
148
+                '.Display::return_icon('delete.png', get_lang('Delete'), ['id' => 'min-'.($counter), 'style' => 'display: '.(($counter >= $nr_items) ? 'inline' : 'none')]).'
149 149
             </a>
150 150
             </div></div>';
151 151
 
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 	public function __construct()
313 313
     {
314 314
         parent::__construct();
315
-        $this->table =  Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
315
+        $this->table = Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
316 316
 	}
317 317
 
318 318
     /**
Please login to merge, or discard this patch.
main/admin/grade_models.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 $htmlHeadXtra[] = api_get_jqgrid_js();
21 21
 
22 22
 // setting breadcrumbs
23
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
23
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
24 24
 
25 25
 $action = isset($_GET['action']) ? $_GET['action'] : null;
26 26
 
@@ -28,16 +28,16 @@  discard block
 block discarded – undo
28 28
 $token = Security::get_token();
29 29
 
30 30
 if ($action == 'add') {
31
-    $interbreadcrumb[]=array('url' => 'grade_models.php','name' => get_lang('GradeModel'));
32
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('Add'));
31
+    $interbreadcrumb[] = array('url' => 'grade_models.php', 'name' => get_lang('GradeModel'));
32
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add'));
33 33
 } elseif ($action == 'edit') {
34
-    $interbreadcrumb[]=array('url' => 'grade_models.php','name' => get_lang('GradeModel'));
35
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit'));
34
+    $interbreadcrumb[] = array('url' => 'grade_models.php', 'name' => get_lang('GradeModel'));
35
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit'));
36 36
 } else {
37
-    $interbreadcrumb[]=array('url' => '#','name' => get_lang('GradeModel'));
37
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('GradeModel'));
38 38
 }
39 39
 
40
-$htmlHeadXtra[]= '<script>
40
+$htmlHeadXtra[] = '<script>
41 41
 function plusItem(item) {
42 42
     if (item != 1) {
43 43
 		document.getElementById(item).style.display = "inline";
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 
110 110
 //With this function we can add actions to the jgrid (edit, delete, etc)
111 111
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
112
-     return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'.
113
-     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'.
112
+     return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
113
+     '&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;"  href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
114 114
      '\';
115 115
 }';
116 116
 ?>
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             $obj->display();
156 156
         } else {
157 157
             echo '<div class="actions">';
158
-            echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
158
+            echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
159 159
             echo '</div>';
160 160
             $form->addElement('hidden', 'sec_token');
161 161
             $form->setConstants(array('sec_token' => $token));
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             $obj->display();
178 178
         } else {
179 179
             echo '<div class="actions">';
180
-            echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
180
+            echo '<a href="'.api_get_self().'">'.Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
181 181
             echo '</div>';
182 182
             $form->addElement('hidden', 'sec_token');
183 183
             $form->setConstants(array('sec_token' => $token));
Please login to merge, or discard this patch.