Passed
Push — 1.10.x ( 04397c...5e25f1 )
by Angel Fernando Quiroz
181:14 queued 130:00
created
main/gradebook/gradebook_add_link_select_course.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 require_once '../inc/global.inc.php';
10
-$current_course_tool  = TOOL_GRADEBOOK;
10
+$current_course_tool = TOOL_GRADEBOOK;
11 11
 
12 12
 api_protect_course_script(true);
13 13
 api_block_anonymous_users();
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
 $catadd = new Category();
17 17
 $catadd->set_user_id(api_get_user_id());
18 18
 $catadd->set_parent_id($_GET['selectcat']);
19
-$catcourse = Category :: load ($_GET['selectcat']);
19
+$catcourse = Category :: load($_GET['selectcat']);
20 20
 $form = new CatForm(
21 21
     CatForm :: TYPE_SELECT_COURSE,
22 22
     $catadd,
23 23
     'add_cat_form',
24 24
     null,
25
-    api_get_self() . '?selectcat=' . Security::remove_XSS($_GET['selectcat']).'&'.api_get_cidreq()
25
+    api_get_self().'?selectcat='.Security::remove_XSS($_GET['selectcat']).'&'.api_get_cidreq()
26 26
 );
27 27
 
28 28
 if ($form->validate()) {
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
     $cat = new Category();
31 31
     $cat->set_course_code($values['select_course']);
32 32
     $cat->set_name($values['name']);
33
-    header('location: gradebook_add_link.php?selectcat=' .Security::remove_XSS($_GET['selectcat']).'&course_code='.Security::remove_XSS($values['select_course']).'&'.api_get_cidreq());
33
+    header('location: gradebook_add_link.php?selectcat='.Security::remove_XSS($_GET['selectcat']).'&course_code='.Security::remove_XSS($values['select_course']).'&'.api_get_cidreq());
34 34
     exit;
35 35
 }
36 36
 
37
-$interbreadcrumb[] = array (
37
+$interbreadcrumb[] = array(
38 38
     'url' => Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.Security::remove_XSS($_GET['selectcat']).'&'.api_get_cidreq(),
39 39
     'name' => get_lang('Gradebook')
40 40
 );
Please login to merge, or discard this patch.
main/gradebook/lib/gradebook_result.class.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     /**
15 15
      * constructor of the class
16 16
      */
17
-    public function __construct($get_questions=false,$get_answers=false)
17
+    public function __construct($get_questions = false, $get_answers = false)
18 18
     {
19 19
     }
20 20
 
@@ -36,21 +36,21 @@  discard block
 block discarded – undo
36 36
         //titles
37 37
 
38 38
         foreach ($dato[0] as $header_col) {
39
-            if(!empty($header_col)) {
40
-                $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($header_col))).';';
39
+            if (!empty($header_col)) {
40
+                $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($header_col))).';';
41 41
             }
42 42
         }
43 43
 
44
-        $data .="\r\n";
44
+        $data .= "\r\n";
45 45
         $cant_students = count($dato[1]);
46 46
         //print_r($data);		exit();
47 47
 
48
-        for($i=0;$i<$cant_students;$i++) {
48
+        for ($i = 0; $i < $cant_students; $i++) {
49 49
             $column = 0;
50
-            foreach($dato[1][$i] as $col_name) {
51
-                $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($col_name))).';';
50
+            foreach ($dato[1][$i] as $col_name) {
51
+                $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($col_name))).';';
52 52
             }
53
-            $data .="\r\n";
53
+            $data .= "\r\n";
54 54
         }
55 55
 
56 56
         //output the results
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         for ($i = 0; $i < $cant_students; $i++) {
102 102
             $column = 0;
103 103
             foreach ($data[1][$i] as $col_name) {
104
-                $worksheet->SetCellValueByColumnAndRow($line,$column, html_entity_decode(strip_tags($col_name)));
104
+                $worksheet->SetCellValueByColumnAndRow($line, $column, html_entity_decode(strip_tags($col_name)));
105 105
                 $column++;
106 106
             }
107 107
             $line++;
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
             'border_sz' => 20
138 138
         );
139 139
         $lines = 0;
140
-        $values[] = implode("\t",$data[0]);
140
+        $values[] = implode("\t", $data[0]);
141 141
         foreach ($data[1] as $line) {
142
-            $values[] = implode("\t",$line);
142
+            $values[] = implode("\t", $line);
143 143
             $lines++;
144 144
         }
145 145
         //$data = array();
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             //    'right' => 4000,
155 155
             //    'left' => 4000
156 156
         );
157
-        $docx->createDocx($filepath,$paramsPage);
157
+        $docx->createDocx($filepath, $paramsPage);
158 158
         //output the results
159 159
         $data = file_get_contents($filepath.'.docx');
160 160
         $len = strlen($data);
Please login to merge, or discard this patch.
main/gradebook/lib/user_data_generator.class.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 
51 51
         }
52 52
         if (count($result) == 0) {
53
-            $evals_filtered=$evals;
53
+            $evals_filtered = $evals;
54 54
         } else {
55
-            $evals_filtered=$evals_filtered_copy;
55
+            $evals_filtered = $evals_filtered_copy;
56 56
         }
57 57
         $this->items = array_merge($evals_filtered, $links);
