@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | $this_section = SECTION_COURSES; |
49 | 49 | $nameTools = get_lang('CopyCourse'); |
50 | -$returnLink = api_get_path(WEB_CODE_PATH) . 'course_info/maintenance_coach.php?' . api_get_cidreq(); |
|
50 | +$returnLink = api_get_path(WEB_CODE_PATH).'course_info/maintenance_coach.php?'.api_get_cidreq(); |
|
51 | 51 | $interbreadcrumb[] = array( |
52 | 52 | 'url' => $returnLink, |
53 | 53 | 'name' => get_lang('Maintenance') |
@@ -73,29 +73,29 @@ discard block |
||
73 | 73 | $attrs = ''; |
74 | 74 | if (count($attr) > 0) { |
75 | 75 | foreach ($attr as $key => $value) { |
76 | - $attrs .= ' ' . $key . '="' . $value . '"'; |
|
76 | + $attrs .= ' '.$key.'="'.$value.'"'; |
|
77 | 77 | } |
78 | 78 | } |
79 | - $output = '<select name="' . $name . '" ' . $attrs . '>'; |
|
79 | + $output = '<select name="'.$name.'" '.$attrs.'>'; |
|
80 | 80 | |
81 | 81 | if (count($sessions) == 0) { |
82 | - $output .= '<option value = "0">' . get_lang( |
|
82 | + $output .= '<option value = "0">'.get_lang( |
|
83 | 83 | 'ThereIsNotStillASession' |
84 | - ) . '</option>'; |
|
84 | + ).'</option>'; |
|
85 | 85 | } else { |
86 | - $output .= '<option value = "0">' . get_lang( |
|
86 | + $output .= '<option value = "0">'.get_lang( |
|
87 | 87 | 'SelectASession' |
88 | - ) . '</option>'; |
|
88 | + ).'</option>'; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | if (is_array($sessions)) { |
92 | 92 | foreach ($sessions as $session) { |
93 | 93 | $category_name = ''; |
94 | 94 | if (!empty($session['category_name'])) { |
95 | - $category_name = ' (' . $session['category_name'] . ')'; |
|
95 | + $category_name = ' ('.$session['category_name'].')'; |
|
96 | 96 | } |
97 | 97 | |
98 | - $output .= '<option value="' . $session['id'] . '">' . $session['name'] . ' ' . $category_name . '</option>'; |
|
98 | + $output .= '<option value="'.$session['id'].'">'.$session['name'].' '.$category_name.'</option>'; |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | $output .= '</select>'; |
@@ -120,43 +120,43 @@ discard block |
||
120 | 120 | // Actions |
121 | 121 | $html .= '<div class="actions">'; |
122 | 122 | // Link back to the documents overview |
123 | - $html .= '<a href="' . $returnLink . '">' . Display::return_icon( |
|
124 | - 'back.png', get_lang('BackTo') . ' ' . get_lang('Maintenance'), '', ICON_SIZE_MEDIUM |
|
125 | - ) . '</a>'; |
|
123 | + $html .= '<a href="'.$returnLink.'">'.Display::return_icon( |
|
124 | + 'back.png', get_lang('BackTo').' '.get_lang('Maintenance'), '', ICON_SIZE_MEDIUM |
|
125 | + ).'</a>'; |
|
126 | 126 | $html .= '</div>'; |
127 | 127 | |
128 | 128 | $html .= Display::return_message( |
129 | 129 | get_lang('CopyCourseFromSessionToSessionExplanation') |
130 | 130 | ); |
131 | 131 | |
132 | - $html .= '<form name="formulaire" method="post" action="' . api_get_self( |
|
133 | - ) . '?' . api_get_cidreq() . '" >'; |
|
132 | + $html .= '<form name="formulaire" method="post" action="'.api_get_self( |
|
133 | + ).'?'.api_get_cidreq().'" >'; |
|
134 | 134 | $html .= '<table border="0" cellpadding="5" cellspacing="0" width="100%">'; |
135 | 135 | |
136 | 136 | // Source |
137 | - $html .= '<tr><td width="15%"><b>' . get_lang( |
|
137 | + $html .= '<tr><td width="15%"><b>'.get_lang( |
|
138 | 138 | 'OriginCoursesFromSession' |
139 | - ) . ':</b></td>'; |
|
140 | - $html .= '<td width="10%" align="left">' . api_get_session_name( |
|
139 | + ).':</b></td>'; |
|
140 | + $html .= '<td width="10%" align="left">'.api_get_session_name( |
|
141 | 141 | $sessionId |
142 | - ) . '</td>'; |
|
142 | + ).'</td>'; |
|
143 | 143 | $html .= '<td width="50%">'; |
144 | - $html .= "{$courseInfo['title']} ({$courseInfo['code']})" . '</td></tr>'; |
|
144 | + $html .= "{$courseInfo['title']} ({$courseInfo['code']})".'</td></tr>'; |
|
145 | 145 | |
146 | 146 | // Destination |
147 | - $html .= '<tr><td width="15%"><b>' . get_lang( |
|
147 | + $html .= '<tr><td width="15%"><b>'.get_lang( |
|
148 | 148 | 'DestinationCoursesFromSession' |
149 | - ) . ':</b></td>'; |
|
149 | + ).':</b></td>'; |
|
150 | 150 | $html .= '<td width="10%" align="left"><div id="ajax_sessions_list_destination">'; |
151 | 151 | $html .= '<select name="sessions_list_destination" onchange="javascript: xajax_searchCourses(this.value,\'destination\');">'; |
152 | 152 | if (empty($sessions)) { |
153 | - $html .= '<option value = "0">' . get_lang( |
|
153 | + $html .= '<option value = "0">'.get_lang( |
|
154 | 154 | 'ThereIsNotStillASession' |
155 | - ) . '</option>'; |
|
155 | + ).'</option>'; |
|
156 | 156 | } else { |
157 | - $html .= '<option value = "0">' . get_lang( |
|
157 | + $html .= '<option value = "0">'.get_lang( |
|
158 | 158 | 'SelectASession' |
159 | - ) . '</option>'; |
|
159 | + ).'</option>'; |
|
160 | 160 | foreach ($sessions as $session) { |
161 | 161 | if ($session['id'] == $sessionId) { |
162 | 162 | continue; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | continue; |
167 | 167 | } |
168 | 168 | |
169 | - $html .= '<option value="' . $session['id'] . '">' . $session['name'] . '</option>'; |
|
169 | + $html .= '<option value="'.$session['id'].'">'.$session['name'].'</option>'; |
|
170 | 170 | } |
171 | 171 | } |
172 | 172 | |
@@ -178,17 +178,17 @@ discard block |
||
178 | 178 | $html .= '</tr></table>'; |
179 | 179 | |
180 | 180 | $html .= "<fieldset>"; |
181 | - $html .= '<legend>' . get_lang('TypeOfCopy') . ' <small>(' . get_lang('CopyOnlySessionItems') . ')</small></legend>'; |
|
181 | + $html .= '<legend>'.get_lang('TypeOfCopy').' <small>('.get_lang('CopyOnlySessionItems').')</small></legend>'; |
|
182 | 182 | $html .= '<label class="radio"><input type="radio" id="copy_option_1" name="copy_option" value="full_copy" checked="checked"/>'; |
183 | - $html .= get_lang('FullCopy') . '</label>'; |
|
183 | + $html .= get_lang('FullCopy').'</label>'; |
|
184 | 184 | $html .= '<label class="radio"><input type="radio" id="copy_option_2" name="copy_option" value="select_items"/>'; |
185 | - $html .= ' ' . get_lang('LetMeSelectItems') . '</label><br/>'; |
|
185 | + $html .= ' '.get_lang('LetMeSelectItems').'</label><br/>'; |
|
186 | 186 | |
187 | 187 | $html .= "</fieldset>"; |
188 | 188 | |
189 | - $html .= '<button class="save" type="submit" onclick="javascript:if(!confirm(' . "'" . addslashes( |
|
189 | + $html .= '<button class="save" type="submit" onclick="javascript:if(!confirm('."'".addslashes( |
|
190 | 190 | api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES) |
191 | - ) . "'" . ')) return false;">' . get_lang('CopyCourse') . '</button>'; |
|
191 | + )."'".')) return false;">'.get_lang('CopyCourse').'</button>'; |
|
192 | 192 | $html .= '</form>'; |
193 | 193 | echo $html; |
194 | 194 | } |
@@ -214,10 +214,10 @@ discard block |
||
214 | 214 | |
215 | 215 | $courseTitle = str_replace("'", "\'", $course['title']); |
216 | 216 | |
217 | - $return .= '<option value="' . $course['code'] . '" title="' . @htmlspecialchars( |
|
218 | - $course['title'] . ' (' . $course['visual_code'] . ')', ENT_QUOTES, api_get_system_encoding() |
|
219 | - ) . '">' . |
|
220 | - $course['title'] . ' (' . $course['visual_code'] . ')</option>'; |
|
217 | + $return .= '<option value="'.$course['code'].'" title="'.@htmlspecialchars( |
|
218 | + $course['title'].' ('.$course['visual_code'].')', ENT_QUOTES, api_get_system_encoding() |
|
219 | + ).'">'. |
|
220 | + $course['title'].' ('.$course['visual_code'].')</option>'; |
|
221 | 221 | } |
222 | 222 | $return .= '</select>'; |
223 | 223 | $_SESSION['course_list_destination'] = $course_list_destination; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | /* HTML head extra */ |
236 | 236 | |
237 | 237 | $htmlHeadXtra[] = $xajax->getJavascript( |
238 | - api_get_path(WEB_LIBRARY_PATH) . 'xajax/' |
|
238 | + api_get_path(WEB_LIBRARY_PATH).'xajax/' |
|
239 | 239 | ); |
240 | 240 | $htmlHeadXtra[] = '<script> |
241 | 241 | function checkSelected(id_select,id_radio,id_title,id_destination) { |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | |
381 | 381 | CourseSelectForm :: display_form($course, $hiddenFields, true); |
382 | 382 | |
383 | - echo '<div style="float:right"><a href="javascript:window.history.go(-1);">' . |
|
383 | + echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'. |
|
384 | 384 | Display::return_icon( |
385 | 385 | 'back.png', |
386 | 386 | get_lang('Back').' '.get_lang('To').' '.get_lang( |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | ), |
389 | 389 | array('style' => 'vertical-align:middle') |
390 | 390 | ). |
391 | - get_lang('Back') . '</a></div>'; |
|
391 | + get_lang('Back').'</a></div>'; |
|
392 | 392 | } else { |
393 | 393 | Display::display_error_message( |
394 | 394 | get_lang('You must select a course from original session and select a destination session') |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $form = new FormValidator( |
101 | 101 | 'survey', |
102 | 102 | 'post', |
103 | - api_get_self().'?action='.Security::remove_XSS($_GET['action']).'&survey_id='.$survey_id. '&' . api_get_cidreq() |
|
103 | + api_get_self().'?action='.Security::remove_XSS($_GET['action']).'&survey_id='.$survey_id.'&'.api_get_cidreq() |
|
104 | 104 | ); |
105 | 105 | |
106 | 106 | $form->addElement('header', $tool_name); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | foreach ($field_list as $key => & $field) { |
217 | 217 | if ($field['visibility'] == 1) { |
218 | 218 | $form->addElement('checkbox', 'profile_'.$key, ' ', ' '.$field['name']); |
219 | - $input_name_list.= 'profile_'.$key.','; |
|
219 | + $input_name_list .= 'profile_'.$key.','; |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 |
@@ -205,7 +205,7 @@ |
||
205 | 205 | $message = "Assert failed $message <br/>"; |
206 | 206 | echo $message; |
207 | 207 | // Dump variable for debug |
208 | - error_log(print_r(debug_backtrace(),1)); |
|
208 | + error_log(print_r(debug_backtrace(), 1)); |
|
209 | 209 | die; |
210 | 210 | } |
211 | 211 | else |
@@ -28,7 +28,7 @@ |
||
28 | 28 | } |
29 | 29 | krsort($langs, SORT_NUMERIC); |
30 | 30 | // Choosing the best match |
31 | - foreach($langs as $weight => $codes) { |
|
31 | + foreach ($langs as $weight => $codes) { |
|
32 | 32 | foreach ($codes as $code) { |
33 | 33 | if (in_array($code, $available_langs)) { |
34 | 34 | return $code; |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package chamilo.custompages |
7 | 7 | */ |
8 | 8 | // Get helper functions |
9 | -require_once __DIR__ . '/language.inc.php'; |
|
9 | +require_once __DIR__.'/language.inc.php'; |
|
10 | 10 | |
11 | 11 | // Define the languages you want to make available for auto-detection here |
12 | 12 | $available_langs = array('en', 'fr', 'es', 'gl', 'eu'); |
@@ -19,14 +19,14 @@ discard block |
||
19 | 19 | api_protect_admin_script(true); |
20 | 20 | |
21 | 21 | // Setting breadcrumbs. |
22 | -$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
23 | -$interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes')); |
|
22 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
23 | +$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes')); |
|
24 | 24 | |
25 | 25 | // Setting the name of the tool. |
26 | 26 | $tool_name = get_lang('SubscribeClassToCourses'); |
27 | 27 | |
28 | 28 | $add_type = 'multiple'; |
29 | -if (isset($_REQUEST['add_type']) && $_REQUEST['add_type']!=''){ |
|
29 | +if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
|
30 | 30 | $add_type = Security::remove_XSS($_REQUEST['add_type']); |
31 | 31 | } |
32 | 32 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id); |
99 | 99 | $searchForm->addHeader(get_lang('AdvancedSearch')); |
100 | -$renderer =& $searchForm->defaultRenderer(); |
|
100 | +$renderer = & $searchForm->defaultRenderer(); |
|
101 | 101 | $searchForm->addElement('hidden', 'id', $id); |
102 | 102 | foreach ($filters as $param) { |
103 | 103 | $searchForm->addElement($param['type'], $param['name'], $param['label']); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | //checking for extra field with filter on |
143 | 143 | |
144 | -function search($needle,$type) |
|
144 | +function search($needle, $type) |
|
145 | 145 | { |
146 | 146 | global $elements_in; |
147 | 147 | $xajax_response = new xajaxResponse(); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | echo '<div class="actions">'; |
183 | -echo '<a href="usergroups.php">'.Display::return_icon('back.png',get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>'; |
|
183 | +echo '<a href="usergroups.php">'.Display::return_icon('back.png', get_lang('Back'), array(), ICON_SIZE_MEDIUM).'</a>'; |
|
184 | 184 | echo Display::url(get_lang('AdvancedSearch'), '#', array('class' => 'advanced_options', 'id' => 'advanced_search')); |
185 | 185 | echo '</div>'; |
186 | 186 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | ?> |
192 | 192 | |
193 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
193 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;" <?php if ($ajax_search) {echo ' onsubmit="valide();"'; }?>> |
|
194 | 194 | |
195 | 195 | <?php echo '<legend>'.$data['name'].': '.$tool_name.'</legend>'; |
196 | 196 | echo Display::input('hidden', 'id', $id); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | <td align="center"><b><?php echo get_lang('CoursesInGroup') ?> :</b></td> |
210 | 210 | </tr> |
211 | 211 | |
212 | -<?php if ($add_type=='multiple') { ?> |
|
212 | +<?php if ($add_type == 'multiple') { ?> |
|
213 | 213 | <tr> |
214 | 214 | <td align="center"> |
215 | 215 | <?php echo get_lang('FirstLetterCourseTitle'); ?> : |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | <td align="center"> |
228 | 228 | <div id="content_source"> |
229 | 229 | <?php |
230 | - if (!($add_type=='multiple')) { |
|
230 | + if (!($add_type == 'multiple')) { |
|
231 | 231 | ?> |
232 | 232 | <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" /> |
233 | 233 | <div id="ajax_list_users_single"></div> |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } else { |
236 | 236 | ?> |
237 | 237 | <div id="ajax_list_multiple"> |
238 | - <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'),false); ?> |
|
238 | + <?php echo Display::select('elements_not_in_name', $elements_not_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), false); ?> |
|
239 | 239 | </div> |
240 | 240 | <?php |
241 | 241 | } |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | </td> |
267 | 267 | <td align="center"> |
268 | 268 | <?php |
269 | - echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'),false ); |
|
269 | + echo Display::select('elements_in_name[]', $elements_in, '', array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), false); |
|
270 | 270 | unset($sessionUsersList); |
271 | 271 | ?> |
272 | 272 | </td> |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | // Breadcrumbs. |
67 | 67 | if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
68 | - $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin')); |
|
69 | - $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList')); |
|
68 | + $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
69 | + $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
70 | 70 | $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.api_get_session_id(), 'name' => get_lang('SessionOverview')); |
71 | 71 | } |
72 | 72 | |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | |
135 | 135 | echo '<span style="float:right; padding-top:0px;">'; |
136 | 136 | echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
137 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
137 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
138 | 138 | |
139 | 139 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&id_session='.api_get_session_id().'&export=csv"> |
140 | - '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
140 | + '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
141 | 141 | |
142 | 142 | echo '</span>'; |
143 | 143 | echo '</div>'; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $quiz_avg_score = round(($quiz_avg_score / $studentCount), 2).'%'; |
251 | 251 | $url = api_get_path( |
252 | 252 | WEB_CODE_PATH |
253 | - ) . 'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
253 | + ).'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
254 | 254 | |
255 | 255 | echo '<tr><td>'.Display::url( |
256 | 256 | $quiz['title'], |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | $html = '<table class="table table-striped table-hover">'; |
40 | 40 | $html .= '<thead>'; |
41 | 41 | $html .= '<tr>'; |
42 | - $html .= '<th width="10">' . get_lang('Number') . '</th>'; |
|
43 | - $html .= '<th width="10">' . get_lang('True') . '</th>'; |
|
44 | - $html .= '<th width="50%">' . get_lang('Comment') . '</th>'; |
|
45 | - $html .= '<th width="50%">' . get_lang('Answer') . '</th>'; |
|
42 | + $html .= '<th width="10">'.get_lang('Number').'</th>'; |
|
43 | + $html .= '<th width="10">'.get_lang('True').'</th>'; |
|
44 | + $html .= '<th width="50%">'.get_lang('Comment').'</th>'; |
|
45 | + $html .= '<th width="50%">'.get_lang('Answer').'</th>'; |
|
46 | 46 | $html .= '</tr>'; |
47 | 47 | $html .= '</thead>'; |
48 | 48 | $html .= '<tbody>'; |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | $form->addHtml('<tr>'); |
75 | 75 | |
76 | 76 | if (is_object($answer)) { |
77 | - $defaults['answer[' . $i . ']'] = $answer->answer[$i]; |
|
78 | - $defaults['comment[' . $i . ']'] = $answer->comment[$i]; |
|
79 | - $defaults['weighting[' . $i . ']'] = float_format($answer->weighting[$i], 1); |
|
80 | - $defaults['correct[' . $i . ']'] = $answer->correct[$i]; |
|
77 | + $defaults['answer['.$i.']'] = $answer->answer[$i]; |
|
78 | + $defaults['comment['.$i.']'] = $answer->comment[$i]; |
|
79 | + $defaults['weighting['.$i.']'] = float_format($answer->weighting[$i], 1); |
|
80 | + $defaults['correct['.$i.']'] = $answer->correct[$i]; |
|
81 | 81 | } else { |
82 | 82 | $defaults['answer[1]'] = get_lang('DefaultMultipleAnswer2'); |
83 | 83 | $defaults['comment[1]'] = get_lang('DefaultMultipleComment2'); |
@@ -93,44 +93,44 @@ discard block |
||
93 | 93 | |
94 | 94 | $renderer->setElementTemplate( |
95 | 95 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
96 | - 'correct[' . $i . ']' |
|
96 | + 'correct['.$i.']' |
|
97 | 97 | ); |
98 | 98 | $renderer->setElementTemplate( |
99 | 99 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
100 | - 'counter[' . $i . ']' |
|
100 | + 'counter['.$i.']' |
|
101 | 101 | ); |
102 | 102 | $renderer->setElementTemplate( |
103 | 103 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
104 | - 'answer[' . $i . ']' |
|
104 | + 'answer['.$i.']' |
|
105 | 105 | ); |
106 | 106 | $renderer->setElementTemplate( |
107 | 107 | '<td><!-- BEGIN error --><span class="form_error">{error}</span><!-- END error --><br/>{element}</td>', |
108 | - 'comment[' . $i . ']' |
|
108 | + 'comment['.$i.']' |
|
109 | 109 | ); |
110 | 110 | |
111 | - $answer_number = $form->addElement('text', 'counter[' . $i . ']', null, 'value="' . $i . '"'); |
|
111 | + $answer_number = $form->addElement('text', 'counter['.$i.']', null, 'value="'.$i.'"'); |
|
112 | 112 | $answer_number->freeze(); |
113 | 113 | |
114 | 114 | $form->addElement('checkbox', |
115 | - 'correct[' . $i . ']', |
|
115 | + 'correct['.$i.']', |
|
116 | 116 | null, |
117 | 117 | null, |
118 | 118 | 'class="checkbox" style="margin-left: 0em;"' |
119 | 119 | ); |
120 | - $boxes_names[] = 'correct[' . $i . ']'; |
|
120 | + $boxes_names[] = 'correct['.$i.']'; |
|
121 | 121 | |
122 | 122 | $form->addElement( |
123 | 123 | 'html_editor', |
124 | - 'answer[' . $i . ']', |
|
124 | + 'answer['.$i.']', |
|
125 | 125 | null, |
126 | 126 | array(), |
127 | 127 | array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100') |
128 | 128 | ); |
129 | - $form->addRule('answer[' . $i . ']', get_lang('ThisFieldIsRequired'), 'required'); |
|
129 | + $form->addRule('answer['.$i.']', get_lang('ThisFieldIsRequired'), 'required'); |
|
130 | 130 | |
131 | 131 | $form->addElement( |
132 | 132 | 'html_editor', |
133 | - 'comment[' . $i . ']', |
|
133 | + 'comment['.$i.']', |
|
134 | 134 | null, |
135 | 135 | array(), |
136 | 136 | array('ToolbarSet' => 'TestProposedAnswer', 'Width' => '100%', 'Height' => '100') |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | function return_header($feedback_type = null, $counter = null, $score = null) |
227 | 227 | { |
228 | 228 | $header = parent::return_header($feedback_type, $counter, $score); |
229 | - $header .= '<table class="'.$this->question_table_class .'"> |
|
229 | + $header .= '<table class="'.$this->question_table_class.'"> |
|
230 | 230 | <tr> |
231 | 231 | <th>'.get_lang("Choice").'</th> |
232 | 232 | <th>'. get_lang("ExpectedChoice").'</th> |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | $data[$question_id]['type'] = $question_obj->get_question_type_name(); |
62 | 62 | $percentange = 0; |
63 | 63 | if ($count_students) { |
64 | - $percentange = $count_users / $count_students*100; |
|
64 | + $percentange = $count_users / $count_students * 100; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $data[$question_id]['students_who_try_exercise'] = Display::bar_progress( |
68 | 68 | $percentange, |
69 | 69 | false, |
70 | - $count_users .' / '.$count_students |
|
70 | + $count_users.' / '.$count_students |
|
71 | 71 | ); |
72 | 72 | $data[$question_id]['lowest_score'] = round($exercise_stats['min'], 2); |
73 | 73 | $data[$question_id]['average_score'] = round($exercise_stats['average'], 2); |
@@ -142,23 +142,23 @@ discard block |
||
142 | 142 | } else { |
143 | 143 | $data[$id]['name'] = '-'; |
144 | 144 | } |
145 | - $data[$id]['answer'] = $answer_item; |
|
145 | + $data[$id]['answer'] = $answer_item; |
|
146 | 146 | |
147 | 147 | $answer_item = api_substr($answer_item, 1); |
148 | - $answer_item = api_substr($answer_item, 0, api_strlen($answer_item) -1); |
|
148 | + $answer_item = api_substr($answer_item, 0, api_strlen($answer_item) - 1); |
|
149 | 149 | |
150 | - $data[$id]['answer'] = $answer_item; |
|
150 | + $data[$id]['answer'] = $answer_item; |
|
151 | 151 | |
152 | - $data[$id]['correct'] = '-'; |
|
152 | + $data[$id]['correct'] = '-'; |
|
153 | 153 | |
154 | 154 | $count = ExerciseLib::getNumberStudentsFillBlanksAnwserCount($question_id, $exercise_id); |
155 | 155 | $count = $count[$counter]; |
156 | 156 | |
157 | 157 | $percentange = 0; |
158 | 158 | if (!empty($count_students)) { |
159 | - $percentange = $count/$count_students*100; |
|
159 | + $percentange = $count / $count_students * 100; |
|
160 | 160 | } |
161 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
161 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
162 | 162 | $id++; |
163 | 163 | $counter++; |
164 | 164 | } |
@@ -194,9 +194,9 @@ discard block |
||
194 | 194 | ); |
195 | 195 | $percentange = 0; |
196 | 196 | if (!empty($count_students)) { |
197 | - $percentange = $count/$count_students*100; |
|
197 | + $percentange = $count / $count_students * 100; |
|
198 | 198 | } |
199 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
199 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
200 | 200 | } |
201 | 201 | break; |
202 | 202 | case HOT_SPOT: |
@@ -217,9 +217,9 @@ discard block |
||
217 | 217 | ); |
218 | 218 | $percentange = 0; |
219 | 219 | if (!empty($count_students)) { |
220 | - $percentange = $count/$count_students*100; |
|
220 | + $percentange = $count / $count_students * 100; |
|
221 | 221 | } |
222 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
222 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
223 | 223 | break; |
224 | 224 | default: |
225 | 225 | if ($answer_id == 1) { |
@@ -239,9 +239,9 @@ discard block |
||
239 | 239 | ); |
240 | 240 | $percentange = 0; |
241 | 241 | if (!empty($count_students)) { |
242 | - $percentange = $count/$count_students*100; |
|
242 | + $percentange = $count / $count_students * 100; |
|
243 | 243 | } |
244 | - $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count .' / '.$count_students); |
|
244 | + $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count.' / '.$count_students); |
|
245 | 245 | } |
246 | 246 | $id++; |
247 | 247 | } |
@@ -273,8 +273,8 @@ discard block |
||
273 | 273 | $interbreadcrumb[] = array("url" => "admin.php?exerciseId=$exercise_id&".api_get_cidreq(), "name" => $objExercise->name); |
274 | 274 | |
275 | 275 | $tpl = new Template(get_lang('ReportByQuestion')); |
276 | -$actions = '<a href="exercise_report.php?exerciseId='.intval($_GET['exerciseId']).'&'.api_get_cidreq().'">' . |
|
277 | - Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
276 | +$actions = '<a href="exercise_report.php?exerciseId='.intval($_GET['exerciseId']).'&'.api_get_cidreq().'">'. |
|
277 | + Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
278 | 278 | $actions = Display::div($actions, array('class'=> 'actions')); |
279 | 279 | $content = $actions.$content; |
280 | 280 | $tpl->assign('content', $content); |