|
@@ -20,37 +20,37 @@ discard block |
|
|
block discarded – undo |
20
|
20
|
if (api_is_allowed_to_edit(null, true)) { |
21
|
21
|
$header = '<div class="actions">'; |
22
|
22
|
if ($page != 'statistics') { |
23
|
|
- $header .= '<a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . $selectcat . '&'.api_get_cidreq().'">' . |
24
|
|
- Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
23
|
+ $header .= '<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.$selectcat.'&'.api_get_cidreq().'">'. |
|
24
|
+ Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
25
|
25
|
if ($evalobj->get_course_code() == null) { |
26
|
26
|
|
27
|
27
|
} elseif (!$evalobj->has_results()) { |
28
|
|
- $header .= '<a href="gradebook_add_result.php?'.api_get_cidreq().'&selectcat=' . $selectcat . '&selecteval=' . $evalobj->get_id() . '"> |
29
|
|
- ' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
28
|
+ $header .= '<a href="gradebook_add_result.php?'.api_get_cidreq().'&selectcat='.$selectcat.'&selecteval='.$evalobj->get_id().'"> |
|
29
|
+ ' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
30
|
30
|
} |
31
|
31
|
|
32
|
32
|
if (api_is_platform_admin() || $evalobj->is_locked() == false) { |
33
|
|
- $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&import=">' . |
34
|
|
- Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
33
|
+ $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&import=">'. |
|
34
|
+ Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
35
|
35
|
} |
36
|
36
|
|
37
|
37
|
if ($evalobj->has_results()) { |
38
|
|
- $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&export=">' . |
39
|
|
- Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
38
|
+ $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&export=">'. |
|
39
|
+ Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
40
|
40
|
|
41
|
41
|
if (api_is_platform_admin() || $evalobj->is_locked() == false) { |
42
|
|
- $header .= '<a href="gradebook_edit_result.php?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '">' . |
43
|
|
- Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
44
|
|
- $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();">' . |
45
|
|
- Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
42
|
+ $header .= '<a href="gradebook_edit_result.php?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'">'. |
|
43
|
+ Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
44
|
+ $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&deleteall=" onclick="return confirmationall();">'. |
|
45
|
+ Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
46
|
46
|
} |
47
|
47
|
} |
48
|
48
|
|
49
|
|
- $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&print=&selecteval=' . $evalobj->get_id() . '" target="_blank">' . |
50
|
|
- Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
49
|
+ $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&print=&selecteval='.$evalobj->get_id().'" target="_blank">'. |
|
50
|
+ Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
51
|
51
|
} else { |
52
|
|
- $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . |
53
|
|
- Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
52
|
+ $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '. |
|
53
|
+ Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
54
|
54
|
} |
55
|
55
|
$header .= '</div>'; |
56
|
56
|
} |
|
@@ -69,17 +69,17 @@ discard block |
|
|
block discarded – undo |
69
|
69
|
$score = $evalobj->calc_score(); |
70
|
70
|
|
71
|
71
|
if ($score != null) { |
72
|
|
- $average = get_lang('Average') . ' :<b> ' . $scoredisplay->display_score($score, SCORE_AVERAGE) . '</b>'; |
|
72
|
+ $average = get_lang('Average').' :<b> '.$scoredisplay->display_score($score, SCORE_AVERAGE).'</b>'; |
73
|
73
|
$student_score = $evalobj->calc_score(api_get_user_id()); |
74
|
74
|
$student_score = Display::tag( |
75
|
75
|
'h3', |
76
|
|
- get_lang('Score') . ': ' . $scoredisplay->display_score($student_score, SCORE_DIV_PERCENT) |
|
76
|
+ get_lang('Score').': '.$scoredisplay->display_score($student_score, SCORE_DIV_PERCENT) |
77
|
77
|
); |
78
|
78
|
} |
79
|
79
|
} |
80
|
80
|
$description = ""; |
81
|
81
|
if (!$evalobj->get_description() == '') { |
82
|
|
- $description = get_lang('Description') . ' :<b> ' . $evalobj->get_description() . '</b><br>'; |
|
82
|
+ $description = get_lang('Description').' :<b> '.$evalobj->get_description().'</b><br>'; |
83
|
83
|
} |
84
|
84
|
|
85
|
85
|
if ($evalobj->get_course_code() == null) { |
|
@@ -89,17 +89,17 @@ discard block |
|
|
block discarded – undo |
89
|
89
|
} |
90
|
90
|
|
91
|
91
|
$evalinfo = '<table width="100%" border="0"><tr><td>'; |
92
|
|
- $evalinfo .= '<h2>' . $evalobj->get_name() . '</h2><hr>'; |
|
92
|
+ $evalinfo .= '<h2>'.$evalobj->get_name().'</h2><hr>'; |
93
|
93
|
$evalinfo .= $description; |
94
|
|
- $evalinfo .= get_lang('Course') . ' :<b> ' . $course . '</b><br />'; |
95
|
|
- $evalinfo .= get_lang('QualificationNumeric') . ' :<b> ' . $evalobj->get_max() . '</b><br>' . $average; |
|
94
|
+ $evalinfo .= get_lang('Course').' :<b> '.$course.'</b><br />'; |
|
95
|
+ $evalinfo .= get_lang('QualificationNumeric').' :<b> '.$evalobj->get_max().'</b><br>'.$average; |
96
|
96
|
|
97
|
97
|
if (!api_is_allowed_to_edit()) { |
98
|
98
|
$evalinfo .= $student_score; |
99
|
99
|
} |
100
|
100
|
|
101
|
101
|
if (!$evalobj->has_results()) { |
102
|
|
- $evalinfo .= '<br /><i>' . get_lang('NoResultsInEvaluation') . '</i>'; |
|
102
|
+ $evalinfo .= '<br /><i>'.get_lang('NoResultsInEvaluation').'</i>'; |
103
|
103
|
} elseif ($scoredisplay->is_custom() && api_get_self() != '/main/gradebook/gradebook_statistics.php') { |
104
|
104
|
if (api_is_allowed_to_edit(null, true)) { |
105
|
105
|
if ($page != 'statistics') { |
|
@@ -109,8 +109,8 @@ discard block |
|
|
block discarded – undo |
109
|
109
|
} |
110
|
110
|
if ($page != 'statistics') { |
111
|
111
|
if (api_is_allowed_to_edit(null, true)) { |
112
|
|
- $evalinfo .= '<br /><a href="gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . |
113
|
|
- Display::return_icon('statistics.png', get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
112
|
+ $evalinfo .= '<br /><a href="gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '. |
|
113
|
+ Display::return_icon('statistics.png', get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM).'</a>'; |
114
|
114
|
} |
115
|
115
|
} |
116
|
116
|
$evalinfo .= '</td><td>'.Display::return_icon('tutorial.gif', '', ['style' => 'float:right; position:relative;']).'</td></table>'; |
|
@@ -127,8 +127,8 @@ discard block |
|
|
block discarded – undo |
127
|
127
|
public function display_header_flatview($catobj, $showeval, $showlink, $simple_search_form) |
128
|
128
|
{ |
129
|
129
|
$header = '<table border="0" cellpadding="5">'; |
130
|
|
- $header .= '<td style="vertical-align: top;"><a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . Security::remove_XSS($_GET['selectcat']) . '">' . Display::return_icon('gradebook.gif') . get_lang('Gradebook') . '</a></td>'; |
131
|
|
- $header .= '<td style="vertical-align: top;">' . get_lang('FilterCategory') . '</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
|
130
|
+ $header .= '<td style="vertical-align: top;"><a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.Security::remove_XSS($_GET['selectcat']).'">'.Display::return_icon('gradebook.gif').get_lang('Gradebook').'</a></td>'; |
|
131
|
+ $header .= '<td style="vertical-align: top;">'.get_lang('FilterCategory').'</td><td style="vertical-align: top;"><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
132
|
132
|
$cats = Category :: load(); |
133
|
133
|
$tree = $cats[0]->get_tree(); |
134
|
134
|
unset($cats); |
|
@@ -137,35 +137,35 @@ discard block |
|
|
block discarded – undo |
137
|
137
|
$line .= '—'; |
138
|
138
|
} |
139
|
139
|
if ($_GET['selectcat'] == $cat[0]) { |
140
|
|
- $header .= '<option selected="selected" value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
140
|
+ $header .= '<option selected="selected" value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
141
|
141
|
} else { |
142
|
|
- $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
142
|
+ $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
143
|
143
|
} |
144
|
144
|
$line = ''; |
145
|
145
|
} |
146
|
146
|
$header .= '</td></select></form>'; |
147
|
147
|
if (!$catobj->get_id() == '0') { |
148
|
|
- $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">'; |
|
148
|
+ $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'; |
149
|
149
|
$header .= Display::return_icon('gradebook.gif', get_lang('Up')); |
150
|
150
|
$header .= '</a></td>'; |
151
|
151
|
} |
152
|
|
- $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
152
|
+ $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
153
|
153
|
$header .= '<td style="vertical-align: top;"> |
154
|
|
- <a href="' . api_get_self() . '?exportpdf=&offset=' . Security::remove_XSS($_GET['offset']) . '&search=' . Security::remove_XSS($_GET['search']) . '&selectcat=' . $catobj->get_id() . '"> |
|
154
|
+ <a href="' . api_get_self().'?exportpdf=&offset='.Security::remove_XSS($_GET['offset']).'&search='.Security::remove_XSS($_GET['search']).'&selectcat='.$catobj->get_id().'"> |
155
|
155
|
'.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
156
|
|
- ' . get_lang('ExportPDF') . '</a>'; |
|
156
|
+ ' . get_lang('ExportPDF').'</a>'; |
157
|
157
|
$header .= '<td style="vertical-align: top;"> |
158
|
|
- <a href="' . api_get_self() . '?print=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
158
|
+ <a href="' . api_get_self().'?print=&selectcat='.$catobj->get_id().'" target="_blank"> |
159
|
159
|
'.Display::return_icon('printer.png', get_lang('Print'), [], ICON_SIZE_MEDIUM).' |
160
|
|
- ' . get_lang('Print') . '</a>'; |
|
160
|
+ ' . get_lang('Print').'</a>'; |
161
|
161
|
$header .= '</td></tr></table>'; |
162
|
162
|
if (!$catobj->get_id() == '0') { |
163
|
|
- $header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="' . api_get_self() . '?selectcat=' . $catobj->get_id() . '"> |
164
|
|
- <input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '') . '>Show Evaluations '; |
165
|
|
- $header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" ' . (($showlink == '1') ? 'checked' : '') . '>' . get_lang('ShowLinks') . '</form></td></tr></table>'; |
|
163
|
+ $header .= '<table border="0" cellpadding="5"><tr><td><form name="itemfilter" method="post" action="'.api_get_self().'?selectcat='.$catobj->get_id().'"> |
|
164
|
+ <input type="checkbox" name="showeval" onclick="document.itemfilter.submit()" ' . (($showeval == '1') ? 'checked' : '').'>Show Evaluations '; |
|
165
|
+ $header .= '<input type="checkbox" name="showlink" onclick="document.itemfilter.submit()" '.(($showlink == '1') ? 'checked' : '').'>'.get_lang('ShowLinks').'</form></td></tr></table>'; |
166
|
166
|
} |
167
|
167
|
if (isset($_GET['search'])) { |
168
|
|
- $header .= '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
168
|
+ $header .= '<b>'.get_lang('SearchResults').' :</b>'; |
169
|
169
|
} |
170
|
170
|
echo $header; |
171
|
171
|
} |
|
@@ -186,14 +186,14 @@ discard block |
|
|
block discarded – undo |
186
|
186
|
$select_cat = $catobj->get_parent_id(); |
187
|
187
|
$url = 'gradebook_flatview.php'; |
188
|
188
|
} |
189
|
|
- $header .= '<a href="' . $url . '?' . api_get_cidreq() . '&selectcat=' . $select_cat . '">' . |
190
|
|
- Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
189
|
+ $header .= '<a href="'.$url.'?'.api_get_cidreq().'&selectcat='.$select_cat.'">'. |
|
190
|
+ Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
191
|
191
|
|
192
|
192
|
$pageNum = isset($_GET['flatviewlist_page_nr']) ? intval($_GET['flatviewlist_page_nr']) : null; |
193
|
193
|
$perPage = isset($_GET['flatviewlist_per_page']) ? intval($_GET['flatviewlist_per_page']) : null; |
194
|
194
|
$offset = isset($_GET['offset']) ? $_GET['offset'] : '0'; |
195
|
195
|
|
196
|
|
- $exportCsvUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
196
|
+ $exportCsvUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
197
|
197
|
'export_format' => 'csv', |
198
|
198
|
'export_report' => 'export_report', |
199
|
199
|
'selectcat' => $catobj->get_id() |
|
@@ -204,7 +204,7 @@ discard block |
|
|
block discarded – undo |
204
|
204
|
$exportCsvUrl |
205
|
205
|
); |
206
|
206
|
|
207
|
|
- $exportXlsUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
207
|
+ $exportXlsUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
208
|
208
|
'export_format' => 'xls', |
209
|
209
|
'export_report' => 'export_report', |
210
|
210
|
'selectcat' => $catobj->get_id() |
|
@@ -215,7 +215,7 @@ discard block |
|
|
block discarded – undo |
215
|
215
|
$exportXlsUrl |
216
|
216
|
); |
217
|
217
|
|
218
|
|
- $exportDocUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
218
|
+ $exportDocUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
219
|
219
|
'export_format' => 'doc', |
220
|
220
|
'export_report' => 'export_report', |
221
|
221
|
'selectcat' => $catobj->get_id() |
|
@@ -226,7 +226,7 @@ discard block |
|
|
block discarded – undo |
226
|
226
|
$exportDocUrl |
227
|
227
|
); |
228
|
228
|
|
229
|
|
- $exportPrintUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
229
|
+ $exportPrintUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
230
|
230
|
'print' => '', |
231
|
231
|
'selectcat' => $catobj->get_id(), |
232
|
232
|
]); |
|
@@ -237,7 +237,7 @@ discard block |
|
|
block discarded – undo |
237
|
237
|
['target' => '_blank'] |
238
|
238
|
); |
239
|
239
|
|
240
|
|
- $exportPdfUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
240
|
+ $exportPdfUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
241
|
241
|
'exportpdf' => '', |
242
|
242
|
'selectcat' => $catobj->get_id(), |
243
|
243
|
'offset' => $offset, |
|
@@ -290,8 +290,8 @@ discard block |
|
|
block discarded – undo |
290
|
290
|
$item = $evals_links[$count]; |
291
|
291
|
$score = $item->calc_score($user_id); |
292
|
292
|
$my_score_denom = ($score[1] == 0) ? 1 : $score[1]; |
293
|
|
- $item_value+=$score[0] / $my_score_denom * $item->get_weight(); |
294
|
|
- $item_total+=$item->get_weight(); |
|
293
|
+ $item_value += $score[0] / $my_score_denom * $item->get_weight(); |
|
294
|
+ $item_total += $item->get_weight(); |
295
|
295
|
} |
296
|
296
|
$item_value = number_format($item_value, 2, '.', ' '); |
297
|
297
|
$total_score = array($item_value, $item_total); |
|
@@ -300,9 +300,9 @@ discard block |
|
|
block discarded – undo |
300
|
300
|
$cattotal = Category :: load(0); |
301
|
301
|
$scoretotal = $cattotal[0]->calc_score(api_get_user_id()); |
302
|
302
|
$scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable')); |
303
|
|
- $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . api_get_person_name($user['firstname'], $user['lastname']) . '</b><br />'; |
|
303
|
+ $scoreinfo = get_lang('StatsStudent').' :<b> '.api_get_person_name($user['firstname'], $user['lastname']).'</b><br />'; |
304
|
304
|
if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search']))) { |
305
|
|
- $scoreinfo.= '<h2>' . get_lang('Total') . ' : ' . $scorecourse_display . '</h2>'; |
|
305
|
+ $scoreinfo .= '<h2>'.get_lang('Total').' : '.$scorecourse_display.'</h2>'; |
306
|
306
|
} |
307
|
307
|
Display :: display_normal_message($scoreinfo, false); |
308
|
308
|
} |
|
@@ -312,9 +312,9 @@ discard block |
|
|
block discarded – undo |
312
|
312
|
if (($showtree == '1') || (isset($_GET['studentoverview']))) { |
313
|
313
|
$header .= '<tr>'; |
314
|
314
|
if (!$selectcat == '0') { |
315
|
|
- $header .= '<td style=" "><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' . Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>'; |
|
315
|
+ $header .= '<td style=" "><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'.Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>'; |
316
|
316
|
} |
317
|
|
- $header .= '<td style=" ">' . get_lang('CurrentCategory') . '</td>' . |
|
317
|
+ $header .= '<td style=" ">'.get_lang('CurrentCategory').'</td>'. |
318
|
318
|
'<td style=" "><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
319
|
319
|
$cats = Category :: load(); |
320
|
320
|
|
|
@@ -327,15 +327,15 @@ discard block |
|
|
block discarded – undo |
327
|
327
|
} |
328
|
328
|
$line = isset($line) ? $line : ''; |
329
|
329
|
if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) { |
330
|
|
- $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
330
|
+ $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
331
|
331
|
} else { |
332
|
|
- $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
332
|
+ $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
333
|
333
|
} |
334
|
334
|
$line = ''; |
335
|
335
|
} |
336
|
336
|
$header .= '</select></form></td>'; |
337
|
337
|
if (!empty($simple_search_form) && $message_resource === false) { |
338
|
|
- $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
338
|
+ $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
339
|
339
|
} else { |
340
|
340
|
$header .= '<td></td>'; |
341
|
341
|
} |
|
@@ -345,13 +345,13 @@ discard block |
|
|
block discarded – undo |
345
|
345
|
} elseif (!(isset($_GET['studentoverview']))) { |
346
|
346
|
|
347
|
347
|
} else { |
348
|
|
- $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
348
|
+ $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank"> |
349
|
349
|
'.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
350
|
|
- ' . get_lang('ExportPDF') . '</a>'; |
|
350
|
+ ' . get_lang('ExportPDF').'</a>'; |
351
|
351
|
} |
352
|
352
|
$header .= '</td></tr>'; |
353
|
353
|
} |
354
|
|
- $header.='</table></div>'; |
|
354
|
+ $header .= '</table></div>'; |
355
|
355
|
|
356
|
356
|
// for course admin & platform admin add item buttons are added to the header |
357
|
357
|
$header .= '<div class="actions">'; |
|
@@ -371,7 +371,7 @@ discard block |
|
|
block discarded – undo |
371
|
371
|
$my_category = $catobj->shows_all_information_an_category($catobj->get_id()); |
372
|
372
|
$my_api_cidreq = api_get_cidreq(); |
373
|
373
|
if ($my_api_cidreq == '') { |
374
|
|
- $my_api_cidreq = 'cidReq=' . $my_category['course_code']; |
|
374
|
+ $my_api_cidreq = 'cidReq='.$my_category['course_code']; |
375
|
375
|
} |
376
|
376
|
|
377
|
377
|
if (!$message_resource) { |
|
@@ -380,24 +380,24 @@ discard block |
|
|
block discarded – undo |
380
|
380
|
$my_course_id = api_get_course_id(); |
381
|
381
|
$my_file = substr($_SESSION['gradebook_dest'], 0, 5); |
382
|
382
|
|
383
|
|
- $header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
384
|
|
- Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
385
|
|
- $header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?' . $my_api_cidreq . '&cat_id=' . (int) $_GET['selectcat'] . '">' . |
386
|
|
- Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
383
|
+ $header .= '<td style="vertical-align: top;"><a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
384
|
+ Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
385
|
+ $header .= '<td style="vertical-align: top;"><a href="gradebook_display_certificate.php?'.$my_api_cidreq.'&cat_id='.(int) $_GET['selectcat'].'">'. |
|
386
|
+ Display::return_icon('certificate_list.png', get_lang('GradebookSeeListOfStudentsCertificates'), '', ICON_SIZE_MEDIUM).'</a>'; |
387
|
387
|
|
388
|
388
|
$visibility_icon = ($catobj->is_visible() == 0) ? 'invisible' : 'visible'; |
389
|
389
|
$visibility_command = ($catobj->is_visible() == 0) ? 'set_visible' : 'set_invisible'; |
390
|
390
|
|
391
|
391
|
//Right icons |
392
|
|
- $modify_icons = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
392
|
+ $modify_icons = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>'; |
393
|
393
|
if ($catobj->get_name() != api_get_course_id()) { |
394
|
|
- $modify_icons .= ' <a href="' . api_get_self() . '?deletecat=' . $catobj->get_id() . '&selectcat=0&cidReq=' . $catobj->get_course_code() . '" onclick="return confirmation();">' . Display::return_icon('delete.png', get_lang('DeleteAll'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
394
|
+ $modify_icons .= ' <a href="'.api_get_self().'?deletecat='.$catobj->get_id().'&selectcat=0&cidReq='.$catobj->get_course_code().'" onclick="return confirmation();">'.Display::return_icon('delete.png', get_lang('DeleteAll'), '', ICON_SIZE_MEDIUM).'</a>'; |
395
|
395
|
} |
396
|
396
|
$header .= Display::div($modify_icons, array('class' => 'right')); |
397
|
397
|
} |
398
|
398
|
} |
399
|
399
|
} elseif (isset($_GET['search'])) { |
400
|
|
- $header .= '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
400
|
+ $header .= '<b>'.get_lang('SearchResults').' :</b>'; |
401
|
401
|
} |
402
|
402
|
$header .= '</div>'; |
403
|
403
|
echo $header; |
|
@@ -509,7 +509,7 @@ discard block |
|
|
block discarded – undo |
509
|
509
|
$aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : ''; |
510
|
510
|
$aditionalButtons .= '</div>'; |
511
|
511
|
} |
512
|
|
- $scoreinfo .= '<strong>' . sprintf(get_lang('TotalX'), $scorecourse_display . $aditionalButtons). '</strong>'; |
|
512
|
+ $scoreinfo .= '<strong>'.sprintf(get_lang('TotalX'), $scorecourse_display.$aditionalButtons).'</strong>'; |
513
|
513
|
|
514
|
514
|
} |
515
|
515
|
Display :: display_normal_message($scoreinfo, false); |
|
@@ -520,10 +520,10 @@ discard block |
|
|
block discarded – undo |
520
|
520
|
$header = '<div class="actions"><table>'; |
521
|
521
|
$header .= '<tr>'; |
522
|
522
|
if (!$selectcat == '0') { |
523
|
|
- $header .= '<td><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' . |
524
|
|
- Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>'; |
|
523
|
+ $header .= '<td><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'. |
|
524
|
+ Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>'; |
525
|
525
|
} |
526
|
|
- $header .= '<td>' . get_lang('CurrentCategory') . '</td>' . |
|
526
|
+ $header .= '<td>'.get_lang('CurrentCategory').'</td>'. |
527
|
527
|
'<td><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
528
|
528
|
$cats = Category :: load(); |
529
|
529
|
|
|
@@ -536,15 +536,15 @@ discard block |
|
|
block discarded – undo |
536
|
536
|
} |
537
|
537
|
$line = isset($line) ? $line : ''; |
538
|
538
|
if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) { |
539
|
|
- $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
539
|
+ $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
540
|
540
|
} else { |
541
|
|
- $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
541
|
+ $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
542
|
542
|
} |
543
|
543
|
$line = ''; |
544
|
544
|
} |
545
|
545
|
$header .= '</select></form></td>'; |
546
|
546
|
if (!empty($simple_search_form) && $message_resource === false) { |
547
|
|
- $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
547
|
+ $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
548
|
548
|
} else { |
549
|
549
|
$header .= '<td></td>'; |
550
|
550
|
} |
|
@@ -555,9 +555,9 @@ discard block |
|
|
block discarded – undo |
555
|
555
|
} elseif (!(isset($_GET['studentoverview']))) { |
556
|
556
|
|
557
|
557
|
} else { |
558
|
|
- $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
558
|
+ $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank"> |
559
|
559
|
'.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
560
|
|
- ' . get_lang('ExportPDF') . '</a>'; |
|
560
|
+ ' . get_lang('ExportPDF').'</a>'; |
561
|
561
|
} |
562
|
562
|
$header .= '</td></tr>'; |
563
|
563
|
$header .= '</table></div>'; |
|
@@ -572,33 +572,33 @@ discard block |
|
|
block discarded – undo |
572
|
572
|
|
573
|
573
|
if (api_is_allowed_to_edit(null, true)) { |
574
|
574
|
if (empty($grade_model_id) || $grade_model_id == -1) { |
575
|
|
- $actionsLeft .= '<a href="gradebook_add_cat.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . |
576
|
|
- Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM) . '</a></td>'; |
|
575
|
+ $actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'. |
|
576
|
+ Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM).'</a></td>'; |
577
|
577
|
} |
578
|
578
|
if ($selectcat == '0') { |
579
|
579
|
|
580
|
580
|
} else { |
581
|
581
|
$my_category = $catobj->shows_all_information_an_category($catobj->get_id()); |
582
|
582
|
if ($my_api_cidreq == '') { |
583
|
|
- $my_api_cidreq = 'cidReq=' . $my_category['course_code']; |
|
583
|
+ $my_api_cidreq = 'cidReq='.$my_category['course_code']; |
584
|
584
|
} |
585
|
585
|
if ($show_add_link && !$message_resource) { |
586
|
|
- $actionsLeft .= '<a href="gradebook_add_eval.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '" >' . |
587
|
|
- Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
586
|
+ $actionsLeft .= '<a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'" >'. |
|
587
|
+ Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM).'</a>'; |
588
|
588
|
$cats = Category :: load($selectcat); |
589
|
589
|
|
590
|
590
|
if ($cats[0]->get_course_code() != null && !$message_resource) { |
591
|
|
- $actionsLeft .= '<a href="gradebook_add_link.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
592
|
|
- Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
591
|
+ $actionsLeft .= '<a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
592
|
+ Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>'; |
593
|
593
|
} else { |
594
|
|
- $actionsLeft .= '<a href="gradebook_add_link_select_course.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
595
|
|
- Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
594
|
+ $actionsLeft .= '<a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
595
|
+ Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>'; |
596
|
596
|
} |
597
|
597
|
} |
598
|
598
|
|
599
|
599
|
if (!$message_resource) { |
600
|
|
- $actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
601
|
|
- Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
600
|
+ $actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
601
|
+ Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
602
|
602
|
|
603
|
603
|
if ($my_category['generate_certificates'] == 1) { |
604
|
604
|
$actionsLeft .= Display::url( |
|
@@ -608,7 +608,7 @@ discard block |
|
|
block discarded – undo |
608
|
608
|
'', |
609
|
609
|
ICON_SIZE_MEDIUM |
610
|
610
|
), |
611
|
|
- "gradebook_display_certificate.php?$my_api_cidreq&cat_id=" . intval($_GET['selectcat']) |
|
611
|
+ "gradebook_display_certificate.php?$my_api_cidreq&cat_id=".intval($_GET['selectcat']) |
612
|
612
|
); |
613
|
613
|
} |
614
|
614
|
|
|
@@ -619,30 +619,30 @@ discard block |
|
|
block discarded – undo |
619
|
619
|
'', |
620
|
620
|
ICON_SIZE_MEDIUM |
621
|
621
|
), |
622
|
|
- "gradebook_display_summary.php?$my_api_cidreq&selectcat=" . intval($_GET['selectcat']) |
|
622
|
+ "gradebook_display_summary.php?$my_api_cidreq&selectcat=".intval($_GET['selectcat']) |
623
|
623
|
); |
624
|
624
|
|
625
|
625
|
|
626
|
626
|
// Right icons |
627
|
|
- $actionsRight = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . |
628
|
|
- Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
629
|
|
- $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&' . $my_api_cidreq . '&origin=gradebook&selectcat=' . $catobj->get_id() . '">' . |
630
|
|
- Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
627
|
+ $actionsRight = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'. |
|
628
|
+ Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
629
|
+ $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat='.$catobj->get_id().'">'. |
|
630
|
+ Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM).'</a>'; |
631
|
631
|
|
632
|
632
|
if (empty($categories)) { |
633
|
|
- $actionsRight .= '<a href="gradebook_edit_all.php?id_session=' . api_get_session_id() . '&' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
634
|
|
- Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
633
|
+ $actionsRight .= '<a href="gradebook_edit_all.php?id_session='.api_get_session_id().'&'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
634
|
+ Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM).'</a>'; |
635
|
635
|
} |
636
|
636
|
$score_display_custom = api_get_setting('gradebook_score_display_custom'); |
637
|
637
|
if (api_get_setting('teachers_can_change_score_settings') == 'true' && $score_display_custom['my_display_custom'] == 'true') { |
638
|
|
- $actionsRight .= '<a href="gradebook_scoring_system.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
639
|
|
- Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
638
|
+ $actionsRight .= '<a href="gradebook_scoring_system.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
639
|
+ Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>'; |
640
|
640
|
} |
641
|
641
|
|
642
|
642
|
} |
643
|
643
|
} |
644
|
644
|
} elseif (isset($_GET['search'])) { |
645
|
|
- echo $header = '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
645
|
+ echo $header = '<b>'.get_lang('SearchResults').' :</b>'; |
646
|
646
|
} |
647
|
647
|
|
648
|
648
|
$isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh( |
|
@@ -651,26 +651,26 @@ discard block |
|
|
block discarded – undo |
651
|
651
|
); |
652
|
652
|
|
653
|
653
|
if ($isDrhOfCourse) { |
654
|
|
- $$actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
655
|
|
- Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
654
|
+ $$actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
655
|
+ Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
656
|
656
|
} |
657
|
657
|
|
658
|
|
- if (api_is_allowed_to_edit(null, true)){ |
659
|
|
- echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight )); |
|
658
|
+ if (api_is_allowed_to_edit(null, true)) { |
|
659
|
+ echo $toolbar = Display::toolbarAction('gradebook-actions', array(0 => $actionsLeft, 1 => $actionsRight)); |
660
|
660
|
} |
661
|
661
|
|
662
|
662
|
if (api_is_allowed_to_edit(null, true)) { |
663
|
663
|
$weight = intval($catobj->get_weight()) > 0 ? $catobj->get_weight() : 0; |
664
|
|
- $weight = '<strong>' . get_lang('TotalWeight') . ' : </strong>' . $weight; |
|
664
|
+ $weight = '<strong>'.get_lang('TotalWeight').' : </strong>'.$weight; |
665
|
665
|
|
666
|
666
|
$min_certification = (intval($catobj->get_certificate_min_score() > 0) ? $catobj->get_certificate_min_score() : 0); |
667
|
|
- $min_certification = get_lang('CertificateMinScore') . ' : ' . $min_certification; |
668
|
|
- $edit_icon = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . |
669
|
|
- Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
667
|
+ $min_certification = get_lang('CertificateMinScore').' : '.$min_certification; |
|
668
|
+ $edit_icon = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'. |
|
669
|
+ Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>'; |
670
|
670
|
//$msg = Display::tag('h3', $weight.' - '.$min_certification); |
671
|
|
- $msg = $weight . ' - ' . $min_certification . $edit_icon; |
|
671
|
+ $msg = $weight.' - '.$min_certification.$edit_icon; |
672
|
672
|
//@todo show description |
673
|
|
- $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>' . get_lang('GradebookDescriptionLog') . '</strong>' . ': ' . $catobj->get_description()); |
|
673
|
+ $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>'.get_lang('GradebookDescriptionLog').'</strong>'.': '.$catobj->get_description()); |
674
|
674
|
Display::display_normal_message($msg, false); |
675
|
675
|
if (!empty($description)) { |
676
|
676
|
echo Display::div($description, array()); |
|
@@ -698,24 +698,24 @@ discard block |
|
|
block discarded – undo |
698
|
698
|
$cattotal = Category :: load(0); |
699
|
699
|
$scoretotal = $cattotal[0]->calc_score(api_get_user_id()); |
700
|
700
|
$scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable')); |
701
|
|
- $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . $user['complete_name']. '</b><br />'; |
|
701
|
+ $scoreinfo = get_lang('StatsStudent').' :<b> '.$user['complete_name'].'</b><br />'; |
702
|
702
|
if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search']))) |
703
|
|
- $scoreinfo.= '<br />' . get_lang('TotalForThisCategory') . ' : <b>' . $scorecourse_display . '</b>'; |
704
|
|
- $scoreinfo.= '<br />' . get_lang('Total') . ' : <b>' . $scoretotal_display . '</b>'; |
|
703
|
+ $scoreinfo .= '<br />'.get_lang('TotalForThisCategory').' : <b>'.$scorecourse_display.'</b>'; |
|
704
|
+ $scoreinfo .= '<br />'.get_lang('Total').' : <b>'.$scoretotal_display.'</b>'; |
705
|
705
|
Display :: display_normal_message($scoreinfo, false); |
706
|
706
|
} |
707
|
707
|
// show navigation tree and buttons? |
708
|
708
|
$header = '<div class="actions">'; |
709
|
709
|
|
710
|
710
|
if ($is_course_admin) { |
711
|
|
- $header .= '<a href="gradebook_flatview.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
712
|
|
- $header .= '<a href="gradebook_scoring_system.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
711
|
+ $header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
712
|
+ $header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>'; |
713
|
713
|
} elseif (!(isset($_GET['studentoverview']))) { |
714
|
|
- $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('view_list.gif', get_lang('FlatView')) . ' ' . get_lang('FlatView') . '</a>'; |
|
714
|
+ $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat='.$catobj->get_id().'">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' '.get_lang('FlatView').'</a>'; |
715
|
715
|
} else { |
716
|
|
- $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">' . Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
716
|
+ $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank">'.Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
717
|
717
|
} |
718
|
|
- $header.='</div>'; |
|
718
|
+ $header .= '</div>'; |
719
|
719
|
echo $header; |
720
|
720
|
} |
721
|
721
|
|
|
@@ -742,8 +742,8 @@ discard block |
|
|
block discarded – undo |
742
|
742
|
$item = $evals_links[$count]; |
743
|
743
|
$score = $item->calc_score($user_id); |
744
|
744
|
$my_score_denom = ($score[1] == 0) ? 1 : $score[1]; |
745
|
|
- $item_value+=$score[0] / $my_score_denom * $item->get_weight(); |
746
|
|
- $item_total+=$item->get_weight(); |
|
745
|
+ $item_value += $score[0] / $my_score_denom * $item->get_weight(); |
|
746
|
+ $item_total += $item->get_weight(); |
747
|
747
|
//$row[] = $scoredisplay->display_score($score,SCORE_DIV_PERCENT); |
748
|
748
|
} |
749
|
749
|
$item_value = number_format($item_value, 2, '.', ' '); |
|
@@ -758,17 +758,17 @@ discard block |
|
|
block discarded – undo |
758
|
758
|
$imageUrl = UserManager::getUserPicture($userid); |
759
|
759
|
|
760
|
760
|
$info = '<div class="row"><div class="col-md-3">'; |
761
|
|
- $info .= '<div class="thumbnail"><img src="' . $imageUrl . '" /></div>'; |
|
761
|
+ $info .= '<div class="thumbnail"><img src="'.$imageUrl.'" /></div>'; |
762
|
762
|
$info .= '</div>'; |
763
|
763
|
$info .= '<div class="col-md-6">'; |
764
|
|
- $info .= get_lang('Name') . ' : <a target="_blank" href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php?u=' . $userid . '"> ' . |
765
|
|
- $user['complete_name'] . '</a><br />'; |
|
764
|
+ $info .= get_lang('Name').' : <a target="_blank" href="'.api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$userid.'"> '. |
|
765
|
+ $user['complete_name'].'</a><br />'; |
766
|
766
|
|
767
|
767
|
if (api_get_setting('show_email_addresses') == 'true') { |
768
|
|
- $info .= get_lang('Email') . ' : <a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a><br />'; |
|
768
|
+ $info .= get_lang('Email').' : <a href="mailto:'.$user['email'].'">'.$user['email'].'</a><br />'; |
769
|
769
|
} |
770
|
770
|
|
771
|
|
- $info .= get_lang('TotalUser') . ' : <b>' . $scorecourse_display . '</b>'; |
|
771
|
+ $info .= get_lang('TotalUser').' : <b>'.$scorecourse_display.'</b>'; |
772
|
772
|
$info .= '</div>'; |
773
|
773
|
$info .= '</div>'; |
774
|
774
|
|