58 58
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	{
86 86
 		// do some checks on count, redefine if invalid value
87 87
 		if (!isset($count)) {
88
-			$count = count ($this->items) - $start;
88
+			$count = count($this->items) - $start;
89 89
 		}
90 90
 		if ($count < 0) {
91 91
 			$count = 0;
@@ -104,20 +104,20 @@  discard block
 block discarded – undo
104 104
 		} elseif ($sorting & self :: UDG_SORT_AVERAGE) {
105 105
 			// if user sorts on average scores, first calculate them and cache them
106 106
 			foreach ($allitems as $item) {
107
-				$this->avgcache[$item->get_item_type() . $item->get_id()]= $item->calc_score();
107
+				$this->avgcache[$item->get_item_type().$item->get_id()] = $item->calc_score();
108 108
 			}
109 109
 			usort($allitems, array('UserDataGenerator', 'sort_by_average'));
110 110
 		} elseif ($sorting & self :: UDG_SORT_SCORE) {
111 111
 			// if user sorts on student's scores, first calculate them and cache them
112 112
 			foreach ($allitems as $item) {
113
-				$this->scorecache[$item->get_item_type() . $item->get_id()]
113
+				$this->scorecache[$item->get_item_type().$item->get_id()]
114 114
 					= $item->calc_score($this->userid);
115 115
 			}
116 116
 			usort($allitems, array('UserDataGenerator', 'sort_by_score'));
117 117
 		} elseif ($sorting & self :: UDG_SORT_MASK) {
118 118
 			// if user sorts on student's masks, first calculate scores and cache them
119 119
 			foreach ($allitems as $item) {
120
-				$this->scorecache[$item->get_item_type() . $item->get_id()]
120
+				$this->scorecache[$item->get_item_type().$item->get_id()]
121 121
 					= $item->calc_score($this->userid);
122 122
 			}
123 123
 			usort($allitems, array('UserDataGenerator', 'sort_by_mask'));
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		// fill score cache if not done yet
133 133
 		if (!isset ($this->scorecache)) {
134 134
 			foreach ($visibleitems as $item) {
135
-				$this->scorecache[$item->get_item_type() . $item->get_id()]
135
+				$this->scorecache[$item->get_item_type().$item->get_id()]
136 136
 					= $item->calc_score($this->userid);
137 137
 			}
138 138
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		$scoredisplay = ScoreDisplay :: instance();
142 142
 		$data = array();
143 143
 		foreach ($visibleitems as $item) {
144
-			$row = array ();
144
+			$row = array();
145 145
 			$row[] = $item;
146 146
 			$row[] = $item->get_name();
147 147
 			$row[] = $this->build_course_name($item);
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 	function sort_by_type($item1, $item2)
164 164
 	{
165 165
 		if ($item1->get_item_type() == $item2->get_item_type()) {
166
-			return $this->sort_by_name($item1,$item2);
166
+			return $this->sort_by_name($item1, $item2);
167 167
 		} else {
168 168
 			return ($item1->get_item_type() < $item2->get_item_type() ? -1 : 1);
169 169
 		}
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	function sort_by_name($item1, $item2)
205 205
 	{
206
-		return api_strnatcmp($item1->get_name(),$item2->get_name());
206
+		return api_strnatcmp($item1->get_name(), $item2->get_name());
207 207
 	}
208 208
 
209 209
 	/**
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
 	 */
214 214
 	function sort_by_average($item1, $item2)
215 215
 	{
216
-		$score1 = $this->avgcache[$item1->get_item_type() . $item1->get_id()];
217
-		$score2 = $this->avgcache[$item2->get_item_type() . $item2->get_id()];
216
+		$score1 = $this->avgcache[$item1->get_item_type().$item1->get_id()];
217
+		$score2 = $this->avgcache[$item2->get_item_type().$item2->get_id()];
218 218
 
219 219
 		return $this->compare_scores($score1, $score2);
220 220
 	}
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
 	 */
227 227
 	function sort_by_score($item1, $item2)
228 228
 	{
229
-		$score1 = $this->scorecache[$item1->get_item_type() . $item1->get_id()];
230
-		$score2 = $this->scorecache[$item2->get_item_type() . $item2->get_id()];
229
+		$score1 = $this->scorecache[$item1->get_item_type().$item1->get_id()];
230
+		$score2 = $this->scorecache[$item2->get_item_type().$item2->get_id()];
231 231
 
232 232
 		return $this->compare_scores($score1, $score2);
233 233
 	}
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
 	 */
240 240
 	function sort_by_mask($item1, $item2)
241 241
 	{
242
-		$score1 = $this->scorecache[$item1->get_item_type() . $item1->get_id()];
243
-		$score2 = $this->scorecache[$item2->get_item_type() . $item2->get_id()];
242
+		$score1 = $this->scorecache[$item1->get_item_type().$item1->get_id()];
243
+		$score2 = $this->scorecache[$item2->get_item_type().$item2->get_id()];
244 244
 
245 245
 		return ScoreDisplay :: compare_scores_by_custom_display($score1, $score2);
246 246
 	}
@@ -256,10 +256,10 @@  discard block
 block discarded – undo
256 256
 			return (isset($score2) ? 1 : 0);
257 257
 		} elseif (!isset($score2)) {
258 258
 			return -1;
259
-		} elseif (($score1[0]/$score1[1]) == ($score2[0]/$score2[1])) {
259
+		} elseif (($score1[0] / $score1[1]) == ($score2[0] / $score2[1])) {
260 260
 			return 0;
261 261
 		} else {
262
-			return (($score1[0]/$score1[1]) < ($score2[0]/$score2[1]) ? -1 : 1);
262
+			return (($score1[0] / $score1[1]) < ($score2[0] / $score2[1]) ? -1 : 1);
263 263
 		}
264 264
 	}
265 265
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	private function build_average_column($item, $ignore_score_color)
292 292
 	{
293 293
 		if (isset($this->avgcache)) {
294
-			$avgscore = $this->avgcache[$item->get_item_type() . $item->get_id()];
294
+			$avgscore = $this->avgcache[$item->get_item_type().$item->get_id()];
295 295
 		} else {
296 296
 			$avgscore = $item->calc_score();
297 297
 		}
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	 */
312 312
 	private function build_result_column($item, $ignore_score_color)
313 313
 	{
314
-		$studscore = $this->scorecache[$item->get_item_type() . $item->get_id()];
314
+		$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
315 315
 		$scoredisplay = ScoreDisplay :: instance();
316 316
 		$displaytype = SCORE_DIV_PERCENT;
317 317
 		if ($ignore_score_color) {
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 	 */
329 329
 	private function build_mask_column($item, $ignore_score_color)
330 330
 	{
331
-		$studscore = $this->scorecache[$item->get_item_type() . $item->get_id()];
331
+		$studscore = $this->scorecache[$item->get_item_type().$item->get_id()];
332 332
 		$scoredisplay = ScoreDisplay :: instance();
333 333
 		$displaytype = SCORE_DIV_PERCENT;
334 334
 		if ($ignore_score_color) {
@@ -362,12 +362,12 @@  discard block
 block discarded – undo
362 362
 		if (isset ($this->categorycache)
363 363
 			&& isset ($this->categorycache[$category_id])) {
364 364
 			return $this->categorycache[$category_id];
365
-		}else {
365
+		} else {
366 366
 			$cat = Category::load($category_id);
367
-			if (isset($cat)){
367
+			if (isset($cat)) {
368 368
 				$this->categorycache[$category_id] = $cat[0];
369 369
 				return $cat[0];
370
-			}else
370
+			} else
371 371
 				return null;
372 372
 		}
373 373
 	}
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 	private function get_category_name_to_display($cat)
380 380
 	{
381 381
 		if (isset($cat)) {
382
-			if ($cat->get_parent_id() == '0' || $cat->get_parent_id() == null){
382
+			if ($cat->get_parent_id() == '0' || $cat->get_parent_id() == null) {
383 383
 				return '';
384 384
 			} else {
385 385
 				return $cat->get_name();
Please login to merge, or discard this patch.
main/gradebook/lib/fe/userform.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  */
10 10
 class UserForm extends FormValidator
11 11
 {
12
-	const TYPE_USER_INFO= 1;
12
+	const TYPE_USER_INFO = 1;
13 13
 	const TYPE_SIMPLE_SEARCH = 3;
14 14
 	/**
15 15
 	 * Builds a form containing form items based on a given parameter
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	 * @param method
20 20
 	 * @param action
21 21
 	 */
22
-	public function UserForm($form_type, $user, $form_name, $method= 'post', $action= null)
22
+	public function UserForm($form_type, $user, $form_name, $method = 'post', $action = null)
23 23
 	{
24 24
 		parent :: __construct($form_name, $method, $action);
25
-		$this->form_type= $form_type;
25
+		$this->form_type = $form_type;
26 26
 		if (isset ($user)) {
27
-			$this->user_info= $user;
27
+			$this->user_info = $user;
28 28
 		}
29 29
 		if (isset ($result_object)) {
30
-			$this->result_object= $result_object;
30
+			$this->result_object = $result_object;
31 31
 		}
32 32
 		if ($this->form_type == self :: TYPE_USER_INFO) {
33 33
 			$this->build_user_info_form();
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 				'keyword' => Security::remove_XSS($_GET['search'])
46 46
 			));
47 47
 		}
48
-		$renderer =& $this->defaultRenderer();
48
+		$renderer = & $this->defaultRenderer();
49 49
 		$renderer->setCustomElementTemplate('<span>{element}</span> ');
50
-		$this->addElement('text','keyword','');
50
+		$this->addElement('text', 'keyword', '');
51 51
 		$this->addButtonSearch(get_lang('Search'), 'submit');
52 52
 	}
53 53
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			$this->addElement('static', 'fname', get_lang('FirstName'), $this->user_info['firstname']);
62 62
 		}
63 63
 		$this->addElement('static', 'uname', get_lang('UserName'), $this->user_info['username']);
64
-		$this->addElement('static', 'email', get_lang('Email'), '<a href="mailto:' . $this->user_info['email'] . '">' . $this->user_info['email'] . '</a>');
64
+		$this->addElement('static', 'email', get_lang('Email'), '<a href="mailto:'.$this->user_info['email'].'">'.$this->user_info['email'].'</a>');
65 65
 		$this->addElement('static', 'ofcode', get_lang('OfficialCode'), $this->user_info['official_code']);
66 66
 		$this->addElement('static', 'phone', get_lang('Phone'), $this->user_info['phone']);
67 67
 		$this->addButtonSave(get_lang('Back'), 'submit');
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		parent :: display();
73 73
 	}
74 74
 
75
-	function setDefaults($defaults= array(), $filter = null)
75
+	function setDefaults($defaults = array(), $filter = null)
76 76
 	{
77 77
 		parent :: setDefaults($defaults, $filter);
78 78
 	}
Please login to merge, or discard this patch.
main/gradebook/lib/fe/displaygradebook.php 1 patch
Spacing   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -20,37 +20,37 @@  discard block
 block discarded – undo
20 20
         if (api_is_allowed_to_edit(null, true)) {
21 21
             $header = '<div class="actions">';
22 22
             if ($page != 'statistics') {
23
-                $header .= '<a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . $selectcat . '">' .
24
-                    Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>';
23
+                $header .= '<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.$selectcat.'">'.
24
+                    Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>';
25 25
                 if ($evalobj->get_course_code() == null) {
26 26
 
27 27
                 } elseif (!$evalobj->has_results()) {
28
-                    $header .= '<a href="gradebook_add_result.php?selectcat=' . $selectcat . '&selecteval=' . $evalobj->get_id() . '">
29
-    				' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM) . '</a>';
28
+                    $header .= '<a href="gradebook_add_result.php?selectcat='.$selectcat.'&selecteval='.$evalobj->get_id().'">
29
+    				' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM).'</a>';
30 30
                 }
31 31
 
32 32
                 if (api_is_platform_admin() || $evalobj->is_locked() == false) {
33
-                    $header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&import=">' .
34
-                        Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM) . '</a>';
33
+                    $header .= '<a href="'.api_get_self().'?&selecteval='.$evalobj->get_id().'&import=">'.
34
+                        Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM).'</a>';
35 35
                 }
36 36
 
37 37
                 if ($evalobj->has_results()) {
38
-                    $header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&export=">' .
39
-                        Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM) . '</a>';
38
+                    $header .= '<a href="'.api_get_self().'?&selecteval='.$evalobj->get_id().'&export=">'.
39
+                        Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM).'</a>';
40 40
 
41 41
                     if (api_is_platform_admin() || $evalobj->is_locked() == false) {
42
-                        $header .= '<a href="gradebook_edit_result.php?selecteval=' . $evalobj->get_id() . '">' .
43
-                            Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM) . '</a>';
44
-                        $header .= '<a href="' . api_get_self() . '?&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();">' .
45
-                            Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM) . '</a>';
42
+                        $header .= '<a href="gradebook_edit_result.php?selecteval='.$evalobj->get_id().'">'.
43
+                            Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM).'</a>';
44
+                        $header .= '<a href="'.api_get_self().'?&selecteval='.$evalobj->get_id().'&deleteall=" onclick="return confirmationall();">'.
45
+                            Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM).'</a>';
46 46
                     }
47 47
                 }
48 48
 
49
-                $header .= '<a href="' . api_get_self() . '?print=&selecteval=' . $evalobj->get_id() . '" target="_blank">' .
50
-                    Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM) . '</a>';
49
+                $header .= '<a href="'.api_get_self().'?print=&selecteval='.$evalobj->get_id().'" target="_blank">'.
50
+                    Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
51 51
             } else {
52
-                $header .= '<a href="gradebook_view_result.php?selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' .
53
-                    Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>';
52
+                $header .= '<a href="gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.
53
+                    Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>';
54 54
             }
55 55
             $header .= '</div>';
56 56
         }
@@ -69,17 +69,17 @@  discard block
 block discarded – undo
69 69
             $score = $evalobj->calc_score();
70 70
 
