|
6 | 6 |
|
7 | 7 | require_once __DIR__.'/../global.inc.php'; |
8 | 8 |
|
9 | | -// --- DATE FILTERS --- |
10 | | -$search_start_date = isset($_REQUEST['start_date']) && !empty($_REQUEST['start_date']) ? $_REQUEST['start_date'] : null; |
11 | | -$search_end_date = isset($_REQUEST['end_date']) && !empty($_REQUEST['end_date']) ? $_REQUEST['end_date'] : null; |
12 | | - |
13 | 9 | // 1. Setting variables needed by jqgrid |
14 | 10 | $action = $_GET['a']; |
15 | 11 | $page = (int) $_REQUEST['page']; //page |
@@ -649,19 +645,20 @@ function getWhereClause($col, $oper, $val) |
649 | 645 | break; |
650 | 646 |
|
651 | 647 | case 'get_exercise_pending_results': |
652 | | - if ((false === api_is_teacher()) && (false === api_is_session_admin())) { |
653 | | - exit; |
654 | | - } |
655 | | - |
656 | | - $courseId = $_REQUEST['course_id'] ?? 0; |
657 | | - $exerciseId = $_REQUEST['exercise_id'] ?? 0; |
658 | | - $status = $_REQUEST['status'] ?? 0; |
659 | | - $questionType = $_REQUEST['questionType'] ?? 0; |
660 | | - $showAttemptsInSessions = $_REQUEST['showAttemptsInSessions'] ? true : false; |
661 | | - if (isset($_GET['filter_by_user']) && !empty($_GET['filter_by_user'])) { |
662 | | - $filter_user = (int) $_GET['filter_by_user']; |
663 | | - if (empty($whereCondition)) { |
664 | | - $whereCondition .= " te.exe_user_id = '$filter_user'"; |
| 648 | + if ((false === api_is_teacher()) && (false === api_is_session_admin())) { |
| 649 | + exit; |
| 650 | + } |
| 651 | + $search_start_date = isset($_REQUEST['start_date']) && !empty($_REQUEST['start_date']) ? $_REQUEST['start_date'] : null; |
| 652 | + $search_end_date = isset($_REQUEST['end_date']) && !empty($_REQUEST['end_date']) ? $_REQUEST['end_date'] : null; |
| 653 | + $courseId = $_REQUEST['course_id'] ?? 0; |
| 654 | + $exerciseId = $_REQUEST['exercise_id'] ?? 0; |
| 655 | + $status = $_REQUEST['status'] ?? 0; |
| 656 | + $questionType = $_REQUEST['questionType'] ?? 0; |
| 657 | + $showAttemptsInSessions = $_REQUEST['showAttemptsInSessions'] ? true : false; |
| 658 | + if (isset($_GET['filter_by_user']) && !empty($_GET['filter_by_user'])) { |
| 659 | + $filter_user = (int) $_GET['filter_by_user']; |
| 660 | + if (empty($whereCondition)) { |
| 661 | + $whereCondition .= " te.exe_user_id = '$filter_user'"; |
665 | 662 | } else { |
666 | 663 | $whereCondition .= " AND te.exe_user_id = '$filter_user'"; |
667 | 664 | } |
|
0 commit comments