Пример #1
0
     }
     break;
 case 'get_exercise_results':
     $exercise_id = $_REQUEST['exerciseId'];
     if (isset($_GET['filter_by_user']) && !empty($_GET['filter_by_user'])) {
         $filter_user = intval($_GET['filter_by_user']);
         if ($where_condition == "") {
             $where_condition .= " te.exe_user_id  = '{$filter_user}'";
         } else {
             $where_condition .= " AND te.exe_user_id  = '{$filter_user}'";
         }
     }
     $count = ExerciseLib::get_count_exam_results($exercise_id, $where_condition);
     break;
 case 'get_admin_exercise_results':
     $count = ExerciseLib::get_admin_count_exam_results($where_condition);
     break;
 case 'get_hotpotatoes_exercise_results':
     $hotpot_path = $_REQUEST['path'];
     $count = ExerciseLib::get_count_exam_hotpotatoes_results($hotpot_path);
     break;
 case 'get_sessions':
     $list_type = isset($_REQUEST['list_type']) ? $_REQUEST['list_type'] : 'simple';
     if ($list_type == 'simple') {
         $count = SessionManager::get_sessions_admin(array('where' => $where_condition, 'extra' => $extra_fields), true);
     } else {
         $count = SessionManager::get_count_admin_complete(array('where' => $where_condition, 'extra' => $extra_fields));
     }
     break;
 case 'get_extra_fields':
     $type = $_REQUEST['type'];