16
16
$ questionTypeId = isset ($ _REQUEST ['questionTypeId ' ]) ? (int ) $ _REQUEST ['questionTypeId ' ] : 0 ;
17
17
$ exportXls = isset ($ _REQUEST ['export_xls ' ]) && !empty ($ _REQUEST ['export_xls ' ]) ? (int ) $ _REQUEST ['export_xls ' ] : 0 ;
18
18
$ action = $ _REQUEST ['a ' ] ?? null ;
19
+ $ startDate = isset ($ _REQUEST ['start_date ' ]) ? $ _REQUEST ['start_date ' ] : '' ;
20
+ $ endDate = isset ($ _REQUEST ['end_date ' ]) ? $ _REQUEST ['end_date ' ] : '' ;
19
21
20
22
api_block_anonymous_users ();
21
23
@@ -170,6 +172,14 @@ function updateExerciseList(courseId) {
170
172
}
171
173
</script> ' ;
172
174
175
+ $ htmlHeadXtra [] = '<script>
176
+ $(function() {
177
+ $(".datepicker").datepicker({
178
+ dateFormat: "yy-mm-dd"
179
+ });
180
+ });
181
+ </script> ' ;
182
+
173
183
if ($ exportXls ) {
174
184
ExerciseLib::exportPendingAttemptsToExcel ($ _REQUEST );
175
185
}
@@ -293,16 +303,27 @@ function updateExerciseList(courseId) {
293
303
4 => get_lang ('Unclosed ' ),
294
304
5 => get_lang ('Ongoing ' ),
295
305
];
296
-
297
306
$ form ->addSelect ('status ' , get_lang ('Status ' ), $ status );
298
307
299
308
$ questionType = [
300
309
0 => get_lang ('All ' ),
301
310
1 => get_lang ('QuestionsWithNoAutomaticCorrection ' ),
302
311
];
303
-
304
312
$ form ->addSelect ('questionTypeId ' , get_lang ('QuestionType ' ), $ questionType );
305
313
314
+ $ form ->addElement (
315
+ 'text ' ,
316
+ 'start_date ' ,
317
+ get_lang ('StartDate ' ),
318
+ ['id ' => 'start_date ' , 'class ' => 'datepicker ' , 'autocomplete ' => 'off ' , 'style ' => 'width:120px ' ]
319
+ );
320
+ $ form ->addElement (
321
+ 'text ' ,
322
+ 'end_date ' ,
323
+ get_lang ('EndDate ' ),
324
+ ['id ' => 'end_date ' , 'class ' => 'datepicker ' , 'autocomplete ' => 'off ' , 'style ' => 'width:120px ' ]
325
+ );
326
+
306
327
$ form ->addButtonSearch (get_lang ('Search ' ), 'pendingSubmit ' );
307
328
$ content = $ form ->returnForm ();
308
329
@@ -315,7 +336,9 @@ function updateExerciseList(courseId) {
315
336
316
337
$ url = api_get_path (WEB_AJAX_PATH ).
317
338
'model.ajax.php?a=get_exercise_pending_results&filter_by_user= ' .$ filter_user .
318
- '&course_id= ' .$ courseId .'&exercise_id= ' .$ exerciseId .'&status= ' .$ statusId .'&questionType= ' .$ questionTypeId .'&showAttemptsInSessions= ' .$ showAttemptsInSessions ;
339
+ '&course_id= ' .$ courseId .'&exercise_id= ' .$ exerciseId .'&status= ' .$ statusId .'&questionType= ' .$ questionTypeId .
340
+ '&showAttemptsInSessions= ' .$ showAttemptsInSessions .
341
+ '&start_date= ' .$ startDate .'&end_date= ' .$ endDate ;
319
342
$ action_links = '' ;
320
343
321
344
$ officialCodeInList = api_get_setting ('show_official_code_exercise_result_list ' );
@@ -375,16 +398,6 @@ function updateExerciseList(courseId) {
375
398
'align ' => 'left ' ,
376
399
'search ' => 'false ' ,
377
400
'sortable ' => 'false ' ,
378
- //'stype' => 'select',
379
- //for the bottom bar
380
- /*'searchoptions' => [
381
- 'defaultValue' => '',
382
- 'value' => ':'.get_lang('All').';1:'.get_lang('Validated').';0:'.get_lang('NotValidated'),
383
- ],*/
384
- //for the top bar
385
- /*'editoptions' => [
386
- 'value' => ':'.get_lang('All').';1:'.get_lang('Validated').';0:'.get_lang('NotValidated'),
387
- ],*/
388
401
],
389
402
[
390
403
'name ' => 'qualificator_fullname ' ,
0 commit comments