71 71
             if ($score != null) {
72
-                $average = get_lang('Average') . ' :<b> ' . $scoredisplay->display_score($score, SCORE_AVERAGE) . '</b>';
72
+                $average = get_lang('Average').' :<b> '.$scoredisplay->display_score($score, SCORE_AVERAGE).'</b>';
73 73
                 $student_score = $evalobj->calc_score(api_get_user_id());
74 74
                 $student_score = Display::tag(
75 75
                     'h3',
76
-                    get_lang('Score') . ': ' . $scoredisplay->display_score($student_score, SCORE_DIV_PERCENT)
76
+                    get_lang('Score').': '.$scoredisplay->display_score($student_score, SCORE_DIV_PERCENT)
77 77
                 );
78 78
             }
79 79
         }
80 80
         $description = "";
81 81
         if (!$evalobj->get_description() == '') {
82
-            $description = get_lang('Description') . ' :<b> ' . $evalobj->get_description() . '</b><br>';
82
+            $description = get_lang('Description').' :<b> '.$evalobj->get_description().'</b><br>';
83 83
         }
84 84
 
85 85
         if ($evalobj->get_course_code() == null) {
@@ -89,18 +89,18 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         $evalinfo = '<table width="100%" border="0"><tr><td>';
92
-        $evalinfo .= '<h2>' . $evalobj->get_name() . '</h2><hr>';
92
+        $evalinfo .= '<h2>'.$evalobj->get_name().'</h2><hr>';
93 93
         $evalinfo .= $description;
94
-        $evalinfo .= get_lang('Course') . ' :<b> ' . $course . '</b><br />';
94
+        $evalinfo .= get_lang('Course').' :<b> '.$course.'</b><br />';
95 95
         //'<br>' . get_lang('Weight') . ' :<b> ' . $evalobj->get_weight() . '</b><br>' . get_lang('Visible') . ' :<b> ' . $visible . '</b>
96
-        $evalinfo .= get_lang('QualificationNumeric') . ' :<b> ' . $evalobj->get_max() . '</b><br>' . $average;
96
+        $evalinfo .= get_lang('QualificationNumeric').' :<b> '.$evalobj->get_max().'</b><br>'.$average;
97 97
 
98 98
         if (!api_is_allowed_to_edit()) {
99 99
             $evalinfo .= $student_score;
100 100
         }
101 101
 
102 102
         if (!$evalobj->has_results()) {
103
-            $evalinfo .= '<br /><i>' . get_lang('NoResultsInEvaluation') . '</i>';
103
+            $evalinfo .= '<br /><i>'.get_lang('NoResultsInEvaluation').'</i>';
104 104
         } elseif ($scoredisplay->is_custom() && api_get_self() != '/main/gradebook/gradebook_statistics.php') {
105 105
             if (api_is_allowed_to_edit(null, true)) {
106 106
                 if ($page != 'statistics') {
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
         if ($page != 'statistics') {
112 112
             if (api_is_allowed_to_edit(null, true)) {
113
-                $evalinfo .= '<br /><a href="gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . Display::return_icon(('statistics.png'), get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM) . '</a>';
113
+                $evalinfo .= '<br /><a href="gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '.Display::return_icon(('statistics.png'), get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM).'</a>';
114 114
             }
115 115
         }
116 116
         $evalinfo .= '</td><td><img style="float:right; position:relative;" src="../img/tutorial.gif"></td></table>';
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     public function display_header_flatview($catobj, $showeval, $showlink, $simple_search_form)
128 128
     {
129 129
         $header = '<table border="0" cellpadding="5">';
130
-        $header .= '<td style="vertical-align: top;"><a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '">' . Display::return_icon('gradebook.gif') . get_lang('Gradebook') . '</a></td>';
131
-        $header .= '<td style="vertical-align: top;">' . get_lang('FilterCategory') . '</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">';
130
+        $header .= '<td style="vertical-align: top;"><a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.Security::remove_XSS($_GET['selectcat']).'">'.Display::return_icon('gradebook.gif').get_lang('Gradebook').'</a></td>';
131
+        $header .= '<td style="vertical-align: top;">'.get_lang('FilterCategory').'</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">';
132 132
         $cats = Category :: load();
133 133
         $tree = $cats[0]->get_tree();
134 134
         unset($cats);
@@ -137,26 +137,26 @@  discard block
 block discarded – undo
137 137
                 $line .= '&mdash;';
138 138
             }
139 139
             if ($_GET['selectcat'] == $cat[0]) {
140
-                $header .= '<option selected="selected" value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>';
140
+                $header .= '<option selected="selected" value='.$cat[0].'>'.$line.' '.$cat[1].'</option>';
141 141
             } else {
142
-                $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>';
142
+                $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>';
143 143
             }
144 144
             $line = '';
145 145
         }
146 146
         $header .= '</td></select></form>';
147 147
         if (!$catobj->get_id() == '0') {
148
-            $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '"><img src="../img/gradebook.gif" border="0" alt="' . get_lang('Up') . '" /></a></td>';
148
+            $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'"><img src="../img/gradebook.gif" border="0" alt="'.get_lang('Up').'" /></a></td>';
149 149
         }
150
-        $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>';
151
-        $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?exportpdf=&offset=' . Security::remove_XSS($_GET['offset']) . '&search=' . Security::remove_XSS($_GET['search']) . '&selectcat=' . $catobj->get_id() . '"><img src=../img/icons/32/pdf.png alt=' . get_lang('ExportPDF') . '/> ' . get_lang('ExportPDF') . '</a>';
152
-        $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/icons/32/printer.png" alt=' . get_lang('Print') . '/> ' . get_lang('Print') . '</a>';
150
+        $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>';
151
+        $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search='.Security::remove_XSS($_GET['search']).'&selectcat='.$catobj->get_id().'"><img src=../img/icons/32/pdf.png alt='.get_lang('ExportPDF').'/> '.get_lang('ExportPDF').'</a>';
152
+        $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?print=&selectcat='.$catobj->get_id().'" target="_blank"><img src="../img/icons/32/printer.png" alt='.get_lang('Print').'/> '.get_lang('Print').'</a>';
153 153
         $header .= '</td></tr></table>';
154 154
         if (!$catobj->get_id() == '0') {
155
-            $header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="' . api_get_self() . '?selectcat=' . $catobj->get_id() . '"><input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '') . '>Show Evaluations &nbsp;';
156
-            $header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" ' . (($showlink == '1') ? 'checked' : '') . '>' . get_lang('ShowLinks') . '</form></td></tr></table>';
155
+            $header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="'.api_get_self().'?selectcat='.$catobj->get_id().'"><input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" '.(($showeval == '1') ? 'checked' : '').'>Show Evaluations &nbsp;';
156
+            $header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" '.(($showlink == '1') ? 'checked' : '').'>'.get_lang('ShowLinks').'</form></td></tr></table>';
157 157
         }
158 158
         if (isset($_GET['search'])) {
159
-            $header .= '<b>' . get_lang('SearchResults') . ' :</b>';
159
+            $header .= '<b>'.get_lang('SearchResults').' :</b>';
160 160
         }
161 161
         echo $header;
162 162
     }
@@ -177,23 +177,23 @@  discard block
 block discarded – undo
177 177
             $select_cat = $catobj->get_parent_id();
178 178
             $url = 'gradebook_flatview.php';
179 179
         }
180
-        $header .= '<a href="' . $url . '?' . api_get_cidreq() . '&selectcat=' . $select_cat . '">' .
181
-            Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>';
180
+        $header .= '<a href="'.$url.'?'.api_get_cidreq().'&selectcat='.$select_cat.'">'.
181
+            Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>';
182 182
 
183 183
         $pageNum = isset($_GET['flatviewlist_page_nr']) ? intval($_GET['flatviewlist_page_nr']) : '';
184 184
         $perPage = isset($_GET['flatviewlist_per_page']) ? intval($_GET['flatviewlist_per_page']) : '';
185 185
         $offset = isset($_GET['offset']) ? $_GET['offset'] : '0';
186 186
 
187
-        $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&export_format=csv&export_report=export_report&selectcat=' . $catobj->get_id() . '">' .
188
-            Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM) . '</a>';
189
-        $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&export_format=xls&export_report=export_report&selectcat=' . $catobj->get_id() . '">' .
190
-            Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM) . '</a>';
191
-        $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&export_format=doc&export_report=export_report&selectcat=' . $catobj->get_id() . '">' .
192
-            Display::return_icon('export_doc.png', get_lang('ExportAsDOC'), '', ICON_SIZE_MEDIUM) . '</a>';
193
-        $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&print=&selectcat=' . $catobj->get_id() . '" target="_blank">' .
194
-            Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM) . '</a>';
195
-        $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&exportpdf=&selectcat=' . $catobj->get_id().'&offset='.$offset.'&flatviewlist_page_nr='.$pageNum.'&flatviewlist_per_page='.$perPage.'" >' .
196
-            Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
187
+        $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export_format=csv&export_report=export_report&selectcat='.$catobj->get_id().'">'.
188
+            Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
189
+        $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export_format=xls&export_report=export_report&selectcat='.$catobj->get_id().'">'.
190
+            Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a>';
191
+        $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export_format=doc&export_report=export_report&selectcat='.$catobj->get_id().'">'.
192
+            Display::return_icon('export_doc.png', get_lang('ExportAsDOC'), '', ICON_SIZE_MEDIUM).'</a>';
193
+        $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&print=&selectcat='.$catobj->get_id().'" target="_blank">'.
194
+            Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
195
+        $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&exportpdf=&selectcat='.$catobj->get_id().'&offset='.$offset.'&flatviewlist_page_nr='.$pageNum.'&flatviewlist_per_page='.$perPage.'" >'.
196
+            Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
197 197
         $header .= '</div>';
