Completed
Push — 1.10.x ( f8eb4d...d4df8b )
by Julito
56:07
created
main/inc/lib/grade_model.lib.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * Displays the title + grid
53 53
      */
54
-	public function display()
54
+    public function display()
55 55
     {
56
-		// action links
57
-		echo '<div class="actions" style="margin-bottom:20px">';
56
+        // action links
57
+        echo '<div class="actions" style="margin-bottom:20px">';
58 58
         echo '<a href="grade_models.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
59
-		echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png',get_lang('Add'),'','32').'</a>';
60
-		echo '</div>';
59
+        echo '<a href="'.api_get_self().'?action=add">'.Display::return_icon('add.png',get_lang('Add'),'','32').'</a>';
60
+        echo '</div>';
61 61
         echo Display::grid_html('grade_model');
62
-	}
62
+    }
63 63
 
64 64
     /**
65 65
      * Returns a Form validator Obj
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
 
118 118
         $form->addElement('hidden', 'maxvalue', '100');
119
-		$form->addElement('hidden', 'minvalue', '0');
119
+        $form->addElement('hidden', 'minvalue', '0');
120 120
         $renderer = & $form->defaultRenderer();
121 121
 
122 122
         $component_array = array();
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
         // Setting the rules
194 194
         $form->addRule('name', get_lang('ThisFieldIsRequired'), 'required');
195 195
 
196
-		return $form;
196
+        return $form;
197 197
     }
198 198
 
199 199
     /**
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
      */
217 217
     public function save($params, $show_query = false)
218 218
     {
219
-	    $id = parent::save($params, $show_query);
220
-	    if (!empty($id)) {
219
+        $id = parent::save($params, $show_query);
220
+        if (!empty($id)) {
221 221
             foreach ($params['components'] as $component) {
222 222
                 if (!empty($component['title']) && !empty($component['percentage']) && !empty($component['acronym'])) {
223 223
                     $obj = new GradeModelComponents();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         }
229 229
 
230 230
         //event_system(LOG_CAREER_CREATE, LOG_CAREER_ID, $id, api_get_utc_datetime(), api_get_user_id());
231
-   		return $id;
231
+            return $id;
232 232
     }
233 233
 
234 234
     /**
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function delete($id)
259 259
     {
260
-	    parent::delete($id);
260
+        parent::delete($id);
261 261
     }
262 262
 
263 263
     public function fill_grade_model_select_in_form(&$form, $name = 'gradebook_model_id', $default_value = null)
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
     /**
306 306
      * GradeModelComponents constructor.
307 307
      */
308
-	public function __construct()
308
+    public function __construct()
309 309
     {
310 310
         parent::__construct();
311 311
         $this->table = Database::get_main_table(TABLE_GRADE_MODEL_COMPONENTS);
312
-	}
312
+    }
313 313
 
314 314
     /**
315 315
      * @param array $params
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      */
319 319
     public function save($params, $show_query = false)
320 320
     {
321
-	    $id = parent::save($params, $show_query);
321
+        $id = parent::save($params, $show_query);
322 322
         
323 323
         return $id;
324 324
     }
Please login to merge, or discard this patch.
main/admin/grade_models.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@
 block discarded – undo
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 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
-     '\';
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
+        '\';
115 115
 }';
116 116
 ?>
117 117
 <script>
Please login to merge, or discard this patch.