@@ -181,13 +181,26 @@ public static function get_attendance_data(
181
181
) || api_is_drh ();
182
182
if (api_is_allowed_to_edit (null , true ) || $ isDrhOfCourse ) {
183
183
// Link to edit
184
- $ attendance [1 ] = '<a href="index.php? ' .api_get_cidreq ().'&action=attendance_sheet_list&attendance_id= ' .$ attendance [0 ].$ student_param .'"> ' .$ attendance [1 ].'</a> ' .$ session_star ;
184
+ $ attendance [1 ] = '<a
185
+ href="index.php? ' .api_get_cidreq ().'&action=attendance_sheet_list&attendance_id= ' .$ attendance [0 ].$ student_param .'"> ' .
186
+ Security::remove_XSS ($ attendance [1 ]).
187
+ '</a> ' .
188
+ $ session_star ;
185
189
} else {
186
190
// Link to view
187
- $ attendance [1 ] = '<a href="index.php? ' .api_get_cidreq ().'&action=attendance_sheet_list_no_edit&attendance_id= ' .$ attendance [0 ].$ student_param .'"> ' .$ attendance [1 ].'</a> ' .$ session_star ;
191
+ $ attendance [1 ] = '<a
192
+ href="index.php? ' .api_get_cidreq ().'&action=attendance_sheet_list_no_edit&attendance_id= ' .$ attendance [0 ].$ student_param .'"> ' .
193
+ Security::remove_XSS ($ attendance [1 ]).
194
+ '</a> ' .
195
+ $ session_star ;
188
196
}
189
197
} else {
190
- $ attendance [1 ] = '<a class="muted" href="index.php? ' .api_get_cidreq ().'&action=attendance_sheet_list&attendance_id= ' .$ attendance [0 ].$ student_param .'"> ' .$ attendance [1 ].'</a> ' .$ session_star ;
198
+ $ attendance [1 ] = '<a
199
+ class="muted"
200
+ href="index.php? ' .api_get_cidreq ().'&action=attendance_sheet_list&attendance_id= ' .$ attendance [0 ].$ student_param .'"> ' .
201
+ Security::remove_XSS ($ attendance [1 ]).
202
+ '</a> ' .
203
+ $ session_star ;
191
204
}
192
205
193
206
if ($ attendance [5 ] == 1 ) {
@@ -198,9 +211,7 @@ public static function get_attendance_data(
198
211
199
212
$ attendance [3 ] = '<center> ' .$ attendance [3 ].'</center> ' ;
200
213
if (api_is_allowed_to_edit (null , true )) {
201
- $ actions = '' ;
202
- $ actions .= '<center> ' ;
203
-
214
+ $ actions = '<center> ' ;
204
215
if (api_is_platform_admin ()) {
205
216
$ actions .= '<a href="index.php? ' .api_get_cidreq ().'&action=attendance_edit&attendance_id= ' .$ attendance [0 ].'"> ' .
206
217
Display::return_icon ('edit.png ' , get_lang ('Edit ' ), [], ICON_SIZE_SMALL ).'</a> ' ;
@@ -268,7 +279,7 @@ public static function get_attendance_data(
268
279
$ attendances [] = [
269
280
$ attendance [0 ],
270
281
$ attendance [1 ],
271
- $ attendance [2 ],
282
+ Security:: remove_XSS ( $ attendance [2 ]) ,
272
283
$ attendance [3 ],
273
284
$ actions ,
274
285
];
@@ -277,7 +288,7 @@ public static function get_attendance_data(
277
288
$ attendances [] = [
278
289
$ attendance [0 ],
279
290
$ attendance [1 ],
280
- $ attendance [2 ],
291
+ Security:: remove_XSS ( $ attendance [2 ]) ,
281
292
$ attendance [3 ],
282
293
];
283
294
}
@@ -2326,7 +2337,7 @@ public function getCoursesWithAttendance(
2326
2337
false
2327
2338
);
2328
2339
/* Get course with (in_category) and without (not_category) category */
2329
- foreach ($ courses as $ coursesKey => $ courseData ) {
2340
+ foreach ($ courses as $ courseData ) {
2330
2341
/*
2331
2342
* $coursesKey can be in_category or not_category for courses
2332
2343
* */
0 commit comments