@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | if (!empty($gradebook) && $gradebook == 'view') { |
101 | 101 | $interbreadcrumb[] = array( |
102 | - 'url' => '../gradebook/' . $_SESSION['gradebook_dest'], |
|
102 | + 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
|
103 | 103 | 'name' => get_lang('ToolGradebook') |
104 | 104 | ); |
105 | 105 | } |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | ); |
742 | 742 | |
743 | 743 | // Exercise results |
744 | - $actions .='<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
744 | + $actions .= '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
745 | 745 | Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
746 | 746 | |
747 | 747 | // Export |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | } |
806 | 806 | } |
807 | 807 | |
808 | - $actions .='<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
808 | + $actions .= '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
809 | 809 | Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
810 | 810 | $actions .= Display::url(Display::return_icon('cd.gif', get_lang('CopyExercise')), '', array('onclick' => "javascript:if(!confirm('".addslashes(api_htmlentities(get_lang('AreYouSureToCopy'), ENT_QUOTES, $charset))." ".addslashes($row['title'])."?"."')) return false;", 'href' => 'exercise.php?'.api_get_cidreq().'&choice=copy_exercise&sec_token='.$token.'&exerciseId='.$row['id'])); |
811 | 811 | } |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | $item .= Display::tag('td', $actions, array('class' => 'td_actions')); |
1005 | 1005 | } else { |
1006 | 1006 | if ($isDrhOfCourse) { |
1007 | - $actions ='<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
1007 | + $actions = '<a href="exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['id'].'">'. |
|
1008 | 1008 | Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
1009 | 1009 | $item .= Display::tag('td', $actions, array('class' => 'td_actions')); |
1010 | 1010 | } |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | 'tr', |
1015 | 1015 | $item, |
1016 | 1016 | array( |
1017 | - 'id' => 'exercise_list_' . $my_exercise_id, |
|
1017 | + 'id' => 'exercise_list_'.$my_exercise_id, |
|
1018 | 1018 | ) |
1019 | 1019 | ); |
1020 | 1020 | } |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | Display::return_icon('hotpotatoes_s.png', "HotPotatoes"), |
1079 | 1079 | Display::url( |
1080 | 1080 | $title, |
1081 | - 'showinframes.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
1081 | + 'showinframes.php?'.api_get_cidreq().'&'.http_build_query([ |
|
1082 | 1082 | 'file' => $path, |
1083 | 1083 | 'uid' => $userId |
1084 | 1084 | ]), |
@@ -1093,7 +1093,7 @@ discard block |
||
1093 | 1093 | 'adminhp.php?'.api_get_cidreq().'&hotpotatoesName='.$path |
1094 | 1094 | ); |
1095 | 1095 | |
1096 | - $actions .='<a href="hotpotatoes_exercise_report.php?'.api_get_cidreq().'&path='.$path.'">'. |
|
1096 | + $actions .= '<a href="hotpotatoes_exercise_report.php?'.api_get_cidreq().'&path='.$path.'">'. |
|
1097 | 1097 | Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
1098 | 1098 | |
1099 | 1099 | // if active |
@@ -1102,7 +1102,7 @@ discard block |
||
1102 | 1102 | $actions .= ' <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=disable&page='.$page.'&file='.$path.'">'. |
1103 | 1103 | Display::return_icon('visible.png', get_lang('Deactivate'), '', ICON_SIZE_SMALL).'</a>'; |
1104 | 1104 | } else { // else if not active |
1105 | - $actions .=' <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=enable&page='.$page.'&file='.$path.'">'. |
|
1105 | + $actions .= ' <a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=enable&page='.$page.'&file='.$path.'">'. |
|
1106 | 1106 | Display::return_icon('invisible.png', get_lang('Activate'), '', ICON_SIZE_SMALL).'</a>'; |
1107 | 1107 | } |
1108 | 1108 | $actions .= '<a href="'.$exercisePath.'?'.api_get_cidreq().'&hpchoice=delete&file='.$path.'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('AreYouSureToDeleteJS'), ENT_QUOTES, $charset).' '.$title."?").'\')) return false;">'. |
@@ -1124,7 +1124,7 @@ discard block |
||
1124 | 1124 | 'td', |
1125 | 1125 | Display::url( |
1126 | 1126 | $title, |
1127 | - 'showinframes.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
1127 | + 'showinframes.php?'.api_get_cidreq().'&'.http_build_query([ |
|
1128 | 1128 | 'file' => $path, |
1129 | 1129 | 'cid' => api_get_course_id(), |
1130 | 1130 | 'uid' => $userId |
@@ -1145,7 +1145,7 @@ discard block |
||
1145 | 1145 | $item .= Display::tag('td', $attemptText); |
1146 | 1146 | |
1147 | 1147 | if ($isDrhOfCourse) { |
1148 | - $actions ='<a href="hotpotatoes_exercise_report.php?'.api_get_cidreq().'&path='.$path.'">'. |
|
1148 | + $actions = '<a href="hotpotatoes_exercise_report.php?'.api_get_cidreq().'&path='.$path.'">'. |
|
1149 | 1149 | Display :: return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_SMALL).'</a>'; |
1150 | 1150 | |
1151 | 1151 | $item .= Display::tag('td', $actions, array('class' => 'td_actions')); |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | if (!api_is_allowed_to_edit(null, true) && |
154 | 154 | ( |
155 | - ($current_forum_category && $current_forum_category['locked'] <> 0 ) || |
|
155 | + ($current_forum_category && $current_forum_category['locked'] <> 0) || |
|
156 | 156 | $current_forum['locked'] <> 0 || |
157 | 157 | $current_thread['locked'] <> 0 |
158 | 158 | ) |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | echo '<h1>'; |
205 | 205 | echo Display::url( |
206 | 206 | prepare4display($current_forum['forum_title']), |
207 | - 'viewforum.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
207 | + 'viewforum.php?'.api_get_cidreq().'&'.http_build_query([ |
|
208 | 208 | 'origin' => $origin, |
209 | 209 | 'forum' => $current_forum['forum_id'] |
210 | 210 | ]), |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | ini_set('log_errors', '1'); |
12 | 12 | error_reporting(-1); |
13 | 13 | |
14 | -require_once __DIR__ . '/../../vendor/autoload.php'; |
|
14 | +require_once __DIR__.'/../../vendor/autoload.php'; |
|
15 | 15 | |
16 | 16 | define('SYSTEM_INSTALLATION', 1); |
17 | 17 | define('INSTALL_TYPE_UPDATE', 'update'); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | session_start(); |
26 | 26 | |
27 | -require_once api_get_path(LIBRARY_PATH) . 'database.constants.inc.php'; |
|
27 | +require_once api_get_path(LIBRARY_PATH).'database.constants.inc.php'; |
|
28 | 28 | require_once 'install.lib.php'; |
29 | 29 | |
30 | 30 | $action = isset($_POST['a']) ? $_POST['a'] : null; |
@@ -32,10 +32,10 @@ discard block |
||
32 | 32 | $exercise_id = intval($_GET['exercise_id']); |
33 | 33 | $page = intval($_REQUEST['page']); //page |
34 | 34 | $limit = intval($_REQUEST['rows']); //quantity of rows |
35 | - $sidx = $_REQUEST['sidx']; //index to filter |
|
36 | - $sord = $_REQUEST['sord']; //asc or desc |
|
35 | + $sidx = $_REQUEST['sidx']; //index to filter |
|
36 | + $sord = $_REQUEST['sord']; //asc or desc |
|
37 | 37 | |
38 | - if (!in_array($sord, array('asc','desc'))) { |
|
38 | + if (!in_array($sord, array('asc', 'desc'))) { |
|
39 | 39 | $sord = 'desc'; |
40 | 40 | } |
41 | 41 | // get index row - i.e. user click to sort $sord = $_GET['sord']; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $total_pages = 0; |
65 | 65 | if ($count > 0) { |
66 | 66 | if (!empty($limit)) { |
67 | - $total_pages = ceil($count/$limit); |
|
67 | + $total_pages = ceil($count / $limit); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $response->page = $page; |
127 | 127 | $response->total = $total_pages; |
128 | 128 | $response->records = $count; |
129 | - $i=0; |
|
129 | + $i = 0; |
|
130 | 130 | |
131 | 131 | if (!empty($results)) { |
132 | 132 | foreach ($results as $row) { |
@@ -140,22 +140,22 @@ discard block |
||
140 | 140 | GROUP by question_id |
141 | 141 | ) as count_table"; |
142 | 142 | $result_count = Database::query($sql); |
143 | - $count_questions = Database::fetch_array($result_count,'ASSOC'); |
|
143 | + $count_questions = Database::fetch_array($result_count, 'ASSOC'); |
|
144 | 144 | $count_questions = $count_questions['count_question_id']; |
145 | 145 | |
146 | 146 | $row['count_questions'] = $count_questions; |
147 | 147 | |
148 | 148 | $response->rows[$i]['id'] = $row['exe_id']; |
149 | - $remaining = strtotime($row['start_date'])+($oExe->expired_time*60) - strtotime(api_get_utc_datetime(time())); |
|
150 | - $h = floor($remaining/3600); |
|
151 | - $m = floor(($remaining - ($h*3600))/60); |
|
152 | - $s = ($remaining - ($h*3600) - ($m*60)); |
|
149 | + $remaining = strtotime($row['start_date']) + ($oExe->expired_time * 60) - strtotime(api_get_utc_datetime(time())); |
|
150 | + $h = floor($remaining / 3600); |
|
151 | + $m = floor(($remaining - ($h * 3600)) / 60); |
|
152 | + $s = ($remaining - ($h * 3600) - ($m * 60)); |
|
153 | 153 | $array = array( |
154 | 154 | $row['firstname'], |
155 | 155 | $row['lastname'], |
156 | - api_format_date($row['start_date'], DATE_TIME_FORMAT_LONG).' ['.($h>0?$h.':':'').sprintf("%02d",$m).':'.sprintf("%02d",$s).']', |
|
156 | + api_format_date($row['start_date'], DATE_TIME_FORMAT_LONG).' ['.($h > 0 ? $h.':' : '').sprintf("%02d", $m).':'.sprintf("%02d", $s).']', |
|
157 | 157 | $row['count_questions'], |
158 | - round($row['score']*100).'%' |
|
158 | + round($row['score'] * 100).'%' |
|
159 | 159 | ); |
160 | 160 | $response->rows[$i]['cell'] = $array; |
161 | 161 | $i++; |
@@ -361,8 +361,8 @@ discard block |
||
361 | 361 | $objQuestionTmp = Question::read($my_question_id, $course_id); |
362 | 362 | |
363 | 363 | // Getting free choice data. |
364 | - if ($objQuestionTmp->type == FREE_ANSWER && $type == 'all') { |
|
365 | - $my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id]) ? $_REQUEST['free_choice'][$my_question_id]: null; |
|
364 | + if ($objQuestionTmp->type == FREE_ANSWER && $type == 'all') { |
|
365 | + $my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id]) ? $_REQUEST['free_choice'][$my_question_id] : null; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | if ($type == 'all') { |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $objQuestion = Question::read($questionId); |
519 | 519 | $objQuestion->get_question_type_name(); |
520 | 520 | |
521 | - echo '<p class="lead">' . $objQuestion->get_question_type_name() . '</p>'; |
|
521 | + echo '<p class="lead">'.$objQuestion->get_question_type_name().'</p>'; |
|
522 | 522 | //echo get_lang('Level').': '.$objQuestionTmp->selectLevel(); |
523 | 523 | ExerciseLib::showQuestion( |
524 | 524 | $questionId, |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | $editor_config = array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '125'); |
41 | 41 | //this line define how many question by default appear when creating a choice question |
42 | - $nb_answers = isset($_POST['nb_answers']) ? (int) $_POST['nb_answers'] : 3; // The previous default value was 2. See task #1759. |
|
42 | + $nb_answers = isset($_POST['nb_answers']) ? (int) $_POST['nb_answers'] : 3; // The previous default value was 2. See task #1759. |
|
43 | 43 | $nb_answers += (isset($_POST['lessAnswers']) ? -1 : (isset($_POST['moreAnswers']) ? 1 : 0)); |
44 | 44 | |
45 | 45 | /* |
@@ -55,20 +55,20 @@ discard block |
||
55 | 55 | if ($obj_ex->selectFeedbackType() == 1) { |
56 | 56 | $editor_config['Width'] = '250'; |
57 | 57 | $editor_config['Height'] = '110'; |
58 | - $comment_title = '<th width="50%" >' . get_lang('Comment') . '</th>'; |
|
59 | - $feedback_title = '<th width="50%" >' . get_lang('Scenario') . '</th>'; |
|
58 | + $comment_title = '<th width="50%" >'.get_lang('Comment').'</th>'; |
|
59 | + $feedback_title = '<th width="50%" >'.get_lang('Scenario').'</th>'; |
|
60 | 60 | } else { |
61 | - $comment_title = '<th width="50%">' . get_lang('Comment') . '</th>'; |
|
61 | + $comment_title = '<th width="50%">'.get_lang('Comment').'</th>'; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $html = '<table class="table table-striped table-hover">'; |
65 | 65 | $html .= '<thead>'; |
66 | 66 | $html .= '<tr>'; |
67 | - $html .= '<th>' . get_lang('Number') . '</th>'; |
|
68 | - $html .= '<th>' . get_lang('True') . '</th>'; |
|
69 | - $html .= '<th width="50%">' . get_lang('Answer') . '</th>'; |
|
70 | - $html .= $comment_title . $feedback_title; |
|
71 | - $html .= '<th>' . get_lang('Weighting') . '</th>'; |
|
67 | + $html .= '<th>'.get_lang('Number').'</th>'; |
|
68 | + $html .= '<th>'.get_lang('True').'</th>'; |
|
69 | + $html .= '<th width="50%">'.get_lang('Answer').'</th>'; |
|
70 | + $html .= $comment_title.$feedback_title; |
|
71 | + $html .= '<th>'.get_lang('Weighting').'</th>'; |
|
72 | 72 | $html .= '</tr>'; |
73 | 73 | $html .= '</thead>'; |
74 | 74 | $html .= '<tbody>'; |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | $weight_result = '0'; |
136 | 136 | } |
137 | 137 | |
138 | - $defaults['answer[' . $i . ']'] = $answer_result; |
|
139 | - $defaults['comment[' . $i . ']'] = $answer->comment[$i]; |
|
140 | - $defaults['weighting[' . $i . ']'] = $weight_result; |
|
138 | + $defaults['answer['.$i.']'] = $answer_result; |
|
139 | + $defaults['comment['.$i.']'] = $answer->comment[$i]; |
|
140 | + $defaults['weighting['.$i.']'] = $weight_result; |
|
141 | 141 | |
142 | 142 | $item_list = explode('@@', $answer->destination[$i]); |
143 | 143 | |
@@ -156,10 +156,10 @@ discard block |
||
156 | 156 | else |
157 | 157 | $url_result = $url; |
158 | 158 | |
159 | - $temp_scenario['url' . $i] = $url_result; |
|
160 | - $temp_scenario['try' . $i] = $try_result; |
|
161 | - $temp_scenario['lp' . $i] = $lp; |
|
162 | - $temp_scenario['destination' . $i] = $list_dest; |
|
159 | + $temp_scenario['url'.$i] = $url_result; |
|
160 | + $temp_scenario['try'.$i] = $try_result; |
|
161 | + $temp_scenario['lp'.$i] = $lp; |
|
162 | + $temp_scenario['destination'.$i] = $list_dest; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
@@ -172,30 +172,30 @@ discard block |
||
172 | 172 | ); |
173 | 173 | $renderer->setElementTemplate( |
174 | 174 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
175 | - 'counter[' . $i . ']' |
|
175 | + 'counter['.$i.']' |
|
176 | 176 | ); |
177 | 177 | $renderer->setElementTemplate( |
178 | 178 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
179 | - 'answer[' . $i . ']' |
|
179 | + 'answer['.$i.']' |
|
180 | 180 | ); |
181 | 181 | $renderer->setElementTemplate( |
182 | 182 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
183 | - 'comment[' . $i . ']' |
|
183 | + 'comment['.$i.']' |
|
184 | 184 | ); |
185 | 185 | $renderer->setElementTemplate( |
186 | 186 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
187 | - 'weighting[' . $i . ']' |
|
187 | + 'weighting['.$i.']' |
|
188 | 188 | ); |
189 | 189 | |
190 | - $answer_number = $form->addElement('text', 'counter[' . $i . ']', null, 'value="' . $i . '"'); |
|
190 | + $answer_number = $form->addElement('text', 'counter['.$i.']', null, 'value="'.$i.'"'); |
|
191 | 191 | $answer_number->freeze(); |
192 | 192 | |
193 | 193 | |
194 | 194 | $form->addElement('radio', 'correct', null, null, $i, 'class="checkbox" style="margin-left: 0em;"'); |
195 | - $form->addElement('html_editor', 'answer[' . $i . ']', null, array(), $editor_config); |
|
195 | + $form->addElement('html_editor', 'answer['.$i.']', null, array(), $editor_config); |
|
196 | 196 | |
197 | - $form->addElement('html_editor', 'comment[' . $i . ']', null, array(), $editor_config); |
|
198 | - $form->addElement('text', 'weighting[' . $i . ']', null, array('style' => 'width: 60px;', 'value' => '0')); |
|
197 | + $form->addElement('html_editor', 'comment['.$i.']', null, array(), $editor_config); |
|
198 | + $form->addElement('text', 'weighting['.$i.']', null, array('style' => 'width: 60px;', 'value' => '0')); |
|
199 | 199 | $form->addElement('html', '</tr>'); |
200 | 200 | $i++; |
201 | 201 | } |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | $form->addHtml('<tr>'); |
211 | 211 | |
212 | 212 | $defaults["counter[$i]"] = '-'; |
213 | - $defaults['answer[' . $i . ']'] = get_lang('DontKnow'); |
|
214 | - $defaults['weighting[' . $i . ']'] = '0'; |
|
213 | + $defaults['answer['.$i.']'] = get_lang('DontKnow'); |
|
214 | + $defaults['weighting['.$i.']'] = '0'; |
|
215 | 215 | $defaults['scenario'] = $temp_scenario; |
216 | 216 | $renderer = & $form->defaultRenderer(); |
217 | 217 | |
@@ -221,32 +221,32 @@ discard block |
||
221 | 221 | ); |
222 | 222 | $renderer->setElementTemplate( |
223 | 223 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
224 | - 'counter[' . $i . ']' |
|
224 | + 'counter['.$i.']' |
|
225 | 225 | ); |
226 | 226 | $renderer->setElementTemplate( |
227 | 227 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
228 | - 'answer[' . $i . ']' |
|
228 | + 'answer['.$i.']' |
|
229 | 229 | ); |
230 | 230 | $renderer->setElementTemplate( |
231 | 231 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
232 | - 'comment[' . $i . ']' |
|
232 | + 'comment['.$i.']' |
|
233 | 233 | ); |
234 | 234 | $renderer->setElementTemplate( |
235 | 235 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
236 | - 'weighting[' . $i . ']' |
|
236 | + 'weighting['.$i.']' |
|
237 | 237 | ); |
238 | 238 | |
239 | 239 | $form |
240 | - ->addElement('text', 'counter[' . $i . ']', null) |
|
240 | + ->addElement('text', 'counter['.$i.']', null) |
|
241 | 241 | ->freeze(); |
242 | 242 | |
243 | - $form->addElement('hidden', 'position[' . $i . ']', '666'); |
|
243 | + $form->addElement('hidden', 'position['.$i.']', '666'); |
|
244 | 244 | |
245 | 245 | $form->addElement('radio', 'correct', null, null, $i, ['class' => 'checkbox', 'disabled' => true]); |
246 | - $form->addElement('html_editor', 'answer[' . $i . ']', null, array(), $editor_config); |
|
246 | + $form->addElement('html_editor', 'answer['.$i.']', null, array(), $editor_config); |
|
247 | 247 | |
248 | - $form->addRule('answer[' . $i . ']', get_lang('ThisFieldIsRequired'), 'required'); |
|
249 | - $form->addElement('html_editor', 'comment[' . $i . ']', null, array(), $editor_config); |
|
248 | + $form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required'); |
|
249 | + $form->addElement('html_editor', 'comment['.$i.']', null, array(), $editor_config); |
|
250 | 250 | |
251 | 251 | //$form->addElement('select', 'destination'.$i, get_lang('SelectQuestion').' : ',$select_question,'multiple'); |
252 | 252 | |
@@ -302,9 +302,9 @@ discard block |
||
302 | 302 | $minus = 0; |
303 | 303 | } |
304 | 304 | |
305 | - for ($i=1 ; $i <= $nb_answers - $minus; $i++) { |
|
306 | - $position = trim($form -> getSubmitValue('position['.$i.']')); |
|
307 | - $answer = trim($form -> getSubmitValue('answer['.$i.']')); |
|
305 | + for ($i = 1; $i <= $nb_answers - $minus; $i++) { |
|
306 | + $position = trim($form -> getSubmitValue('position['.$i.']')); |
|
307 | + $answer = trim($form -> getSubmitValue('answer['.$i.']')); |
|
308 | 308 | $comment = trim($form -> getSubmitValue('comment['.$i.']')); |
309 | 309 | $weighting = trim($form -> getSubmitValue('weighting['.$i.']')); |
310 | 310 | $scenario = $form -> getSubmitValue('scenario'); |
@@ -312,8 +312,8 @@ discard block |
||
312 | 312 | //$list_destination = $form -> getSubmitValue('destination'.$i); |
313 | 313 | //$destination_str = $form -> getSubmitValue('destination'.$i); |
314 | 314 | |
315 | - $try = $scenario['try'.$i]; |
|
316 | - $lp = $scenario['lp'.$i]; |
|
315 | + $try = $scenario['try'.$i]; |
|
316 | + $lp = $scenario['lp'.$i]; |
|
317 | 317 | $destination = $scenario['destination'.$i]; |
318 | 318 | $url = trim($scenario['url'.$i]); |
319 | 319 | |
@@ -337,34 +337,34 @@ discard block |
||
337 | 337 | $destination_str.=$destination_id.';'; |
338 | 338 | }*/ |
339 | 339 | |
340 | - $goodAnswer= ($correct == $i) ? true : false; |
|
340 | + $goodAnswer = ($correct == $i) ? true : false; |
|
341 | 341 | |
342 | 342 | if ($goodAnswer) { |
343 | 343 | $nbrGoodAnswers++; |
344 | 344 | $weighting = abs($weighting); |
345 | - if($weighting > 0) { |
|
345 | + if ($weighting > 0) { |
|
346 | 346 | $questionWeighting += $weighting; |
347 | 347 | } |
348 | 348 | } |
349 | 349 | |
350 | 350 | if (empty($try)) |
351 | - $try=0; |
|
351 | + $try = 0; |
|
352 | 352 | |
353 | 353 | if (empty($lp)) { |
354 | - $lp=0; |
|
354 | + $lp = 0; |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | if (empty($destination)) { |
358 | - $destination=0; |
|
358 | + $destination = 0; |
|
359 | 359 | } |
360 | 360 | |
361 | - if ($url=='') { |
|
362 | - $url=0; |
|
361 | + if ($url == '') { |
|
362 | + $url = 0; |
|
363 | 363 | } |
364 | 364 | |
365 | 365 | //1@@1;2;@@2;4;4;@@http://www.chamilo.org |
366 | - $dest= $try.'@@'.$lp.'@@'.$destination.'@@'.$url; |
|
367 | - $objAnswer -> createAnswer($answer,$goodAnswer,$comment,$weighting,$i,NULL,NULL,$dest); |
|
366 | + $dest = $try.'@@'.$lp.'@@'.$destination.'@@'.$url; |
|
367 | + $objAnswer -> createAnswer($answer, $goodAnswer, $comment, $weighting, $i, NULL, NULL, $dest); |
|
368 | 368 | } |
369 | 369 | |
370 | 370 | //Create 666 answer |
@@ -372,10 +372,10 @@ discard block |
||
372 | 372 | $answer = trim($form -> getSubmitValue('answer['.$i.']')); |
373 | 373 | $comment = trim($form -> getSubmitValue('comment['.$i.']')); |
374 | 374 | $weighting = trim($form -> getSubmitValue('weighting['.$i.']')); |
375 | - $goodAnswer= ($correct == $i) ? true : false; |
|
375 | + $goodAnswer = ($correct == $i) ? true : false; |
|
376 | 376 | $dest = ''; |
377 | 377 | |
378 | - $objAnswer -> createAnswer($answer,$goodAnswer,$comment,$weighting,$i,NULL,NULL,$dest); |
|
378 | + $objAnswer -> createAnswer($answer, $goodAnswer, $comment, $weighting, $i, NULL, NULL, $dest); |
|
379 | 379 | |
380 | 380 | // saves the answers into the data base |
381 | 381 | $objAnswer -> save(); |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | function return_header($feedback_type = null, $counter = null, $score = null) |
389 | 389 | { |
390 | 390 | $header = parent::return_header($feedback_type, $counter, $score); |
391 | - $header .= '<table class="'.$this->question_table_class .'"> |
|
391 | + $header .= '<table class="'.$this->question_table_class.'"> |
|
392 | 392 | <tr> |
393 | 393 | <th>'.get_lang("Choice").'</th> |
394 | 394 | <th>'. get_lang("ExpectedChoice").'</th> |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | if (empty($document_data)) { |
75 | - $document_id = $parent_id = 0; |
|
75 | + $document_id = $parent_id = 0; |
|
76 | 76 | $path = '/'; |
77 | 77 | } else { |
78 | 78 | $document_id = $document_data['id']; |
@@ -199,10 +199,10 @@ discard block |
||
199 | 199 | true |
200 | 200 | ); |
201 | 201 | |
202 | - $redirectUrl = api_get_self() . '?' . api_get_cidreq(); |
|
202 | + $redirectUrl = api_get_self().'?'.api_get_cidreq(); |
|
203 | 203 | |
204 | 204 | if ($document_data) { |
205 | - $redirectUrl .= '&' . http_build_query([ |
|
205 | + $redirectUrl .= '&'.http_build_query([ |
|
206 | 206 | 'id' => $document_data['iid'] |
207 | 207 | ]); |
208 | 208 | } |
@@ -217,11 +217,11 @@ discard block |
||
217 | 217 | // Actions |
218 | 218 | // Link back to the documents overview |
219 | 219 | if ($is_certificate_mode) { |
220 | - $actions = '<a href="document.php?id='.$document_id.'&selectcat=' . $selectcat.'&'.api_get_cidreq().'">'. |
|
221 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
220 | + $actions = '<a href="document.php?id='.$document_id.'&selectcat='.$selectcat.'&'.api_get_cidreq().'">'. |
|
221 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('CertificateOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
222 | 222 | } else { |
223 | 223 | $actions = '<a href="document.php?id='.$document_id.'&'.api_get_cidreq().'">'. |
224 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
224 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | // Link to create a folder |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | $course_plugin = 'bbb'; //needed in order to load the plugin lang variables |
8 | 8 | $cidReset = true; |
9 | 9 | |
10 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
10 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
11 | 11 | |
12 | 12 | $action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null; |
13 | 13 | $meetingId = isset($_REQUEST['meeting']) ? intval($_REQUEST['meeting']) : 0; |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | 'first' |
34 | 34 | ); |
35 | 35 | |
36 | - $url = $meetingInfo['video_url'] . '/capture.m4v'; |
|
36 | + $url = $meetingInfo['video_url'].'/capture.m4v'; |
|
37 | 37 | $link = Display::url( |
38 | 38 | Display::return_icon('save.png', get_lang('DownloadFile')), |
39 | - $meetingInfo['video_url'] . '/capture.m4v', |
|
39 | + $meetingInfo['video_url'].'/capture.m4v', |
|
40 | 40 | ['target' => '_blank'] |
41 | 41 | ); |
42 | 42 |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | .sortable({ |
137 | 137 | cursor: "move", // works? |
138 | 138 | update: function(event, ui) { |
139 | - var order = $(this).sortable("serialize") + "&a=update_question_order&exercise_id=<?php echo intval($_GET['exerciseId']);?>"; |
|
139 | + var order = $(this).sortable("serialize") + "&a=update_question_order&exercise_id=<?php echo intval($_GET['exerciseId']); ?>"; |
|
140 | 140 | $.post("<?php echo $ajax_url ?>", order, function(reponse){ |
141 | 141 | $("#message").html(reponse); |
142 | 142 | }); |
@@ -172,12 +172,12 @@ discard block |
||
172 | 172 | echo "<div class='table-responsive'>"; |
173 | 173 | echo "<table class='table table-condensed'>"; |
174 | 174 | echo "<tr>"; |
175 | - echo "<th style=\"width: 40%;\">" .get_lang('Questions'). "</th>"; |
|
176 | - echo "<th style=\"width: 10%;\">" .get_lang('Type'). "</th>"; |
|
177 | - echo "<th style=\"width: 20%;\">" .get_lang('Category'). "</th>"; |
|
178 | - echo "<th style=\"width: 10%;\">" .get_lang('Difficulty'). "</th>"; |
|
179 | - echo "<th style=\"width: 10%;\">" .get_lang('Score'). "</th>"; |
|
180 | - echo "<th style=\"width: 10%;\">" .get_lang('Actions'). "</th>"; |
|
175 | + echo "<th style=\"width: 40%;\">".get_lang('Questions')."</th>"; |
|
176 | + echo "<th style=\"width: 10%;\">".get_lang('Type')."</th>"; |
|
177 | + echo "<th style=\"width: 20%;\">".get_lang('Category')."</th>"; |
|
178 | + echo "<th style=\"width: 10%;\">".get_lang('Difficulty')."</th>"; |
|
179 | + echo "<th style=\"width: 10%;\">".get_lang('Score')."</th>"; |
|
180 | + echo "<th style=\"width: 10%;\">".get_lang('Actions')."</th>"; |
|
181 | 181 | echo "</tr>"; |
182 | 182 | echo "</table>"; |
183 | 183 | echo "</div>"; |
@@ -217,15 +217,14 @@ discard block |
||
217 | 217 | $question_class = get_class($objQuestionTmp); |
218 | 218 | |
219 | 219 | $clone_link = '<a href="'.api_get_self().'?'.api_get_cidreq().'&clone_question='.$id.'">'. |
220 | - Display::return_icon('cd.png',get_lang('Copy'), array(), ICON_SIZE_SMALL).'</a>'; |
|
220 | + Display::return_icon('cd.png', get_lang('Copy'), array(), ICON_SIZE_SMALL).'</a>'; |
|
221 | 221 | $edit_link = ($objQuestionTmp->type == CALCULATED_ANSWER && $objQuestionTmp->isAnswered()) ? |
222 | 222 | '<a>'.Display::return_icon( |
223 | 223 | 'edit_na.png', |
224 | 224 | get_lang('QuestionEditionNotAvailableBecauseItIsAlreadyAnsweredHoweverYouCanCopyItAndModifyTheCopy'), |
225 | 225 | array(), |
226 | 226 | ICON_SIZE_SMALL |
227 | - ).'</a>' : |
|
228 | - '<a href="'.api_get_self().'?'.api_get_cidreq().'&type='. |
|
227 | + ).'</a>' : '<a href="'.api_get_self().'?'.api_get_cidreq().'&type='. |
|
229 | 228 | $objQuestionTmp->selectType().'&myid=1&editQuestion='.$id.'">'. |
230 | 229 | Display::return_icon( |
231 | 230 | 'edit.png', |
@@ -235,17 +234,17 @@ discard block |
||
235 | 234 | ).'</a>'; |
236 | 235 | $delete_link = null; |
237 | 236 | if ($objExercise->edit_exercise_in_lp == true) { |
238 | - $delete_link = '<a id="delete_'.$id.'" class="opener" href="'.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId.'&deleteQuestion='.$id.'" >'.Display::return_icon('delete.png',get_lang('RemoveFromTest'), array(), ICON_SIZE_SMALL).'</a>'; |
|
237 | + $delete_link = '<a id="delete_'.$id.'" class="opener" href="'.api_get_self().'?'.api_get_cidreq().'&exerciseId='.$exerciseId.'&deleteQuestion='.$id.'" >'.Display::return_icon('delete.png', get_lang('RemoveFromTest'), array(), ICON_SIZE_SMALL).'</a>'; |
|
239 | 238 | } |
240 | 239 | |
241 | - $edit_link = Display::tag('span', $edit_link, array('class'=>'items')); |
|
242 | - $clone_link = Display::tag('span', $clone_link, array('class'=>'items')); |
|
240 | + $edit_link = Display::tag('span', $edit_link, array('class'=>'items')); |
|
241 | + $clone_link = Display::tag('span', $clone_link, array('class'=>'items')); |
|
243 | 242 | $delete_link = Display::tag('span', $delete_link, array('class'=>'items')); |
244 | - $btnActions = Display::tag('td',Display::tag( |
|
243 | + $btnActions = Display::tag('td', Display::tag( |
|
245 | 244 | 'div', |
246 | 245 | $edit_link.$clone_link.$delete_link, |
247 | 246 | array('class'=>'edition') |
248 | - ), array ('class'=>'btn-actions')); |
|
247 | + ), array('class'=>'btn-actions')); |
|
249 | 248 | |
250 | 249 | $title = Security::remove_XSS($objQuestionTmp->selectTitle()); |
251 | 250 | /* $move = Display::return_icon( |
@@ -285,7 +284,7 @@ discard block |
||
285 | 284 | $questionScore = Display::tag('td', $objQuestionTmp->selectWeighting(), array('class'=>$styleScore)); |
286 | 285 | |
287 | 286 | echo '<div id="question_id_list_'.$id.'" >'; |
288 | - echo '<div class="header_operations" data-exercise="' . $objExercise->selectId() . '" data-question="' . $id . '">'; |
|
287 | + echo '<div class="header_operations" data-exercise="'.$objExercise->selectId().'" data-question="'.$id.'">'; |
|
289 | 288 | echo "<div class='table-responsive'>"; |
290 | 289 | echo "<table class='table'>"; |
291 | 290 | echo "<tr>"; |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | |
59 | 59 | Display::addFlash(Display::return_message(get_lang('MessageSent'))); |
60 | 60 | |
61 | - $url = api_get_path(WEB_CODE_PATH) . 'social/profile.php'; |
|
61 | + $url = api_get_path(WEB_CODE_PATH).'social/profile.php'; |
|
62 | 62 | $url .= empty($_SERVER['QUERY_STRING']) ? '' : '?'.Security::remove_XSS($_SERVER['QUERY_STRING']); |
63 | - header('Location: ' . $url); |
|
63 | + header('Location: '.$url); |
|
64 | 64 | exit; |
65 | 65 | |
66 | 66 | } else if (!empty($_POST['social_wall_new_msg']) && !empty($_POST['messageId'])) { |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | MESSAGE_STATUS_WALL |
76 | 76 | ); |
77 | 77 | Display::addFlash(Display::return_message(get_lang('MessageSent'))); |
78 | - $url = api_get_path(WEB_CODE_PATH) . 'social/profile.php'; |
|
78 | + $url = api_get_path(WEB_CODE_PATH).'social/profile.php'; |
|
79 | 79 | $url .= empty($_SERVER['QUERY_STRING']) ? '' : '?'.Security::remove_XSS($_SERVER['QUERY_STRING']); |
80 | - header('Location: ' . $url); |
|
80 | + header('Location: '.$url); |
|
81 | 81 | exit; |
82 | 82 | |
83 | 83 | } else if (isset($_GET['messageId'])) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $status = SocialManager::deleteMessage($messageId); |
90 | 90 | |
91 | 91 | Display::addFlash(Display::return_message(get_lang('MessageDeleted'))); |
92 | - header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/profile.php'); |
|
92 | + header('Location: '.api_get_path(WEB_CODE_PATH).'social/profile.php'); |
|
93 | 93 | exit; |
94 | 94 | } |
95 | 95 | } |
@@ -153,16 +153,16 @@ discard block |
||
153 | 153 | |
154 | 154 | $ajax_url = api_get_path(WEB_AJAX_PATH).'message.ajax.php'; |
155 | 155 | $socialAjaxUrl = api_get_path(WEB_AJAX_PATH).'social.ajax.php'; |
156 | -$javascriptDir = api_get_path(LIBRARY_PATH) . 'javascript/'; |
|
156 | +$javascriptDir = api_get_path(LIBRARY_PATH).'javascript/'; |
|
157 | 157 | api_block_anonymous_users(); |
158 | 158 | $locale = api_get_language_isocode(); |
159 | 159 | // Add Jquery scroll pagination plugin |
160 | 160 | $htmlHeadXtra[] = api_get_js('jscroll/jquery.jscroll.js'); |
161 | 161 | // Add Jquery Time ago plugin |
162 | 162 | $htmlHeadXtra[] = api_get_asset('jquery-timeago/jquery.timeago.js'); |
163 | -$timeAgoLocaleDir = $javascriptDir . 'jquery-timeago/locales/jquery.timeago.' . $locale . '.js'; |
|
163 | +$timeAgoLocaleDir = $javascriptDir.'jquery-timeago/locales/jquery.timeago.'.$locale.'.js'; |
|
164 | 164 | if (file_exists($timeAgoLocaleDir)) { |
165 | - $htmlHeadXtra[] = api_get_js('jquery-timeago/locales/jquery.timeago.' . $locale . '.js'); |
|
165 | + $htmlHeadXtra[] = api_get_js('jquery-timeago/locales/jquery.timeago.'.$locale.'.js'); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | $htmlHeadXtra[] = '<script> |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $(document).ready(function (){ |
171 | 171 | var container = $("#wallMessages"); |
172 | 172 | container.jscroll({ |
173 | - loadingHtml: "<div class=\"well_border\">' . get_lang('Loading') . ' </div>", |
|
173 | + loadingHtml: "<div class=\"well_border\">' . get_lang('Loading').' </div>", |
|
174 | 174 | nextSelector: "a.nextPage:last", |
175 | 175 | contentSelector: "", |
176 | 176 | callback: timeAgo |
@@ -200,8 +200,8 @@ discard block |
||
200 | 200 | ); |
201 | 201 | |
202 | 202 | if (isset($_GET['u']) && is_numeric($_GET['u']) && $_GET['u'] != api_get_user_id()) { |
203 | - $info_user = api_get_user_info($_GET['u']); |
|
204 | - $interbreadcrumb[]= array( |
|
203 | + $info_user = api_get_user_info($_GET['u']); |
|
204 | + $interbreadcrumb[] = array( |
|
205 | 205 | 'url' => '#', |
206 | 206 | 'name' => $info_user['complete_name'] |
207 | 207 | ); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $list = []; |
226 | 226 | if (is_array($personal_course_list)) { |
227 | 227 | foreach ($personal_course_list as $my_course) { |
228 | - if ($i<=10) { |
|
228 | + if ($i <= 10) { |
|
229 | 229 | $list[] = SocialManager::get_logged_user_course_html($my_course, $i); |
230 | 230 | $course_list_code[] = array('code' => $my_course['code']); |
231 | 231 | } else { |
@@ -263,13 +263,13 @@ discard block |
||
263 | 263 | $social_wall_block = $wallSocialAddPost; |
264 | 264 | |
265 | 265 | // Social Post Wall |
266 | -$posts = SocialManager::getWallMessagesByUser($my_user_id, $friendId) ; |
|
266 | +$posts = SocialManager::getWallMessagesByUser($my_user_id, $friendId); |
|
267 | 267 | |
268 | 268 | $social_post_wall_block = empty($posts) ? '<p>'.get_lang("NoPosts").'</p>' : $posts; |
269 | 269 | |
270 | 270 | $socialAutoExtendLink = Display::url( |
271 | 271 | get_lang('SeeMore'), |
272 | - $socialAjaxUrl . '?u='. $my_user_id . '&a=listWallMessage&start=10&length=5', |
|
272 | + $socialAjaxUrl.'?u='.$my_user_id.'&a=listWallMessage&start=10&length=5', |
|
273 | 273 | array( |
274 | 274 | 'class' => 'nextPage next', |
275 | 275 | ) |
@@ -291,12 +291,12 @@ discard block |
||
291 | 291 | $(".spinner").html("'. |
292 | 292 | '<div class=\'text-center\'>'. |
293 | 293 | '<em class=\'fa fa-spinner fa-pulse fa-1x\'></em>'. |
294 | - '<p>'. get_lang('Loading') . ' ' . get_lang('Preview') .'</p>'. |
|
294 | + '<p>'.get_lang('Loading').' '.get_lang('Preview').'</p>'. |
|
295 | 295 | '</div>'. |
296 | 296 | '"); |
297 | 297 | }, |
298 | 298 | type: "POST", |
299 | - url: "'. api_get_path(WEB_AJAX_PATH) .'social.ajax.php?a=readUrlWithOpenGraph", |
|
299 | + url: "'. api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=readUrlWithOpenGraph", |
|
300 | 300 | data: "social_wall_new_msg_main=" + e.originalEvent.clipboardData.getData("text"), |
301 | 301 | success: function(response) { |
302 | 302 | $("[name=\'wall_post_button\']").prop( "disabled", false ); |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | .$tags['tag'] |
392 | 392 | .'</a>'; |
393 | 393 | } |
394 | - if (is_array($user_tags) && count($user_tags)>0) { |
|
394 | + if (is_array($user_tags) && count($user_tags) > 0) { |
|
395 | 395 | $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']).': ' |
396 | 396 | .' '.implode('', $tag_tmp).'</li>'; |
397 | 397 | } |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $extra_information_value .= '<li class="list-group-item">'.$data.'</li>'; |
416 | 416 | break; |
417 | 417 | default: |
418 | - $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']) . ': ' . $data . '</li>'; |
|
418 | + $extra_information_value .= '<li class="list-group-item">'.ucfirst($extraFieldInfo['display_text']).': '.$data.'</li>'; |
|
419 | 419 | break; |
420 | 420 | } |
421 | 421 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | // if there are information to show |
425 | 425 | if (!empty($extra_information_value)) { |
426 | 426 | |
427 | - $extra_information_value = '<ul class="list-group">' . $extra_information_value . '</ul>'; |
|
427 | + $extra_information_value = '<ul class="list-group">'.$extra_information_value.'</ul>'; |
|
428 | 428 | |
429 | 429 | $extra_information .= Display::panelCollapse( |
430 | 430 | get_lang('ExtraInformation'), |
@@ -504,10 +504,10 @@ discard block |
||
504 | 504 | |
505 | 505 | if ($i > $max_numbers_of_group) { |
506 | 506 | if (api_get_user_id() == $user_id) { |
507 | - $my_groups .= '<div class="box_shared_profile_group_actions">' |
|
507 | + $my_groups .= '<div class="box_shared_profile_group_actions">' |
|
508 | 508 | .'<a href="groups.php?#tab_browse-1">'.get_lang('SeeAllMyGroups').'</a></div>'; |
509 | 509 | } else { |
510 | - $my_groups .= '<div class="box_shared_profile_group_actions">' |
|
510 | + $my_groups .= '<div class="box_shared_profile_group_actions">' |
|
511 | 511 | .'<a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php' |
512 | 512 | .'?view=mygroups&height=390&width=610&user_id='.$user_id.'"' |
513 | 513 | .' class="ajax" title="'.get_lang('SeeAll').'" >' |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | $i = 1; |
521 | 521 | foreach ($grid_my_groups as $group) { |
522 | 522 | $my_groups .= '<div class="panel-body">'; |
523 | - $my_groups .= $group[0]; |
|
523 | + $my_groups .= $group[0]; |
|
524 | 524 | $my_groups .= '</div>'; |
525 | 525 | $i++; |
526 | 526 | } |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | $i++; |
544 | 544 | } |
545 | 545 | } |
546 | - $social_course_block .= $my_courses; |
|
546 | + $social_course_block .= $my_courses; |
|
547 | 547 | } |
548 | 548 | |
549 | 549 | // Block Social Sessions |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | |
565 | 565 | // Images uploaded by course |
566 | 566 | $file_list = ''; |
567 | - if (is_array($course_list_code) && count($course_list_code)>0) { |
|
567 | + if (is_array($course_list_code) && count($course_list_code) > 0) { |
|
568 | 568 | foreach ($course_list_code as $course) { |
569 | 569 | $file_list .= UserManager::get_user_upload_files_by_course( |
570 | 570 | $user_id, |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | |
577 | 577 | $count_pending_invitations = 0; |
578 | 578 | if (!isset($_GET['u']) || |
579 | - (isset($_GET['u']) && $_GET['u']==api_get_user_id()) |
|
579 | + (isset($_GET['u']) && $_GET['u'] == api_get_user_id()) |
|
580 | 580 | ) { |
581 | 581 | $pending_invitations = SocialManager::get_list_invitation_of_friends_by_user_id(api_get_user_id()); |
582 | 582 | $list_get_path_web = SocialManager::get_list_web_path_user_invitation_by_user_id(api_get_user_id()); |
@@ -585,23 +585,23 @@ discard block |
||
585 | 585 | |
586 | 586 | if (!empty($production_list) || !empty($file_list) || $count_pending_invitations > 0) { |
587 | 587 | // Pending invitations |
588 | - if (!isset($_GET['u']) || (isset($_GET['u']) && $_GET['u']==api_get_user_id())) { |
|
588 | + if (!isset($_GET['u']) || (isset($_GET['u']) && $_GET['u'] == api_get_user_id())) { |
|
589 | 589 | if ($count_pending_invitations > 0) { |
590 | - $invitations = '<ul class="list-group">'; |
|
590 | + $invitations = '<ul class="list-group">'; |
|
591 | 591 | for ($i = 0; $i < $count_pending_invitations; $i++) { |
592 | 592 | $user_invitation_id = $pending_invitations[$i]['user_sender_id']; |
593 | - $invitations .= '<li id="dpending_'.$user_invitation_id.'" class="list-group-item">'; |
|
594 | - $invitations .= '<img class="img-rounded" ' |
|
593 | + $invitations .= '<li id="dpending_'.$user_invitation_id.'" class="list-group-item">'; |
|
594 | + $invitations .= '<img class="img-rounded" ' |
|
595 | 595 | .' src="'.$list_get_path_web[$i]['dir'].'/'.$list_get_path_web[$i]['file'].'"' |
596 | 596 | .' width="40px">'; |
597 | 597 | $userInfo = api_get_user_info($user_invitation_id); |
598 | 598 | $invitations .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php?u='.$user_invitation_id.'">' |
599 | - .api_get_person_name($userInfo['firstname'],$userInfo['lastname']).'</a>'; |
|
599 | + .api_get_person_name($userInfo['firstname'], $userInfo['lastname']).'</a>'; |
|
600 | 600 | |
601 | - $invitations .='<div class="pull-right">'; |
|
601 | + $invitations .= '<div class="pull-right">'; |
|
602 | 602 | $invitations .= Display::toolbarButton( |
603 | 603 | get_lang('SocialAddToFriends'), |
604 | - api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([ |
|
604 | + api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([ |
|
605 | 605 | 'a' => 'add_friend', |
606 | 606 | 'friend_id' => $user_invitation_id, |
607 | 607 | 'is_my_friend' => 'friend' |
@@ -612,8 +612,8 @@ discard block |
||
612 | 612 | false |
613 | 613 | ); |
614 | 614 | $invitations .= '</div>'; |
615 | - $invitations .= '<div id="id_response"></div>'; |
|
616 | - $invitations .= '</li>'; |
|
615 | + $invitations .= '<div id="id_response"></div>'; |
|
616 | + $invitations .= '</li>'; |
|
617 | 617 | } |
618 | 618 | $invitations .= '</ul>'; |
619 | 619 | $listInvitations = Display::panelCollapse( |
@@ -628,51 +628,51 @@ discard block |
||
628 | 628 | } |
629 | 629 | |
630 | 630 | // Productions |
631 | - $production_list = UserManager::build_production_list($user_id); |
|
631 | + $production_list = UserManager::build_production_list($user_id); |
|
632 | 632 | $product_content = ''; |
633 | 633 | if (!empty($production_list)) { |
634 | 634 | $product_content .= '<div><h3>'.get_lang('MyProductions').'</h3></div>'; |
635 | - $product_content .= $production_list; |
|
636 | - $socialRightInformation .= SocialManager::social_wrapper_div($product_content, 4); |
|
635 | + $product_content .= $production_list; |
|
636 | + $socialRightInformation .= SocialManager::social_wrapper_div($product_content, 4); |
|
637 | 637 | } |
638 | 638 | |
639 | 639 | $images_uploaded = null; |
640 | 640 | // Images uploaded by course |
641 | 641 | if (!empty($file_list)) { |
642 | - $images_uploaded .= '<div><h3>'.get_lang('ImagesUploaded').'</h3></div>'; |
|
643 | - $images_uploaded .= '<div class="social-content-information">'; |
|
644 | - $images_uploaded .= $file_list; |
|
645 | - $images_uploaded .= '</div>'; |
|
646 | - $socialRightInformation .= SocialManager::social_wrapper_div($images_uploaded, 4); |
|
642 | + $images_uploaded .= '<div><h3>'.get_lang('ImagesUploaded').'</h3></div>'; |
|
643 | + $images_uploaded .= '<div class="social-content-information">'; |
|
644 | + $images_uploaded .= $file_list; |
|
645 | + $images_uploaded .= '</div>'; |
|
646 | + $socialRightInformation .= SocialManager::social_wrapper_div($images_uploaded, 4); |
|
647 | 647 | } |
648 | 648 | } |
649 | 649 | |
650 | 650 | if (!empty($user_info['competences']) || !empty($user_info['diplomas']) |
651 | - || !empty($user_info['openarea']) || !empty($user_info['teach']) ) { |
|
651 | + || !empty($user_info['openarea']) || !empty($user_info['teach'])) { |
|
652 | 652 | |
653 | - $more_info .= '<div><h3>'.get_lang('MoreInformation').'</h3></div>'; |
|
653 | + $more_info .= '<div><h3>'.get_lang('MoreInformation').'</h3></div>'; |
|
654 | 654 | if (!empty($user_info['competences'])) { |
655 | - $more_info .= '<br />'; |
|
656 | - $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyCompetences').'</strong></div>'; |
|
657 | - $more_info .= '<div class="social-profile-extended">'.$user_info['competences'].'</div>'; |
|
658 | - $more_info .= '<br />'; |
|
655 | + $more_info .= '<br />'; |
|
656 | + $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyCompetences').'</strong></div>'; |
|
657 | + $more_info .= '<div class="social-profile-extended">'.$user_info['competences'].'</div>'; |
|
658 | + $more_info .= '<br />'; |
|
659 | 659 | } |
660 | 660 | if (!empty($user_info['diplomas'])) { |
661 | - $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div>'; |
|
662 | - $more_info .= '<div class="social-profile-extended">'.$user_info['diplomas'].'</div>'; |
|
663 | - $more_info .= '<br />'; |
|
661 | + $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyDiplomas').'</strong></div>'; |
|
662 | + $more_info .= '<div class="social-profile-extended">'.$user_info['diplomas'].'</div>'; |
|
663 | + $more_info .= '<br />'; |
|
664 | 664 | } |
665 | 665 | if (!empty($user_info['openarea'])) { |
666 | - $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div>'; |
|
667 | - $more_info .= '<div class="social-profile-extended">'.$user_info['openarea'].'</div>'; |
|
668 | - $more_info .= '<br />'; |
|
666 | + $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyPersonalOpenArea').'</strong></div>'; |
|
667 | + $more_info .= '<div class="social-profile-extended">'.$user_info['openarea'].'</div>'; |
|
668 | + $more_info .= '<br />'; |
|
669 | 669 | } |
670 | 670 | if (!empty($user_info['teach'])) { |
671 | - $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyTeach').'</strong></div>'; |
|
672 | - $more_info .= '<div class="social-profile-extended">'.$user_info['teach'].'</div>'; |
|
673 | - $more_info .= '<br />'; |
|
671 | + $more_info .= '<div class="social-actions-message"><strong>'.get_lang('MyTeach').'</strong></div>'; |
|
672 | + $more_info .= '<div class="social-profile-extended">'.$user_info['teach'].'</div>'; |
|
673 | + $more_info .= '<br />'; |
|
674 | 674 | } |
675 | - $socialRightInformation .= SocialManager::social_wrapper_div($more_info, 4); |
|
675 | + $socialRightInformation .= SocialManager::social_wrapper_div($more_info, 4); |
|
676 | 676 | } |
677 | 677 | } |
678 | 678 | |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | $tpl->assign('social_right_information', $socialRightInformation); |
695 | 695 | $tpl->assign('social_auto_extend_link', $socialAutoExtendLink); |
696 | 696 | |
697 | -$formModalTpl = new Template(); |
|
697 | +$formModalTpl = new Template(); |
|
698 | 698 | $formModalTpl->assign('invitation_form', MessageManager::generate_invitation_form('send_invitation')); |
699 | 699 | $formModals = $formModalTpl->fetch('default/social/form_modals.tpl'); |
700 | 700 |