198 198
         echo $header;
199 199
     }
@@ -234,8 +234,8 @@  discard block
 block discarded – undo
234 234
                 $item = $evals_links[$count];
235 235
                 $score = $item->calc_score($user_id);
236 236
                 $my_score_denom = ($score[1] == 0) ? 1 : $score[1];
237
-                $item_value+=$score[0] / $my_score_denom * $item->get_weight();
238
-                $item_total+=$item->get_weight();
237
+                $item_value += $score[0] / $my_score_denom * $item->get_weight();
238
+                $item_total += $item->get_weight();
239 239
             }
240 240
             $item_value = number_format($item_value, 2, '.', ' ');
241 241
             $total_score = array($item_value, $item_total);
@@ -244,9 +244,9 @@  discard block
 block discarded – undo
244 244
             $cattotal = Category :: load(0);
245 245
             $scoretotal = $cattotal[0]->calc_score(api_get_user_id());
246 246
             $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable'));
247
-            $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . api_get_person_name($user['firstname'], $user['lastname']) . '</b><br />';
247
+            $scoreinfo = get_lang('StatsStudent').' :<b> '.api_get_person_name($user['firstname'], $user['lastname']).'</b><br />';
248 248
             if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search']))) {
249
-                $scoreinfo.= '<h2>' . get_lang('Total') . ' : ' . $scorecourse_display . '</h2>';
249
+                $scoreinfo .= '<h2>'.get_lang('Total').' : '.$scorecourse_display.'</h2>';
250 250
             }
251 251
             Display :: display_normal_message($scoreinfo, false);
252 252
         }
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
         if (($showtree == '1') || (isset($_GET['studentoverview']))) {
257 257
             $header .= '<tr>';
258 258
             if (!$selectcat == '0') {
259
-                $header .= '<td style=" "><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>';
259
+                $header .= '<td style=" "><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>';
260 260
             }
261
-            $header .= '<td style=" ">' . get_lang('CurrentCategory') . '</td>' .
261
+            $header .= '<td style=" ">'.get_lang('CurrentCategory').'</td>'.
262 262
                     '<td style=" "><form name="selector"><select name="selectcat" onchange="document.selector.submit()">';
263 263
             $cats = Category :: load();
264 264
 
@@ -271,15 +271,15 @@  discard block
 block discarded – undo
271 271
                 }
272 272
                 $line = isset($line) ? $line : '';
273 273
                 if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) {
274
-                    $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>';
274
+                    $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>';
275 275
                 } else {
276
-                    $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>';
276
+                    $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>';
277 277
                 }
278 278
                 $line = '';
279 279
             }
280 280
             $header .= '</select></form></td>';
281 281
             if (!empty($simple_search_form) && $message_resource === false) {
282
-                $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>';
282
+                $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>';
283 283
             } else {
284 284
                 $header .= '<td></td>';
285 285
             }
@@ -293,11 +293,11 @@  discard block
 block discarded – undo
293 293
                     //$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '"><img src="../img/view_list.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
294 294
                 }
295 295
             } else {
296
-                $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"><img src="../img/icons/32/pdf.png" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>';
296
+                $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank"><img src="../img/icons/32/pdf.png" alt="'.get_lang('ExportPDF').'" /> '.get_lang('ExportPDF').'</a>';
297 297
             }
298 298
             $header .= '</td></tr>';
299 299
         }
300
-        $header.='</table></div>';
300
+        $header .= '</table></div>';
301 301
 
302 302
         // for course admin & platform admin add item buttons are added to the header
303 303
         $header .= '<div class="actions">';
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
                 $my_category = $catobj->shows_all_information_an_category($catobj->get_id());
328 328
                 $my_api_cidreq = api_get_cidreq();
329 329
                 if ($my_api_cidreq == '') {
330
-                    $my_api_cidreq = 'cidReq=' . $my_category['course_code'];
330
+                    $my_api_cidreq = 'cidReq='.$my_category['course_code'];
331 331
                 }
332 332
                 if ($show_add_link && !$message_resource) {
333 333
                     //$header .= '<td><a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat=' . $catobj->get_id() . '" >'.Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'),'',ICON_SIZE_MEDIUM).'</a>';
@@ -346,28 +346,28 @@  discard block
 block discarded – undo
346 346
                     $my_course_id = api_get_course_id();
347 347
                     $my_file = substr($_SESSION['gradebook_dest'], 0, 5);
348 348
 
349
-                    $header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
350
-                        Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>';
351
-                    $header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?' . $my_api_cidreq . '&amp;cat_id=' . (int) $_GET['selectcat'] . '">' .
352
-                        Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'), '', ICON_SIZE_MEDIUM) . '</a>';
349
+                    $header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
350
+                        Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>';
351
+                    $header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?'.$my_api_cidreq.'&amp;cat_id='.(int) $_GET['selectcat'].'">'.
352
+                        Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'), '', ICON_SIZE_MEDIUM).'</a>';
353 353
 
354 354
                     $visibility_icon = ($catobj->is_visible() == 0) ? 'invisible' : 'visible';
355 355
                     $visibility_command = ($catobj->is_visible() == 0) ? 'set_visible' : 'set_invisible';
356 356
 
357 357
                     //Right icons
358
-                    $modify_icons = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>';
358
+                    $modify_icons = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>';
359 359
                     //$modify_icons .= '<a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat=' . $catobj->get_id() . '">'.
360 360
                     //Display::return_icon('certificate.png', get_lang('AttachCertificate'),'',ICON_SIZE_MEDIUM).'</a>';
361 361
                     //hide or delete are not options available
362 362
                     //$modify_icons .= '&nbsp;<a  href="' . api_get_self() . '?visiblecat=' . $catobj->get_id() . '&amp;' . $visibility_command . '=&amp;selectcat=0 ">'.Display::return_icon($visibility_icon.'.png', get_lang('Visible'),'',ICON_SIZE_MEDIUM).'</a>';
363 363
                     if ($catobj->get_name() != api_get_course_id()) {
364
-                        $modify_icons .= '&nbsp;<a  href="' . api_get_self() . '?deletecat=' . $catobj->get_id() . '&amp;selectcat=0&amp;cidReq=' . $catobj->get_course_code() . '" onclick="return confirmation();">' . Display::return_icon('delete.png', get_lang('DeleteAll'), '', ICON_SIZE_MEDIUM) . '</a>';
364
+                        $modify_icons .= '&nbsp;<a  href="'.api_get_self().'?deletecat='.$catobj->get_id().'&amp;selectcat=0&amp;cidReq='.$catobj->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('DeleteAll'), '', ICON_SIZE_MEDIUM).'</a>';
365 365
                     }
366 366
                     $header .= Display::div($modify_icons, array('class' => 'right'));
367 367
                 }
368 368
             }
369 369
         } elseif (isset($_GET['search'])) {
370
-            $header .= '<b>' . get_lang('SearchResults') . ' :</b>';
370
+            $header .= '<b>'.get_lang('SearchResults').' :</b>';
371 371
         }
372 372
         $header .= '</div>';
373 373
         echo $header;
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
                     $aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : '';
480 480
                     $aditionalButtons .= '</div>';
481 481
                 }
482
-                $scoreinfo .= '<strong>' . sprintf(get_lang('TotalX'), $scorecourse_display . $aditionalButtons). '</strong>';
482
+                $scoreinfo .= '<strong>'.sprintf(get_lang('TotalX'), $scorecourse_display.$aditionalButtons).'</strong>';
483 483
 
484 484
             }
485 485
             Display :: display_normal_message($scoreinfo, false);
@@ -490,10 +490,10 @@  discard block
 block discarded – undo
490 490
             $header = '<div class="actions"><table>';
491 491
             $header .= '<tr>';
492 492
             if (!$selectcat == '0') {
493
-                $header .= '<td><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' .
494
-                    Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>';
493
+                $header .= '<td><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'.
494
+                    Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>';
495 495
             }
496
-            $header .= '<td>' . get_lang('CurrentCategory') . '</td>' .
496
+            $header .= '<td>'.get_lang('CurrentCategory').'</td>'.
497 497
                     '<td><form name="selector"><select name="selectcat" onchange="document.selector.submit()">';
498 498
             $cats = Category :: load();
499 499
 
@@ -506,15 +506,15 @@  discard block
 block discarded – undo
506 506
                 }
507 507
                 $line = isset($line) ? $line : '';
508 508
                 if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) {
509
-                    $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>';
509
+                    $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>';
510 510
                 } else {
511
-                    $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>';
511
+                    $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>';
512 512
                 }
513 513
                 $line = '';
514 514
             }
515 515
             $header .= '</select></form></td>';
516 516
             if (!empty($simple_search_form) && $message_resource === false) {
517
-                $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>';
517
+                $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>';
518 518
             } else {
519 519
                 $header .= '<td></td>';
520 520
             }
@@ -531,11 +531,11 @@  discard block
 block discarded – undo
531 531
                     //$header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat=' . $catobj->get_id() . '"><img src="../img/view_list.gif" alt="' . get_lang('FlatView') . '" /> ' . get_lang('FlatView') . '</a>';
532 532
                 }
533 533
             } else {
534
-                $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">
535
-							<img src="../img/icons/32/pdf.png" alt="' . get_lang('ExportPDF') . '" /> ' . get_lang('ExportPDF') . '</a>';
534
+                $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank">
535
+							<img src="../img/icons/32/pdf.png" alt="' . get_lang('ExportPDF').'" /> '.get_lang('ExportPDF').'</a>';
536 536
             }
537 537
             $header .= '</td></tr>';
