Skip to content

Commit 95083f4

Browse files
authored
Quiz : #fix pending attempts Excel export to take into account question type and session users filters
Author: @yverhenne
1 parent 3eda9b4 commit 95083f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main/inc/lib/exercise.lib.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2441,6 +2441,8 @@ public static function exportPendingAttemptsToExcel($values)
24412441
$courseId = $values['course_id'] ?? 0;
24422442
$exerciseId = $values['exercise_id'] ?? 0;
24432443
$status = $values['status'] ?? 0;
2444+
$questionType = $values['questionType'] ?? ($values['questionTypeId'] ?? 0);
2445+
$showAttemptsInSessions = api_get_configuration_value('show_exercise_attempts_in_all_user_sessions');
24442446
$whereCondition = '';
24452447
if (isset($_GET['filter_by_user']) && !empty($_GET['filter_by_user'])) {
24462448
$filter_user = (int) $_GET['filter_by_user'];
@@ -2486,7 +2488,10 @@ public static function exportPendingAttemptsToExcel($values)
24862488
false,
24872489
false,
24882490
true,
2489-
$status
2491+
$status,
2492+
$showAttemptsInSessions,
2493+
$questionType,
2494+
true
24902495
);
24912496

24922497
if (!empty($result)) {

0 commit comments

Comments
 (0)