|
489 | 489 | }
|
490 | 490 |
|
491 | 491 | // "all" or "simple" strings means that there's one or all questions exercise type
|
492 |
| - $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : null; |
| 492 | + $type = $_REQUEST['type'] ?? null; |
493 | 493 |
|
494 | 494 | // Questions choices.
|
495 |
| - $choice = isset($_REQUEST['choice']) ? $_REQUEST['choice'] : []; |
| 495 | + $choice = $_REQUEST['choice'] ?? []; |
496 | 496 |
|
497 | 497 | // certainty degree choice
|
498 |
| - $choiceDegreeCertainty = isset($_REQUEST['choiceDegreeCertainty']) ? $_REQUEST['choiceDegreeCertainty'] : []; |
| 498 | + $choiceDegreeCertainty = $_REQUEST['choiceDegreeCertainty'] ?? []; |
499 | 499 |
|
500 | 500 | // Hot spot coordinates from all questions.
|
501 |
| - $hot_spot_coordinates = isset($_REQUEST['hotspot']) ? $_REQUEST['hotspot'] : []; |
| 501 | + $hot_spot_coordinates = $_REQUEST['hotspot'] ?? []; |
502 | 502 |
|
503 | 503 | // the filenames in upload answer type
|
504 |
| - $uploadAnswerFileNames = isset($_REQUEST['uploadChoice']) ? $_REQUEST['uploadChoice'] : []; |
| 504 | + $uploadAnswerFileNames = $_REQUEST['uploadChoice'] ?? []; |
505 | 505 |
|
506 | 506 | // There is a reminder?
|
507 |
| - $remind_list = isset($_REQUEST['remind_list']) && !empty($_REQUEST['remind_list']) |
508 |
| - ? array_keys($_REQUEST['remind_list']) : []; |
| 507 | + $remind_list = !empty($_REQUEST['remind_list']) ? array_keys($_REQUEST['remind_list']) : []; |
509 | 508 |
|
510 | 509 | // Needed in manage_answer.
|
511 | 510 | $learnpath_id = isset($_REQUEST['learnpath_id']) ? (int) $_REQUEST['learnpath_id'] : 0;
|
|
662 | 661 | if ($type === 'simple' && $question_id != $my_question_id) {
|
663 | 662 | continue;
|
664 | 663 | }
|
665 |
| - $my_choice = isset($choice[$my_question_id]) ? $choice[$my_question_id] : null; |
| 664 | + $my_choice = $choice[$my_question_id] ?? null; |
666 | 665 | $objQuestionTmp = Question::read($my_question_id, $objExercise->course);
|
667 | 666 | $myChoiceDegreeCertainty = null;
|
668 | 667 | if ($objQuestionTmp->type === MULTIPLE_ANSWER_TRUE_FALSE_DEGREE_CERTAINTY) {
|
|
700 | 699 |
|
701 | 700 | // This variable came from exercise_submit_modal.php.
|
702 | 701 | $hotspot_delineation_result = null;
|
703 |
| - if (isset($_SESSION['hotspot_delineation_result']) && |
704 |
| - isset($_SESSION['hotspot_delineation_result'][$objExercise->selectId()]) |
| 702 | + if (isset($_SESSION['hotspot_delineation_result'][$objExercise->selectId()]) |
705 | 703 | ) {
|
706 | 704 | $hotspot_delineation_result = $_SESSION['hotspot_delineation_result'][$objExercise->selectId()][$my_question_id];
|
707 | 705 | }
|
|
0 commit comments