538
-            $header.='</table></div>';
538
+            $header .= '</table></div>';
539 539
         }
540 540
 
541 541
         // for course admin & platform admin add item buttons are added to the header
@@ -547,33 +547,33 @@  discard block
 block discarded – undo
547 547
 
548 548
         if (api_is_allowed_to_edit(null, true)) {
549 549
             if (empty($grade_model_id) || $grade_model_id == -1) {
550
-                $actionsLeft .= '<a href="gradebook_add_cat.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' .
551
-                    Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM) . '</a></td>';
550
+                $actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.
551
+                    Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM).'</a></td>';
552 552
             }
553 553
             if ($selectcat == '0') {
554 554
 
555 555
             } else {
556 556
                 $my_category = $catobj->shows_all_information_an_category($catobj->get_id());
557 557
                 if ($my_api_cidreq == '') {
558
-                    $my_api_cidreq = 'cidReq=' . $my_category['course_code'];
558
+                    $my_api_cidreq = 'cidReq='.$my_category['course_code'];
559 559
                 }
560 560
                 if ($show_add_link && !$message_resource) {
561
-                   $actionsLeft .= '<a href="gradebook_add_eval.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '" >' .
562
-                        Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM) . '</a>';
561
+                   $actionsLeft .= '<a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'" >'.
562
+                        Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM).'</a>';
563 563
                     $cats = Category :: load($selectcat);
564 564
 
565 565
                     if ($cats[0]->get_course_code() != null && !$message_resource) {
566
-                        $actionsLeft .= '<a href="gradebook_add_link.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
567
-                            Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>';
566
+                        $actionsLeft .= '<a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
567
+                            Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>';
568 568
                     } else {
569
-                        $actionsLeft .= '<a href="gradebook_add_link_select_course.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
570
-                            Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>';
569
+                        $actionsLeft .= '<a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
570
+                            Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>';
571 571
                     }
572 572
                 }
573 573
 
574 574
                 if (!$message_resource) {
575
-                    $actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
576
-                        Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>';
575
+                    $actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
576
+                        Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>';
577 577
 
578 578
                     if ($my_category['generate_certificates'] == 1) {
579 579
                         $actionsLeft .= Display::url(
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
                                         '',
584 584
                                         ICON_SIZE_MEDIUM
585 585
                                         ),
586
-                                "gradebook_display_certificate.php?$my_api_cidreq&cat_id=" . intval($_GET['selectcat'])
586
+                                "gradebook_display_certificate.php?$my_api_cidreq&cat_id=".intval($_GET['selectcat'])
587 587
                             );
588 588
                     }
589 589
 
@@ -594,30 +594,30 @@  discard block
 block discarded – undo
594 594
                                     '',
595 595
                                     ICON_SIZE_MEDIUM
596 596
                                     ),
597
-                            "gradebook_display_summary.php?$my_api_cidreq&selectcat=" . intval($_GET['selectcat'])
597
+                            "gradebook_display_summary.php?$my_api_cidreq&selectcat=".intval($_GET['selectcat'])
598 598
                         );
599 599
 
600 600
 
601 601
                     // Right icons
602
-                    $actionsRight = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&amp;cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' .
603
-                        Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>';
604
-                    $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&' . $my_api_cidreq . '&origin=gradebook&selectcat=' . $catobj->get_id() . '">' .
605
-                            Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM) . '</a>';
602
+                    $actionsRight = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&amp;cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'.
603
+                        Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>';
604
+                    $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat='.$catobj->get_id().'">'.
605
+                            Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM).'</a>';
606 606
 
607 607
                     if (empty($categories)) {
608
-                        $actionsRight .= '<a href="gradebook_edit_all.php?id_session=' . api_get_session_id() . '&amp;' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
609
-                            Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM) . '</a>';
608
+                        $actionsRight .= '<a href="gradebook_edit_all.php?id_session='.api_get_session_id().'&amp;'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
609
+                            Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM).'</a>';
610 610
                     }
611 611
                     $score_display_custom = api_get_setting('gradebook_score_display_custom');
612 612
                     if (api_get_setting('teachers_can_change_score_settings') == 'true' && $score_display_custom['my_display_custom'] == 'true') {
613
-                        $actionsRight .= '<a href="gradebook_scoring_system.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
614
-                            Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>';
613
+                        $actionsRight .= '<a href="gradebook_scoring_system.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
614
+                            Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>';
615 615
                     }
616 616
                     
617 617
                 }
618 618
             }
619 619
         } elseif (isset($_GET['search'])) {
620
-            echo $header = '<b>' . get_lang('SearchResults') . ' :</b>';
620
+            echo $header = '<b>'.get_lang('SearchResults').' :</b>';
621 621
         }
622 622
 
623 623
         $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh(
@@ -626,26 +626,26 @@  discard block
 block discarded – undo
626 626
         );
627 627
 
628 628
         if ($isDrhOfCourse) {
629
-            $$actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' .
630
-                Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>';
629
+            $$actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'.
630
+                Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>';
631 631
         }
632 632
 
633
-        if (api_is_allowed_to_edit(null, true)){
634
-            echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight ));
633
+        if (api_is_allowed_to_edit(null, true)) {
634
+            echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight));
635 635
         }
636 636
 
637 637
         if (api_is_allowed_to_edit(null, true)) {
638 638
             $weight = intval($catobj->get_weight()) > 0 ? $catobj->get_weight() : 0;
639
-            $weight = '<strong>' . get_lang('TotalWeight') . ' : </strong>' . $weight;
639
+            $weight = '<strong>'.get_lang('TotalWeight').' : </strong>'.$weight;
640 640
 
641 641
             $min_certification = (intval($catobj->get_certificate_min_score() > 0) ? $catobj->get_certificate_min_score() : 0);
642
-            $min_certification = get_lang('CertificateMinScore') . ' : ' . $min_certification;
643
-            $edit_icon = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&amp;cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' .
644
-                Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>';
642
+            $min_certification = get_lang('CertificateMinScore').' : '.$min_certification;
643
+            $edit_icon = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&amp;cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'.
644
+                Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
645 645
             //$msg = Display::tag('h3', $weight.' - '.$min_certification);
646
-            $msg = $weight . ' - ' . $min_certification . $edit_icon;
646
+            $msg = $weight.' - '.$min_certification.$edit_icon;
647 647
             //@todo show description
648
-            $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>' . get_lang('GradebookDescriptionLog') . '</strong>' . ': ' . $catobj->get_description());
648
+            $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>'.get_lang('GradebookDescriptionLog').'</strong>'.': '.$catobj->get_description());
649 649
             Display::display_normal_message($msg, false);
650 650
             if (!empty($description)) {
651 651
                 echo Display::div($description, array());
@@ -673,24 +673,24 @@  discard block
 block discarded – undo
673 673
             $cattotal = Category :: load(0);
674 674
             $scoretotal = $cattotal[0]->calc_score(api_get_user_id());
675 675
             $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable'));
676
-            $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . $user['complete_name']. '</b><br />';
676
+            $scoreinfo = get_lang('StatsStudent').' :<b> '.$user['complete_name'].'</b><br />';
677 677
             if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search'])))
678
-                $scoreinfo.= '<br />' . get_lang('TotalForThisCategory') . ' : <b>' . $scorecourse_display . '</b>';
679
-            $scoreinfo.= '<br />' . get_lang('Total') . ' : <b>' . $scoretotal_display . '</b>';
678
+                $scoreinfo .= '<br />'.get_lang('TotalForThisCategory').' : <b>'.$scorecourse_display.'</b>';
679
+            $scoreinfo .= '<br />'.get_lang('Total').' : <b>'.$scoretotal_display.'</b>';
680 680
             Display :: display_normal_message($scoreinfo, false);
681 681
         }
682 682
         // show navigation tree and buttons?
683 683
         $header = '<div class="actions">';
684 684
 
685 685
         if ($is_course_admin) {
686
-            $header .= '<a href="gradebook_flatview.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>';
687
-            $header .= '<a href="gradebook_scoring_system.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>';
686
+            $header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>';
687
+            $header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>';
688 688
         } elseif (!(isset($_GET['studentoverview']))) {
689
-            $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('view_list.gif', get_lang('FlatView')) . ' ' . get_lang('FlatView') . '</a>';
689
+            $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat='.$catobj->get_id().'">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' '.get_lang('FlatView').'</a>';
690 690
         } else {
691
-            $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">' . Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM) . '</a>';
691
+            $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank">'.Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM).'</a>';
692 692
         }
693
-        $header.='</div>';
693
+        $header .= '</div>';
694 694
         echo $header;
695 695
     }
696 696
 
@@ -717,8 +717,8 @@  discard block
 block discarded – undo
717 717
             $item = $evals_links[$count];
718 718
             $score = $item->calc_score($user_id);
719 719
             $my_score_denom = ($score[1] == 0) ? 1 : $score[1];
720
-            $item_value+=$score[0] / $my_score_denom * $item->get_weight();
721
-            $item_total+=$item->get_weight();
720
+            $item_value += $score[0] / $my_score_denom * $item->get_weight();
721
+            $item_total += $item->get_weight();
722 722
             //$row[] = $scoredisplay->display_score($score,SCORE_DIV_PERCENT);
723 723
         }
724 724
         $item_value = number_format($item_value, 2, '.', ' ');
@@ -733,17 +733,17 @@  discard block
 block discarded – undo
733 733
         $imageUrl = UserManager::getUserPicture($userid);
734 734
 
735 735
         $info = '<div class="row"><div class="col-md-3">';
736
-        $info .= '<div class="thumbnail"><img src="' . $imageUrl . '" /></div>';
736
+        $info .= '<div class="thumbnail"><img src="'.$imageUrl.'" /></div>';
737 737
         $info .= '</div>';
