Completed
Push — 1.11.x ( d00fca...f1f062 )
by José
28:05
created
src/Chamilo/CoreBundle/Entity/SkillRelUserComment.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 
115 115
     /**
116 116
      * Get feedbackDateTime
117
-     * @return type
117
+     * @return \DateTime
118 118
      */
119 119
     public function getFeedbackDateTime()
120 120
     {
Please login to merge, or discard this patch.
main/inc/lib/surveymanager.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -47,20 +47,20 @@  discard block
 block discarded – undo
47 47
         $res = Database::query($sql);
48 48
         $refs = array();
49 49
         $list = array();
50
-        $plain_array=array();
50
+        $plain_array = array();
51 51
 
52 52
         while ($survey = Database::fetch_array($res, 'ASSOC')) {
53
-            $plain_array[$survey['survey_id']]=$survey;
54
-            $surveys_parents[]=$survey['survey_version'];
55
-            $thisref = &$refs[ $survey['survey_id'] ];
53
+            $plain_array[$survey['survey_id']] = $survey;
54
+            $surveys_parents[] = $survey['survey_version'];
55
+            $thisref = &$refs[$survey['survey_id']];
56 56
             $thisref['parent_id'] = $survey['parent_id'];
57 57
             $thisref['name'] = $survey['name'];
58 58
             $thisref['id'] = $survey['survey_id'];
59 59
             $thisref['survey_version'] = $survey['survey_version'];
60 60
             if ($survey['parent_id'] == 0) {
61
-                $list[ $survey['survey_id'] ] = &$thisref;
61
+                $list[$survey['survey_id']] = &$thisref;
62 62
             } else {
63
-                $refs[ $survey['parent_id'] ]['children'][ $survey['survey_id'] ] = &$thisref;
63
+                $refs[$survey['parent_id']]['children'][$survey['survey_id']] = &$thisref;
64 64
             }
65 65
         }
66 66
         $this->surveylist = $list;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function getParentId($id)
80 80
     {
81 81
         $node = $this->plainsurveylist[$id];
82
-        if (is_array($node)&& !empty($node['parent_id'])) {
82
+        if (is_array($node) && !empty($node['parent_id'])) {
83 83
             return $node['parent_id'];
84 84
         } else {
85 85
             return -1;
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
         if (is_array($list)) {
100 100
             foreach ($list as $key => $node) {
101 101
                 if (isset($node['children']) && is_array($node['children'])) {
102
-                    $result[$key]= $node['name'];
102
+                    $result[$key] = $node['name'];
103 103
                     $re = self::createList($node['children']);
104 104
                     if (!empty($re)) {
105 105
                         if (is_array($re)) {
106 106
                             foreach ($re as $key => $r) {
107
-                                $result[$key] = '' . $r;
107
+                                $result[$key] = ''.$r;
108 108
                             }
109 109
                         } else {
110 110
                             $result[] = $re;
Please login to merge, or discard this patch.
main/survey/preview.php 2 patches
Indentation   +98 added lines, -98 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 // We exit here if there is no valid $_GET parameter
45 45
 if (!isset($_GET['survey_id']) || !is_numeric($_GET['survey_id'])) {
46 46
     api_not_allowed(true, Display::return_message(get_lang('InvallidSurvey'), 'error', false));
47
-	exit;
47
+    exit;
48 48
 }
49 49
 
50 50
 // Getting the survey information
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
 
54 54
 if (empty($survey_data)) {
55 55
     api_not_allowed(true, Display::return_message(get_lang('InvallidSurvey'), 'error', false));
56
-	exit;
56
+    exit;
57 57
 }
58 58
 
59 59
 $urlname = strip_tags($survey_data['title']);
60 60
 if (api_is_allowed_to_edit()) {
61
-	// Breadcrumbs
62
-	$interbreadcrumb[] = array(
61
+    // Breadcrumbs
62
+    $interbreadcrumb[] = array(
63 63
         'url' => api_get_path(WEB_CODE_PATH).'survey/survey_list.php?'.api_get_cidreq(),
64 64
         'name' => get_lang('SurveyList')
65 65
     );
@@ -86,57 +86,57 @@  discard block
 block discarded – undo
86 86
 $counter_question = 0;
87 87
 // Only a course admin is allowed to preview a survey: you are a course admin
88 88
 if (api_is_course_admin() ||
89
-	(api_is_course_admin() && $_GET['isStudentView'] == 'true') ||
90
-	api_is_allowed_to_session_edit(false, true)
89
+    (api_is_course_admin() && $_GET['isStudentView'] == 'true') ||
90
+    api_is_allowed_to_session_edit(false, true)
91 91
 ) {
92
-	// Survey information
93
-	echo '<div id="survey_title">'.$survey_data['survey_title'].'</div>';
94
-	echo '<div id="survey_subtitle">'.$survey_data['survey_subtitle'].'</div>';
92
+    // Survey information
93
+    echo '<div id="survey_title">'.$survey_data['survey_title'].'</div>';
94
+    echo '<div id="survey_subtitle">'.$survey_data['survey_subtitle'].'</div>';
95 95
 
96
-	// Displaying the survey introduction
97
-	if (!isset($_GET['show'])) {
96
+    // Displaying the survey introduction
97
+    if (!isset($_GET['show'])) {
98 98
         if (!empty($survey_data['survey_introduction'])) {
99 99
             echo '<div id="survey_content" class="survey_content">'.$survey_data['survey_introduction'].'</div>';
100 100
         }
101
-		$limit = 0;
102
-	}
101
+        $limit = 0;
102
+    }
103 103
 
104
-	// Displaying the survey thanks message
105
-	if (isset($_POST['finish_survey'])) {
106
-		Display::display_confirmation_message(get_lang('SurveyFinished'));
104
+    // Displaying the survey thanks message
105
+    if (isset($_POST['finish_survey'])) {
106
+        Display::display_confirmation_message(get_lang('SurveyFinished'));
107 107
         echo $survey_data['survey_thanks'];
108
-		Display :: display_footer();
109
-		exit;
110
-	}
108
+        Display :: display_footer();
109
+        exit;
110
+    }
111 111
 
112 112
     $questions = array();
113 113
 
114
-	if (isset($_GET['show'])) {
115
-		// Getting all the questions for this page and add them to a
116
-		// multidimensional array where the first index is the page.
117
-		// as long as there is no pagebreak fount we keep adding questions to the page
118
-		$questions_displayed = array();
119
-		$paged_questions = array();
120
-		$counter = 0;
121
-		$sql = "SELECT * FROM $table_survey_question
114
+    if (isset($_GET['show'])) {
115
+        // Getting all the questions for this page and add them to a
116
+        // multidimensional array where the first index is the page.
117
+        // as long as there is no pagebreak fount we keep adding questions to the page
118
+        $questions_displayed = array();
119
+        $paged_questions = array();
120
+        $counter = 0;
121
+        $sql = "SELECT * FROM $table_survey_question
122 122
 		        WHERE c_id = $course_id AND survey_id = '".intval($survey_id)."'
123 123
 				ORDER BY sort ASC";
124
-		$result = Database::query($sql);
124
+        $result = Database::query($sql);
125 125
         $questions_exists = true;
126 126
         if (Database::num_rows($result)) {
127
-    		while ($row = Database::fetch_array($result)) {
128
-    			if ($row['type'] == 'pagebreak') {
129
-    				$counter++;
130
-    			} else {
131
-    				$paged_questions[$counter][] = $row['question_id'];
132
-    			}
133
-    		}
127
+            while ($row = Database::fetch_array($result)) {
128
+                if ($row['type'] == 'pagebreak') {
129
+                    $counter++;
130
+                } else {
131
+                    $paged_questions[$counter][] = $row['question_id'];
132
+                }
133
+            }
134 134
         } else {
135 135
             $questions_exists = false;
136 136
         }
137 137
 
138
-		if (array_key_exists($_GET['show'], $paged_questions)) {
139
-			$sql = "SELECT
138
+        if (array_key_exists($_GET['show'], $paged_questions)) {
139
+            $sql = "SELECT
140 140
                         survey_question.question_id,
141 141
                         survey_question.survey_id,
142 142
                         survey_question.survey_question,
@@ -158,75 +158,75 @@  discard block
 block discarded – undo
158 158
 						survey_question.c_id =  $course_id
159 159
 					ORDER BY survey_question.sort, survey_question_option.sort ASC";
160 160
 
161
-			$result = Database::query($sql);
162
-			$question_counter_max = Database::num_rows($result);
163
-			$limit = 0;
164
-			while ($row = Database::fetch_array($result)) {
165
-				// If the type is not a pagebreak we store it in the $questions array
166
-				if ($row['type'] != 'pagebreak') {
167
-					$questions[$row['sort']]['question_id'] = $row['question_id'];
168
-					$questions[$row['sort']]['survey_id'] = $row['survey_id'];
169
-					$questions[$row['sort']]['survey_question'] = $row['survey_question'];
170
-					$questions[$row['sort']]['display'] = $row['display'];
171
-					$questions[$row['sort']]['type'] = $row['type'];
172
-					$questions[$row['sort']]['options'][intval($row['option_sort'])] = $row['option_text'];
173
-					$questions[$row['sort']]['maximum_score'] = $row['max_value'];
174
-				} else {
175
-					// If the type is a pagebreak we are finished loading the questions for this page
176
-					break;
177
-				}
178
-				$counter_question++;
179
-			}
180
-		}
181
-	}
182
-
183
-	// Selecting the maximum number of pages
184
-	$sql = "SELECT * FROM $table_survey_question
161
+            $result = Database::query($sql);
162
+            $question_counter_max = Database::num_rows($result);
163
+            $limit = 0;
164
+            while ($row = Database::fetch_array($result)) {
165
+                // If the type is not a pagebreak we store it in the $questions array
166
+                if ($row['type'] != 'pagebreak') {
167
+                    $questions[$row['sort']]['question_id'] = $row['question_id'];
168
+                    $questions[$row['sort']]['survey_id'] = $row['survey_id'];
169
+                    $questions[$row['sort']]['survey_question'] = $row['survey_question'];
170
+                    $questions[$row['sort']]['display'] = $row['display'];
171
+                    $questions[$row['sort']]['type'] = $row['type'];
172
+                    $questions[$row['sort']]['options'][intval($row['option_sort'])] = $row['option_text'];
173
+                    $questions[$row['sort']]['maximum_score'] = $row['max_value'];
174
+                } else {
175
+                    // If the type is a pagebreak we are finished loading the questions for this page
176
+                    break;
177
+                }
178
+                $counter_question++;
179
+            }
180
+        }
181
+    }
182
+
183
+    // Selecting the maximum number of pages
184
+    $sql = "SELECT * FROM $table_survey_question
185 185
 	        WHERE
186 186
 	            c_id = $course_id AND
187 187
 	            type='".Database::escape_string('pagebreak')."' AND
188 188
 	            survey_id='".intval($survey_id)."'";
189
-	$result = Database::query($sql);
190
-	$numberofpages = Database::num_rows($result) + 1;
191
-
192
-	// Displaying the form with the questions
193
-	if (isset($_GET['show'])) {
194
-		$show = (int)$_GET['show'] + 1;
195
-	} else {
196
-		$show = 0;
197
-	}
198
-
199
-	$url = api_get_self().'?survey_id='.Security::remove_XSS($survey_id).'&show='.$show;
200
-	$form = new FormValidator('question', 'post', $url);
201
-
202
-	if (is_array($questions) && count($questions) > 0) {
203
-		foreach ($questions as $key => & $question) {
204
-			$ch_type = 'ch_'.$question['type'];
205
-			/** @var survey_question $display */
206
-			$display = new $ch_type;
207
-			$form->addHtml('<div class="survey_question_wrapper"><div class="survey_question">');
208
-			$form->addHtml($question['survey_question']);
209
-			$display->render($form, $question);
210
-			$form->addHtml('</div></div>');
211
-		}
212
-	}
213
-
214
-	if (($show < $numberofpages) || (!$_GET['show'] && count($questions) > 0)) {
189
+    $result = Database::query($sql);
190
+    $numberofpages = Database::num_rows($result) + 1;
191
+
192
+    // Displaying the form with the questions
193
+    if (isset($_GET['show'])) {
194
+        $show = (int)$_GET['show'] + 1;
195
+    } else {
196
+        $show = 0;
197
+    }
198
+
199
+    $url = api_get_self().'?survey_id='.Security::remove_XSS($survey_id).'&show='.$show;
200
+    $form = new FormValidator('question', 'post', $url);
201
+
202
+    if (is_array($questions) && count($questions) > 0) {
203
+        foreach ($questions as $key => & $question) {
204
+            $ch_type = 'ch_'.$question['type'];
205
+            /** @var survey_question $display */
206
+            $display = new $ch_type;
207
+            $form->addHtml('<div class="survey_question_wrapper"><div class="survey_question">');
208
+            $form->addHtml($question['survey_question']);
209
+            $display->render($form, $question);
210
+            $form->addHtml('</div></div>');
211
+        }
212
+    }
213
+
214
+    if (($show < $numberofpages) || (!$_GET['show'] && count($questions) > 0)) {
215 215
         if ($show == 0) {
216
-			$form->addButton('next_survey_page', get_lang('StartSurvey'), 'arrow-right', 'success', 'large');
216
+            $form->addButton('next_survey_page', get_lang('StartSurvey'), 'arrow-right', 'success', 'large');
217 217
         } else {
218
-			$form->addButton('next_survey_page', get_lang('NextQuestion'), 'arrow-right');
218
+            $form->addButton('next_survey_page', get_lang('NextQuestion'), 'arrow-right');
219 219
         }
220
-	}
221
-	if ($show >= $numberofpages && $_GET['show'] || (isset($_GET['show']) && count($questions) == 0)) {
222
-		if ($questions_exists == false) {
223
-			echo '<p>'.get_lang('ThereAreNotQuestionsForthisSurvey').'</p>';
224
-		}
225
-		$form->addButton('finish_survey', get_lang('FinishSurvey'), 'arrow-right');
226
-	}
227
-	$form->display();
220
+    }
221
+    if ($show >= $numberofpages && $_GET['show'] || (isset($_GET['show']) && count($questions) == 0)) {
222
+        if ($questions_exists == false) {
223
+            echo '<p>'.get_lang('ThereAreNotQuestionsForthisSurvey').'</p>';
224
+        }
225
+        $form->addButton('finish_survey', get_lang('FinishSurvey'), 'arrow-right');
226
+    }
227
+    $form->display();
228 228
 } else {
229
-	Display :: display_error_message(get_lang('NotAllowed'), false);
229
+    Display :: display_error_message(get_lang('NotAllowed'), false);
230 230
 }
231 231
 
232 232
 Display :: display_footer();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 						survey_question_option.c_id = $course_id
155 155
 					WHERE
156 156
 					    survey_question.survey_id = '".intval($survey_id)."' AND
157
-						survey_question.question_id IN (".Database::escape_string(implode(',',$paged_questions[$_GET['show']]), null, false).") AND
157
+						survey_question.question_id IN (".Database::escape_string(implode(',', $paged_questions[$_GET['show']]), null, false).") AND
158 158
 						survey_question.c_id =  $course_id
159 159
 					ORDER BY survey_question.sort, survey_question_option.sort ASC";
160 160
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
 	// Displaying the form with the questions
193 193
 	if (isset($_GET['show'])) {
194
-		$show = (int)$_GET['show'] + 1;
194
+		$show = (int) $_GET['show'] + 1;
195 195
 	} else {
196 196
 		$show = 0;
197 197
 	}
Please login to merge, or discard this patch.
src/Chamilo/TicketBundle/Entity/Ticket.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,12 +94,12 @@
 block discarded – undo
94 94
      */
95 95
     protected $assignedLastUser;
96 96
 
97
-     /**
98
-     * @var Status
99
-     *
100
-     * @ORM\ManyToOne(targetEntity="Chamilo\TicketBundle\Entity\Status")
101
-     * @ORM\JoinColumn(name="status_id", referencedColumnName="id")
102
-     **/
97
+        /**
98
+         * @var Status
99
+         *
100
+         * @ORM\ManyToOne(targetEntity="Chamilo\TicketBundle\Entity\Status")
101
+         * @ORM\JoinColumn(name="status_id", referencedColumnName="id")
102
+         **/
103 103
     protected $status;
104 104
 
105 105
     /**
Please login to merge, or discard this patch.
src/Chamilo/TicketBundle/Entity/MessageAttachment.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     protected $filename;
58 58
 
59
-   /**
59
+    /**
60 60
      * @var integer
61 61
      *
62 62
      * @ORM\Column(name="size", type="integer", nullable=false, unique=false)
Please login to merge, or discard this patch.
plugin/courseblock/CourseBlockPlugin.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     // When creating a new course this settings are added to the course
12 12
     public $course_settings = array(
13
-         array(
13
+            array(
14 14
             'name' => 'course_block_pre_footer',
15 15
             'type' => 'textarea'
16 16
         ),
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     }
67 67
 
68 68
         /**
69
-     * @param string $region
70
-     * @return string
71
-     */
69
+         * @param string $region
70
+         * @return string
71
+         */
72 72
     public function renderRegion($region)
73 73
     {
74 74
         $content = '';
Please login to merge, or discard this patch.
src/Chamilo/TicketBundle/Entity/Message.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,12 +53,12 @@
 block discarded – undo
53 53
      */
54 54
     protected $ipAddress;
55 55
 
56
-     /**
57
-     * @var Ticket
58
-     *
59
-     * @ORM\ManyToOne(targetEntity="Chamilo\TicketBundle\Entity\Ticket")
60
-     * @ORM\JoinColumn(name="ticket_id", referencedColumnName="id")
61
-     **/
56
+        /**
57
+         * @var Ticket
58
+         *
59
+         * @ORM\ManyToOne(targetEntity="Chamilo\TicketBundle\Entity\Ticket")
60
+         * @ORM\JoinColumn(name="ticket_id", referencedColumnName="id")
61
+         **/
62 62
     protected $ticket;
63 63
 
64 64
     /**
Please login to merge, or discard this patch.
main/ticket/tutor_report.lib.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 /**
75 75
  * @param $courseInfo
76
- * @param $weeksCount
76
+ * @param string $weeksCount
77 77
  * @param $page
78 78
  * @return array
79 79
  */
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
 /**
184 184
  * @param $datos
185
- * @param $pagina
185
+ * @param integer $pagina
186 186
  * @return string
187 187
  */
188 188
 function showStudentResult($datos, $pagina)
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
 
202 202
 /**
203 203
  * @param $data
204
- * @param $numero_semanas
205
- * @return array
204
+ * @param integer $numero_semanas
205
+ * @return string[]
206 206
  */
207 207
 function showStudentResultExport($data, $numero_semanas)
208 208
 {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     $table_post = Database::get_course_table(TABLE_FORUM_POST);
22 22
     $table_work = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
23 23
     $course_code = Database::escape_string($course_code);
24
-    $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '" . $course_code . "'");
24
+    $res = Database::query("SELECT COUNT(*) as cant FROM $table_reporte_semanas WHERE course_code = '".$course_code."'");
25 25
     $sqlWeeks = "SELECT semanas FROM $table_semanas_curso WHERE course_code = '$course_code'";
26 26
     $resWeeks = Database::query($sqlWeeks);
27 27
     $weeks = Database::fetch_object($resWeeks);
@@ -105,52 +105,52 @@  discard block
 block discarded – undo
105 105
     $lineHeaderExport = array(null, null);
106 106
     $lineHeaderExport2 = array(null, ull);
107 107
     while ($rowe = Database::fetch_assoc($resultHeader)) {
108
-        $lineHeaderExport[] = utf8_decode('Work' . $rowe['week_id']);
109
-        $lineHeaderExport[] = utf8_decode('Forum' . $rowe['week_id']);
108
+        $lineHeaderExport[] = utf8_decode('Work'.$rowe['week_id']);
109
+        $lineHeaderExport[] = utf8_decode('Forum'.$rowe['week_id']);
110 110
         //$fila_export_encabezado[] =  utf8_decode('Eval'.$rowe['week_id']);
111 111
         //$fila_export_encabezado[] =  utf8_decode('PC'.$rowe['week_id']);
112 112
         $lineHeaderExport2[] = utf8_decode($rowe['work_title']);
113 113
         $lineHeaderExport2[] = utf8_decode($rowe['thread_title']);
114 114
         //$fila_export_encabezado2[] = utf8_decode($rowe['eval_title']);
115 115
         //$fila_export_encabezado2[] = utf8_decode($rowe['pc_title']);
116
-        $fila_export = array('Work' . $rowe['week_id'], 'Forum' . $rowe['week_id'], 'Eval' . $rowe['week_id'], 'PC' . $rowe['week_id']);
116
+        $fila_export = array('Work'.$rowe['week_id'], 'Forum'.$rowe['week_id'], 'Eval'.$rowe['week_id'], 'PC'.$rowe['week_id']);
117 117
         if ($rowe['week_id'] > (($page - 1) * 7) && $rowe['week_id'] <= (7 * $page)) {
118 118
             $ids[$rowe['week_id']] = $rowe['id'];
119
-            $line.='<th>
120
-                <a href="#" onClick="showContent(' . "'tarea" . $rowe['week_id'] . "'" . ');">Work' . $rowe['week_id'] . '
121
-                        <div class="blackboard_hide" id="tarea' . $rowe['week_id'] . '">' . $rowe['work_title'] . '</div>
119
+            $line .= '<th>
120
+                <a href="#" onClick="showContent(' . "'tarea".$rowe['week_id']."'".');">Work'.$rowe['week_id'].'
121
+                        <div class="blackboard_hide" id="tarea' . $rowe['week_id'].'">'.$rowe['work_title'].'</div>
122 122
                 </a></th>';
123
-            $line.= '<th>
124
-                <a href="#" onClick="showContent(' . "'foro" . $rowe['week_id'] . "'" . ');">Forum' . $rowe['week_id'] . '
125
-                        <div class="blackboard_hide" id="foro' . $rowe['week_id'] . '">' . $rowe['thread_title'] . '</div>
123
+            $line .= '<th>
124
+                <a href="#" onClick="showContent(' . "'foro".$rowe['week_id']."'".');">Forum'.$rowe['week_id'].'
125
+                        <div class="blackboard_hide" id="foro' . $rowe['week_id'].'">'.$rowe['thread_title'].'</div>
126 126
                 </a>
127 127
                 </th>';
128 128
         }
129 129
     }
130 130
     $tableExport[] = $lineHeaderExport;
131 131
     $tableExport[] = $lineHeaderExport2;
132
-    $line.= '</tr>';
132
+    $line .= '</tr>';
133 133
 
134 134
     $html = '<form action="tutor.php" name="semanas" id="semanas" method="POST">
135 135
             <div class="row">
136
-            ' . get_lang('SelectWeeksSpan') . '
136
+            ' . get_lang('SelectWeeksSpan').'
137 137
             <select name="weeksNumber" id="weeksNumber" onChange="submit();">
138
-            <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "") . '>7 weeks</option>
139
-            <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "") . '>14 weeks</option>
138
+            <option value="7" ' . (($weeksCount == 7) ? 'selected="selected"' : "").'>7 weeks</option>
139
+            <option value="14" ' . (($weeksCount == 14) ? 'selected="selected"' : "").'>14 weeks</option>
140 140
             </select>';
141 141
 
142 142
 
143 143
     if ($weeksCount == 14) {
144
-        $html .= '<span style="float:right;"><a href="tutor.php?page=' . (($page == 1) ? 2 : 1) . '">' . (($page == 1) ? "Siguiente" : "Anterior") . '</a></span>';
144
+        $html .= '<span style="float:right;"><a href="tutor.php?page='.(($page == 1) ? 2 : 1).'">'.(($page == 1) ? "Siguiente" : "Anterior").'</a></span>';
145 145
     }
146
-    $html .= '<span style="float:right;"><a href="' . api_get_self() . '?action=export' . $get_parameter . $get_parameter2 . '">' . Display::return_icon('export_excel.png', get_lang('Export'), '', '32') . '</a></span>';
146
+    $html .= '<span style="float:right;"><a href="'.api_get_self().'?action=export'.$get_parameter.$get_parameter2.'">'.Display::return_icon('export_excel.png', get_lang('Export'), '', '32').'</a></span>';
147 147
 
148 148
     $html .= '</form>';
149 149
     $html .= '<table class="reports">';
150 150
     $html .= '<tr>
151 151
             <th ></th>';
152 152
     for ($i = (7 * $page - 6); $i <= $page * 7; $i++) {
153
-        $html .= '<th colspan="2">Week ' . $i . '<a href="assign_tickets.php?id=' . $ids[$i] . '" class="ajax">' . Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22) . '</a></th>';
153
+        $html .= '<th colspan="2">Week '.$i.'<a href="assign_tickets.php?id='.$ids[$i].'" class="ajax">'.Display::return_icon('edit.png', get_lang('Edit'), array('width' => '16', 'height' => '16'), 22).'</a></th>';
154 154
     }
155 155
     $html .= '</tr>';
156 156
     $html .= $line;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         if ($row['week_id'] > (($page - 1) * 7) && $row['week_id'] <= (7 * $page)) {
168 168
             $results[$row['username']][$row['week_id']] = $row;
169 169
             if (count($results[$row['username']]) == 7) {
170
-                $html.= showStudentResult($results[$row['username']], $page);
170
+                $html .= showStudentResult($results[$row['username']], $page);
171 171
             }
172 172
         }
173 173
         if (count($resultadose[$row['username']]) == $weeksCount) {
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
     $inicio = (7 * $pagina - 6);
191 191
     $fila = '<tr>';
192 192
 
193
-    $fila.= '<td><a href="' . api_get_path(WEB_CODE_PATH) . 'user/userInfo.php?' . api_get_cidreq() . '&uInfo=' . $datos[$inicio]['user_id'] . '">' . $datos[$inicio]['username'] . '</a></td>';
193
+    $fila .= '<td><a href="'.api_get_path(WEB_CODE_PATH).'user/userInfo.php?'.api_get_cidreq().'&uInfo='.$datos[$inicio]['user_id'].'">'.$datos[$inicio]['username'].'</a></td>';
194 194
     foreach ($datos as $dato) {
195
-        $fila.= '<td align="center">' . (($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>';
196
-        $fila.= '<td align="center">' . (($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')) . '</td>';
195
+        $fila .= '<td align="center">'.(($dato['work_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>';
196
+        $fila .= '<td align="center">'.(($dato['thread_ok'] == 1) ? Display::return_icon('check.png') : Display::return_icon('aspa.png')).'</td>';
197 197
     }
198
-    $fila.= '</tr>';
198
+    $fila .= '</tr>';
199 199
     return $fila;
200 200
 }
201 201
 
Please login to merge, or discard this patch.
main/ticket/assign_tickets.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 api_protect_course_script();
12 12
 if (!api_is_allowed_to_edit()) {
13
-	api_not_allowed();
13
+    api_not_allowed();
14 14
 }
15 15
 $course_info = api_get_course_info();
16 16
 $course_code = $course_info['code'];
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 echo '<div id="confirmation"></div>';
21 21
 $id = intval($_GET['id']);
22 22
 $tblWeeklyReport = Database::get_main_table('rp_reporte_semanas');
23
-$sql ="SELECT * FROM $tblWeeklyReport WHERE id = '$id'";
23
+$sql = "SELECT * FROM $tblWeeklyReport WHERE id = '$id'";
24 24
 $sql_tasks = "SELECT id AS colid, title as coltitle
25 25
     FROM ".Database::get_course_table(TABLE_STUDENT_PUBLICATION)."
26 26
     WHERE parent_id = 0
@@ -45,28 +45,28 @@  discard block
 block discarded – undo
45 45
 $result_forum = Database::query($sql_forum);
46 46
 
47 47
 echo '<div class="row">
48
-        <input type="hidden" id="rs_id" name ="rs_id" value="' . $id . '">
49
-        <div class="formw">' . get_lang('PleaseSelectTasks') . '</div>
48
+        <input type="hidden" id="rs_id" name ="rs_id" value="' . $id.'">
49
+        <div class="formw">' . get_lang('PleaseSelectTasks').'</div>
50 50
     </div>';
51 51
 echo '<div class="row"><div class="formw"><select name ="work_id" id="work_id">';
52
-echo '<option value="0"' . (($row['colid'] == $rs->work_id) ? "selected" : "") . '>' . get_lang('PleaseSelect') . '</option>';
52
+echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.get_lang('PleaseSelect').'</option>';
53 53
 while ($row = Database::fetch_assoc($result_tasks)) {
54
-    echo '<option value="' . $row['colid'] . '"' . (($row['colid'] == $rs->work_id) ? "selected" : "") . '>' . $row['coltitle'] . '</option>';
54
+    echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.$row['coltitle'].'</option>';
55 55
 }
56 56
 echo '</select></div><div>';
57 57
 echo '<div class="row">
58
-        <div class="formw">' . get_lang('PleaseSelectThread') . '</div>
58
+        <div class="formw">' . get_lang('PleaseSelectThread').'</div>
59 59
     </div>';
60 60
 echo '<div class="row"><div class="formw"><select name ="forum_id" id="forum_id">';
61
-echo '<option value="0"' . (($row['colid'] == $rs->work_id) ? "forum_id" : "") . '>' . get_lang('PleaseSelect') . '</option>';
61
+echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "forum_id" : "").'>'.get_lang('PleaseSelect').'</option>';
62 62
 while ($row = Database::fetch_assoc($result_forum)) {
63
-    echo '<option value="' . $row['colid'] . '"' . (($row['colid'] == $rs->forum_id) ? "selected" : "") . '>' . $row['coltitle'] . '</option>';
63
+    echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->forum_id) ? "selected" : "").'>'.$row['coltitle'].'</option>';
64 64
 }
65 65
 echo '</select></div><div>';
66 66
 echo '<div class="row">
67 67
         <div class="formw">
68
-        <button class="save" name="edit" type="button" value="' . get_lang('Edit') . '" onClick="save(' . "$id" . ');">' .
69
-            get_lang('Edit') . '</button>
68
+        <button class="save" name="edit" type="button" value="' . get_lang('Edit').'" onClick="save('."$id".');">'.
69
+            get_lang('Edit').'</button>
70 70
         </div>
71 71
     </div>';
72 72
 echo '</form>';
Please login to merge, or discard this patch.