738 738
         $info .= '<div class="col-md-6">';
739
-        $info .= get_lang('Name') . ' :  <a target="_blank" href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php?u=' . $userid . '"> ' .
740
-            $user['complete_name'] . '</a><br />';
739
+        $info .= get_lang('Name').' :  <a target="_blank" href="'.api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$userid.'"> '.
740
+            $user['complete_name'].'</a><br />';
741 741
 
742 742
         if (api_get_setting('show_email_addresses') == 'true') {
743
-            $info .= get_lang('Email') . ' : <a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a><br />';
743
+            $info .= get_lang('Email').' : <a href="mailto:'.$user['email'].'">'.$user['email'].'</a><br />';
744 744
         }
745 745
 
746
-        $info .= get_lang('TotalUser') . ' : <b>' . $scorecourse_display . '</b>';
746
+        $info .= get_lang('TotalUser').' : <b>'.$scorecourse_display.'</b>';
747 747
         $info .= '</div>';
748 748
         $info .= '</div>';
749 749
 
Please login to merge, or discard this patch.
main/gradebook/lib/fe/gradebooktable.class.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $this->set_additional_parameters($addparams);
72 72
         }
73 73
 
74
-        $column= 0;
74
+        $column = 0;
75 75
         if ($this->teacherView) {
76 76
             if ($this->exportToPdf == false) {
77 77
                 $this->set_header($column++, '', '', 'width="25px"');
@@ -283,13 +283,13 @@  discard block
 block discarded – undo
283 283
                 $main_categories[$item->get_id()]['name'] = $item->get_name();
284 284
             } else {
285 285
                 $name = $this->build_name_link($item, $type);
286
-                $row[] = $invisibility_span_open.$name. $invisibility_span_close;
286
+                $row[] = $invisibility_span_open.$name.$invisibility_span_close;
287 287
                 $main_categories[$item->get_id()]['name'] = $name;
288 288
             }
289 289
 
290 290
             $this->dataForGraph['categories'][] = $item->get_name();
291 291
 
292
-            $main_categories[$item->get_id()]['weight']= $item->get_weight();
292
+            $main_categories[$item->get_id()]['weight'] = $item->get_weight();
293 293
             $total_categories_weight += $item->get_weight();
294 294
 
295 295
             // Description.
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
             );
310 310
 
311 311
             if ($this->teacherView) {
312
-                $row[] = $invisibility_span_open .Display::tag('p', $weight, array('class' => 'score')).$invisibility_span_close;
312
+                $row[] = $invisibility_span_open.Display::tag('p', $weight, array('class' => 'score')).$invisibility_span_close;
313 313
             } else {
314
-                $row[] = $invisibility_span_open .$weight.$invisibility_span_close;
314
+                $row[] = $invisibility_span_open.$weight.$invisibility_span_close;
315 315
             }
316 316
 
317 317
             $category_weight = $item->get_weight();
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
                 if (!empty($score[1])) {
339 339
                     $completeScore = $scoredisplay->display_score($score, SCORE_DIV_PERCENT);
340
-                    $score = $score[0]/$score[1]*$item->get_weight();
340
+                    $score = $score[0] / $score[1] * $item->get_weight();
341 341
                     $score = $scoredisplay->display_score(array($score, null), SCORE_SIMPLE);
342 342
                     $scoreToDisplay = Display::tip($score, $completeScore);
343 343
                 } else {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
                     $totalResultAverageValue = strip_tags($scoredisplay->display_score($totalResult, SCORE_AVERAGE));
374 374
                     $this->dataForGraph['my_result'][] = (float) str_replace('%', '', $totalResultAverageValue);
375 375
                     $totalAverageValue = strip_tags($scoredisplay->display_score($totalAverage, SCORE_AVERAGE));
376
-                    $this->dataForGraph['average'][] =  (float) str_replace('%', '', $totalAverageValue);
376
+                    $this->dataForGraph['average'][] = (float) str_replace('%', '', $totalAverageValue);
377 377
                     // Ranking
378 378
                     $row[] = $ranking;
379 379
                     // Best
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                         $row[] = $this->build_type_column($item, array('style' => 'padding-left:5px'));
457 457
 
458 458
                         // Name.
459
-                        $row[] = $invisibility_span_open."&nbsp;&nbsp;&nbsp;  ".$this->build_name_link($item, $type) . $invisibility_span_close;
459
+                        $row[] = $invisibility_span_open."&nbsp;&nbsp;&nbsp;  ".$this->build_name_link($item, $type).$invisibility_span_close;
460 460
 
461 461
                         // Description.
462 462
                         if ($this->exportToPdf == false) {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
                             // Students get the results and certificates columns
495 495
                             $eval_n_links = array_merge($alleval, $alllink);
496 496
 
497
-                            if (count($eval_n_links)> 0) {
497
+                            if (count($eval_n_links) > 0) {
498 498
                                 $value_data = isset($data[4]) ? $data[4] : null;
499 499
 
500 500
                                 if (!is_null($value_data)) {
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
                 $row = array(
594 594
                     null,
595 595
                     null,
596
-                    '<strong>' . get_lang('Total') . '</strong>',
596
+                    '<strong>'.get_lang('Total').'</strong>',
597 597
                     null,
598 598
                     $total
599 599
                 );
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
                 if ($this->exportToPdf) {
664 664
                     $row = array(
665 665
                         null,
666
-                        '<h3>' . get_lang('Total') . '</h3>',
666
+                        '<h3>'.get_lang('Total').'</h3>',
667 667
                         $main_weight,
668 668
                         $totalResult,
669 669
                         $totalRanking,
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
                 } else {
674 674
                     $row = array(
675 675
                         null,
676
-                        '<h3>' . get_lang('Total') . '</h3>',
676
+                        '<h3>'.get_lang('Total').'</h3>',
677 677
                         null,
678 678
                         $main_weight,
679 679
                         $totalResult,
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
         }
689 689
 
690 690
         // Warning messages
691
-        $view = isset($_GET['view']) ? $_GET['view']: null;
691
+        $view = isset($_GET['view']) ? $_GET['view'] : null;
692 692
 
693 693
         if ($this->teacherView) {
694 694
             if (isset($_GET['selectcat']) &&
@@ -701,14 +701,14 @@  discard block
 block discarded – undo
701 701
                 $weight_category = intval($this->build_weight($category[0]));
702 702
 
703 703
                 $course_code = $this->build_course_code($category[0]);
704
-                $weight_total_links  = round($weight_total_links);
704
+                $weight_total_links = round($weight_total_links);
705 705
 
706 706
                 if ($weight_total_links > $weight_category ||
707 707
                     $weight_total_links < $weight_category ||
708 708
                     $weight_total_links > $weight_category
709 709
                 ) {
710 710
                     $warning_message = sprintf(get_lang('TotalWeightMustBeX'), $weight_category);
711
-                    $modify_icons  = '<a href="gradebook_edit_cat.php?editcat='.$id_cat.'&cidReq='.$course_code.'&id_session='.api_get_session_id().'">'.
711
+                    $modify_icons = '<a href="gradebook_edit_cat.php?editcat='.$id_cat.'&cidReq='.$course_code.'&id_session='.api_get_session_id().'">'.
712 712
                         Display::return_icon('edit.png', $warning_message, array(), ICON_SIZE_SMALL).'</a>';
713 713
                     $warning_message .= $modify_icons;
714 714
                     Display::display_warning_message($warning_message, false);
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
                 );
722 722
 
723 723
                 if (!empty($content_html)) {
724
-                    $new_content = explode('</head>',$content_html['content']);
724
+                    $new_content = explode('</head>', $content_html['content']);
725 725
                 }
726 726
 
727 727
                 if (empty($new_content[0])) {
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
                     is_array($course_codes)
756 756
                 ) {
757 757
                     $warning_message = '';
758
-                    for ($x = 0; $x<count($weight_categories);$x++) {
758
+                    for ($x = 0; $x < count($weight_categories); $x++) {
759 759
                         $weight_category = intval($weight_categories[$x]);
760 760
                         $certificate_min_score = intval($certificate_min_scores[$x]);
761 761
                         $course_code = $course_codes[$x];
@@ -763,12 +763,12 @@  discard block
 block discarded – undo
763 763
                         if (empty($certificate_min_score) ||
764 764
                             ($certificate_min_score > $weight_category)
765 765
                         ) {
766
-                            $warning_message .= $course_code .'&nbsp;-&nbsp;'.get_lang('CertificateMinimunScoreIsRequiredAndMustNotBeMoreThan').'&nbsp;'.$weight_category.'<br />';
766
+                            $warning_message .= $course_code.'&nbsp;-&nbsp;'.get_lang('CertificateMinimunScoreIsRequiredAndMustNotBeMoreThan').'&nbsp;'.$weight_category.'<br />';
767 767
                         }
768 768
                     }
769 769
 
770 770
                     if (!empty($warning_message)) {
771
-                        Display::display_warning_message($warning_message,false);
771
+                        Display::display_warning_message($warning_message, false);
772 772
                     }
773 773
                 }
774 774
             }
@@ -812,15 +812,15 @@  discard block
 block discarded – undo
812 812
             $pChart->Antialias = FALSE;
813 813
 
814 814
             /* Add a border to the picture */
815
-            $pChart->drawRectangle(0,0,$xSize-10,$ySize-10,array("R"=>0,"G"=>0,"B"=>0));
815
+            $pChart->drawRectangle(0, 0, $xSize - 10, $ySize - 10, array("R"=>0, "G"=>0, "B"=>0));
816 816
 
817
-            $pChart->drawText(10,16,get_lang('Results'),array("FontSize"=>11,"Align"=>TEXT_ALIGN_BOTTOMLEFT));
817
+            $pChart->drawText(10, 16, get_lang('Results'), array("FontSize"=>11, "Align"=>TEXT_ALIGN_BOTTOMLEFT));
818 818
 
819
-            $pChart->setGraphArea(50, 30, $xSize-50, $ySize-50);
819
+            $pChart->setGraphArea(50, 30, $xSize - 50, $ySize - 50);
820 820
 
821 821
             $pChart->setFontProperties(
822 822
                 array(
823
-                    'FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf',
823
+                    'FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf',
824 824
                     'FontSize' => 10,
825 825
                 )
826 826
             );
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 
841 841
             /* Draw the line chart */
842 842
             $pChart->drawLineChart();
843
-            $pChart->drawPlotChart(array("DisplayValues"=>TRUE,"PlotBorder"=>TRUE,"BorderSize"=>2,"Surrounding"=>-60,"BorderAlpha"=>80));
843
+            $pChart->drawPlotChart(array("DisplayValues"=>TRUE, "PlotBorder"=>TRUE, "BorderSize"=>2, "Surrounding"=>-60, "BorderAlpha"=>80));
844 844
 
845 845
             /* Write the chart legend */
846 846
             $pChart->drawLegend(
@@ -860,13 +860,13 @@  discard block
 block discarded – undo
860 860
             $chartHash = $myCache->getHash($dataSet);
861 861
 
862 862
             $myCache->writeToCache($chartHash, $pChart);
863
-            $imgSysPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash;
863
+            $imgSysPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash;
864 864
             $myCache->saveFromCache($chartHash, $imgSysPath);
865
-            $imgWebPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash;
865
+            $imgWebPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash;
866 866
 
867 867
             if (file_exists($imgSysPath)) {
868 868
                 $result = '<div id="contentArea" style="text-align: center;" >';
869
-                $result .= '<img src="' . $imgWebPath.'" >';
869
+                $result .= '<img src="'.$imgWebPath.'" >';
870 870
                 $result .= '</div>';
871 871
                 return $result;
872 872
             }
@@ -911,13 +911,13 @@  discard block
 block discarded – undo
911 911
         switch ($item->get_item_type()) {
912 912
             // category
913 913
             case 'C' :
914
-                return 'CATE' . $item->get_id();
914
+                return 'CATE'.$item->get_id();
915 915
             // evaluation
916 916
             case 'E' :
917
-                return 'EVAL' . $item->get_id();
917
+                return 'EVAL'.$item->get_id();
918 918
             // link
919 919
             case 'L' :
920
-                return 'LINK' . $item->get_id();
920
+                return 'LINK'.$item->get_id();
921 921
         }
922 922
     }
923 923
 
@@ -945,20 +945,20 @@  discard block
 block discarded – undo
945 945
         switch ($item->get_item_type()) {
946 946
             // category
947 947
             case 'C' :
948
-                $prms_uri='?selectcat=' . $item->get_id() . '&amp;view='.$view;
948
+                $prms_uri = '?selectcat='.$item->get_id().'&amp;view='.$view;
949 949
 
950 950
                 if (isset($_GET['isStudentView'])) {
951
-                    if ( isset($is_student) || ( isset($_SESSION['studentview']) && $_SESSION['studentview']=='studentview') ) {
952
-                        $prms_uri=$prms_uri.'&amp;isStudentView='.Security::remove_XSS($_GET['isStudentView']);
951
+                    if (isset($is_student) || (isset($_SESSION['studentview']) && $_SESSION['studentview'] == 'studentview')) {
952
+                        $prms_uri = $prms_uri.'&amp;isStudentView='.Security::remove_XSS($_GET['isStudentView']);
953 953
                     }
954 954
                 }
955 955
 
956 956
                 $cat = new Category();
957
-                $show_message=$cat->show_message_resource_delete($item->get_course_code());
957
+                $show_message = $cat->show_message_resource_delete($item->get_course_code());
958 958
                 return '&nbsp;<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).$prms_uri.'">'
959 959
                 . $item->get_name()
960 960
                 . '</a>'
961
-                . ($item->is_course() ? ' &nbsp;[' . $item->get_course_code() . ']'.$show_message : '');
961
+                . ($item->is_course() ? ' &nbsp;['.$item->get_course_code().']'.$show_message : '');
962 962
                 // evaluation
963 963
             case 'E' :
964 964
                 $cat = new Category();
@@ -966,10 +966,10 @@  discard block
 block discarded – undo
966 966
                 $show_message = $cat->show_message_resource_delete($course_id);
967 967
 
968 968
                 // course/platform admin can go to the view_results page
969
-                if (api_is_allowed_to_edit() && $show_message===false) {
969
+                if (api_is_allowed_to_edit() && $show_message === false) {
970 970
                     if ($item->get_type() == 'presence') {
971 971
                         return '&nbsp;'
972
-                        . '<a href="gradebook_view_result.php?cidReq='.$course_id.'&amp;selecteval=' . $item->get_id() . '">'
972
+                        . '<a href="gradebook_view_result.php?cidReq='.$course_id.'&amp;selecteval='.$item->get_id().'">'
973 973
                         . $item->get_name()
974 974
                         . '</a>';
975 975
                     } else {
@@ -978,20 +978,20 @@  discard block
 block discarded – undo
978 978
                             $extra = '';
979 979
                         }
980 980
                         return '&nbsp;'
981
-                        . '<a href="gradebook_view_result.php?' . api_get_cidreq() . '&selecteval=' . $item->get_id() . '">'
981
+                        . '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval='.$item->get_id().'">'
982 982
                         . $item->get_name()
983 983
                         . '</a>&nbsp;'.$extra;
984 984
                     }
985
-                } elseif (ScoreDisplay :: instance()->is_custom() && $show_message===false) {
985
+                } elseif (ScoreDisplay :: instance()->is_custom() && $show_message === false) {
986 986
                     // students can go to the statistics page (if custom display enabled)
987 987
                     return '&nbsp;'
988
-                    . '<a href="gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . $item->get_id() . '">'
988
+                    . '<a href="gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.$item->get_id().'">'
989 989
                     . $item->get_name()
990 990
                     . '</a>';
991 991
 
992 992
                 } elseif ($show_message === false && !api_is_allowed_to_edit() && !ScoreDisplay :: instance()->is_custom()) {
993 993
                     return '&nbsp;'
994
-                    . '<a href="gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . $item->get_id() . '">'
994
+                    . '<a href="gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.$item->get_id().'">'
995 995
                     . $item->get_name()
996 996
                     . '</a>';
997 997
                 } else {
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
                 $url = $item->get_link();
1007 1007
 
1008 1008
                 if (isset($url) && $show_message === false) {
1009
-                    $text = '&nbsp;<a href="' . $item->get_link() . '">'
1009
+                    $text = '&nbsp;<a href="'.$item->get_link().'">'
1010 1010
                         . $item->get_name()
1011 1011
                         . '</a>';
1012 1012
                 } else {
Please login to merge, or discard this patch.
main/gradebook/lib/fe/linkform.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,17 +56,17 @@  discard block
 block discarded – undo
56 56
 
57 57
 	protected function build_move()
58 58
 	{
59
-		$renderer =& $this->defaultRenderer();
59
+		$renderer = & $this->defaultRenderer();
60 60
 		$renderer->setCustomElementTemplate('<span>{element}</span> ');
61
-		$this->addElement('static',null,null,'"'.$this->link_object->get_name().'" ');
62
-		$this->addElement('static',null,null,get_lang('MoveTo').' : ');
63
-		$select = $this->addElement('select','move_cat',null,null);
61
+		$this->addElement('static', null, null, '"'.$this->link_object->get_name().'" ');
62
+		$this->addElement('static', null, null, get_lang('MoveTo').' : ');
63
+		$select = $this->addElement('select', 'move_cat', null, null);
64 64
 		$line = '';
65 65
 		foreach ($this->link_object->get_target_categories() as $cat) {
66
-			for ($i=0;$i<$cat[2];$i++) {
66
+			for ($i = 0; $i < $cat[2]; $i++) {
67 67
 				$line .= '&mdash;';
68 68
 			}
69
-			$select->addoption($line.' '.$cat[1],$cat[0]);
69
+			$select->addoption($line.' '.$cat[1], $cat[0]);
70 70
 			$line = '';
71 71
 		}
72 72
 		$this->addElement('submit', null, get_lang('Ok'));
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		$link = LinkFactory::create($link);
134 134
 		if (!empty($courseCode)) {
135 135
 			$link->set_course_code($courseCode);
136
-		} elseif(!empty($_GET['course_code'])) {
136
+		} elseif (!empty($_GET['course_code'])) {
137 137
 			$link->set_course_code(Database::escape_string($_GET['course_code'], null, false));
138 138
 		}
139 139
 
Please login to merge, or discard this patch.
main/gradebook/lib/fe/catform.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
      */
53 53
     protected function build_move_form()
54 54
     {
55
-        $renderer =& $this->defaultRenderer();
55
+        $renderer = & $this->defaultRenderer();
56 56
         $renderer->setCustomElementTemplate('<span>{element}</span> ');
57 57
         $this->addElement(
58 58
             'static',
59 59
             null,
60 60
             null,
61
-            '"' . $this->category_object->get_name() . '" '
61
+            '"'.$this->category_object->get_name().'" '
62 62
         );
63
-        $this->addElement('static', null, null, get_lang('MoveTo') . ' : ');
63
+        $this->addElement('static', null, null, get_lang('MoveTo').' : ');
64 64
         $select = $this->addElement('select', 'move_cat', null, null);
65 65
         $line = null;
66 66
         foreach ($this->category_object->get_target_categories() as $cat) {
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
                 $line .= '--';
69 69
             }
70 70
             if ($cat[0] != $this->category_object->get_parent_id()) {
71
-                $select->addoption($line . ' ' . $cat[1], $cat[0]);
71
+                $select->addoption($line.' '.$cat[1], $cat[0]);
72 72
             } else {
73
-                $select->addoption($line . ' ' . $cat[1], $cat[0], 'disabled');
73
+                $select->addoption($line.' '.$cat[1], $cat[0], 'disabled');
74 74
             }
75 75
             $line = '';
76 76
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $grade_model_id = $this->category_object->get_grade_model_id();
154 154
 
155 155
         if (empty($links)) {
156
-            $grade_model_id    = 0;
156
+            $grade_model_id = 0;
157 157
         }
158 158
 
159 159
         $category_name = $this->category_object->get_name();
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                     [
243 243
                         'id' => 'skills',
244 244
                         'multiple' => 'multiple',
245
-                        'url' => api_get_path(WEB_AJAX_PATH) . 'skill.ajax.php?a=search_skills'
245
+                        'url' => api_get_path(WEB_AJAX_PATH).'skill.ajax.php?a=search_skills'
246 246
                     ]
247 247
                 );
248 248
 
@@ -400,14 +400,14 @@  discard block
 block discarded – undo
400 400
         //only return courses that are not yet created by the teacher
401 401
 
402 402
         foreach ($coursecat as $row) {
403
-            $select->addoption($row[1],$row[0]);
403
+            $select->addoption($row[1], $row[0]);
404 404
         }
405 405
         $this->setDefaults(array(
406 406
             'hid_user_id' => $this->category_object->get_user_id(),
407 407
             'hid_parent_id' => $this->category_object->get_parent_id()
408 408
         ));
409
-        $this->addElement('hidden','hid_user_id');
410
-        $this->addElement('hidden','hid_parent_id');
409
+        $this->addElement('hidden', 'hid_user_id');
410
+        $this->addElement('hidden', 'hid_parent_id');
411 411
         $this->addElement('submit', null, get_lang('Ok'));
412 412
     }
413 413
 
Please login to merge, or discard this patch.
main/gradebook/lib/fe/resulttable.class.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	/**
19 19
 	 * Constructor
20 20
 	 */
21
-    public function ResultTable ($evaluation, $results = array(), $iscourse, $addparams = null,$forprint = false)
21
+    public function ResultTable($evaluation, $results = array(), $iscourse, $addparams = null, $forprint = false)
22 22
 	{
23
-    	parent :: __construct ('resultlist', null, null, (api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1);
23
+    	parent :: __construct('resultlist', null, null, (api_is_western_name_order() xor api_sort_by_first_name()) ? 2 : 1);
24 24
 
25 25
 		$this->datagen = new ResultsDataGenerator($evaluation, $results, true);
26 26
 
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
 		$this->iscourse = $iscourse;
29 29
 		$this->forprint = $forprint;
30 30
 
31
-		if (isset ($addparams))  {
31
+		if (isset ($addparams)) {
32 32
 			$this->set_additional_parameters($addparams);
33 33
 		}
34 34
 		$scoredisplay = ScoreDisplay :: instance();
35
-		$column= 0;
35
+		$column = 0;
36 36
 		if ($this->iscourse == '1') {
37 37
 			$this->set_header($column++, '', false);
38
-			$this->set_form_actions(array (
38
+			$this->set_form_actions(array(
39 39
 					'delete' => get_lang('Delete')
40 40
 			));
41 41
 		}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			$this->set_header($column++, get_lang('Display'));
52 52
 		}
53 53
 		if (!$this->forprint) {
54
-			$this->set_header($column++, get_lang('Modify'),false);
54
+			$this->set_header($column++, get_lang('Modify'), false);
55 55
 		}
56 56
     }
57 57
 
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
 	/**
60 60
 	 * Function used by SortableTable to get total number of items in the table
61 61
 	 */
62
-	function get_total_number_of_items () {
62
+	function get_total_number_of_items() {
63 63
 		return $this->datagen->get_total_results_count();
64 64
 	}
65 65
 
66 66
 	/**
67 67
 	 * Function used by SortableTable to generate the data to display
68 68
 	 */
69
-	function get_table_data ($from = 1, $per_page = null, $column = null, $direction = null, $sort = null) {
69
+	function get_table_data($from = 1, $per_page = null, $column = null, $direction = null, $sort = null) {
70 70
 
71 71
 		$is_western_name_order = api_is_western_name_order();
72 72
 		$scoredisplay = ScoreDisplay :: instance();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 		// generate the data to display
112 112
 		$sortable_data = array();
113 113
 		foreach ($data_array as $item) {
114
-			$row = array ();
114
+			$row = array();
115 115
 			if ($this->iscourse == '1') {
116 116
 				 $row[] = $item['result_id'];
117 117
 			}
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
 				$row[] = $item['firstname'];
124 124
 			}
125 125
 
126
-			$row[] =  Display::bar_progress($item['percentage_score'], false, $item['score']);
126
+			$row[] = Display::bar_progress($item['percentage_score'], false, $item['score']);
127 127
             //$row[] =  Display::bar_progress($item['percentage_score'], true);
128 128
 			if ($scoredisplay->is_custom()) {
129 129
 				$row[] = $item['display'];
130 130
 			}
131 131
 			if (!$this->forprint) {
132
-				$row[] = $this->build_edit_column ($item);
132
+				$row[] = $this->build_edit_column($item);
133 133
 			}
134 134
 			$sortable_data[] = $row;
135 135
 		}
@@ -137,32 +137,32 @@  discard block
 block discarded – undo
137 137
 		return $sortable_data;
138 138
 	}
139 139
 
140
-	private function build_edit_column ($item)
140
+	private function build_edit_column($item)
141 141
 	{
142
-		$status=CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
142
+		$status = CourseManager::get_user_in_course_status(api_get_user_id(), api_get_course_id());
143 143
 		$locked_status = $this->evaluation->get_locked();
144 144
 		if (api_is_allowed_to_edit(null, true) && $locked_status == 0) {
145 145
 			//api_is_course_admin()
146
-			$edit_column = '<a href="' . api_get_self() . '?editres=' . $item['result_id'] . '&selecteval=' . $this->evaluation->get_id().'&'.api_get_cidreq().'">'.
147
-				Display::return_icon('edit.png', get_lang('Modify'),'','22').'</a>';
148
-			$edit_column .= ' <a href="' . api_get_self() . '?delete_mark=' . $item['result_id'] . '&selecteval=' . $this->evaluation->get_id().'&'.api_get_cidreq().'">'.
149
-				Display::return_icon('delete.png', get_lang('Delete'),'','22').'</a>';
146
+			$edit_column = '<a href="'.api_get_self().'?editres='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">'.
147
+				Display::return_icon('edit.png', get_lang('Modify'), '', '22').'</a>';
148
+			$edit_column .= ' <a href="'.api_get_self().'?delete_mark='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">'.
149
+				Display::return_icon('delete.png', get_lang('Delete'), '', '22').'</a>';
150 150
 		}
151 151
 		if ($this->evaluation->get_course_code() == null) {
152
-			$edit_column.= '&nbsp;<a href="' . api_get_self() . '?resultdelete=' . $item['result_id'] . '&selecteval=' . $this->evaluation->get_id() . '" onclick="return confirmationuser();">
153
-			<img src="../img/delete.gif" border="0" title="' . get_lang('Delete') . '" alt="" /></a>';
154
-		    $edit_column.= '&nbsp;<a href="user_stats.php?userid=' . $item['id'] . '&selecteval=' . $this->evaluation->get_id() . '&'.api_get_cidreq().'">
155
-		    <img src="../img/statistics.gif" width="17px" border="0" title="' . get_lang('Statistics') . '" alt="" /></a>';
152
+			$edit_column .= '&nbsp;<a href="'.api_get_self().'?resultdelete='.$item['result_id'].'&selecteval='.$this->evaluation->get_id().'" onclick="return confirmationuser();">
153
+			<img src="../img/delete.gif" border="0" title="' . get_lang('Delete').'" alt="" /></a>';
154
+		    $edit_column .= '&nbsp;<a href="user_stats.php?userid='.$item['id'].'&selecteval='.$this->evaluation->get_id().'&'.api_get_cidreq().'">
155
+		    <img src="../img/statistics.gif" width="17px" border="0" title="' . get_lang('Statistics').'" alt="" /></a>';
156 156
 		}
157 157
 		// Evaluation's origin is a link
158 158
 		if ($this->evaluation->get_category_id() < 0) {
159
-			$link = LinkFactory :: get_evaluation_link ($this->evaluation->get_id());
159
+			$link = LinkFactory :: get_evaluation_link($this->evaluation->get_id());
160 160
 
161 161
 			$doc_url = $link->get_view_url($item['id']);
162 162
 
163 163
 			if ($doc_url != null) {
164
-				$edit_column .= '&nbsp;<a href="'. $doc_url . '" target="_blank">'
165
-								.'<img src="'. api_get_path(WEB_CODE_PATH) . 'img/link.gif" border="0" title="' . get_lang('OpenDocument') . '" alt="" />'
164
+				$edit_column .= '&nbsp;<a href="'.$doc_url.'" target="_blank">'
165
+								.'<img src="'.api_get_path(WEB_CODE_PATH).'img/link.gif" border="0" title="'.get_lang('OpenDocument').'" alt="" />'
166 166
 								.'</a>';
167 167
 			}
168 168
 		}
Please login to merge, or discard this patch.