Code Duplication    Length = 13-13 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 3452-3464 (lines=13) @@
3449
3450
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3451
3452
                        if ($answerCorrect == 1) {
3453
                            if ($studentChoice) {
3454
                                $real_answers[$answerId] = true;
3455
                            } else {
3456
                                $real_answers[$answerId] = false;
3457
                            }
3458
                        } else {
3459
                            if ($studentChoice) {
3460
                                $real_answers[$answerId] = false;
3461
                            } else {
3462
                                $real_answers[$answerId] = true;
3463
                            }
3464
                        }
3465
                    } else {
3466
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3467
@@ 3468-3480 (lines=13) @@
3465
                    } else {
3466
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3467
3468
                        if ($answerCorrect == 1) {
3469
                            if ($studentChoice) {
3470
                                $real_answers[$answerId] = true;
3471
                            } else {
3472
                                $real_answers[$answerId] = false;
3473
                            }
3474
                        } else {
3475
                            if ($studentChoice) {
3476
                                $real_answers[$answerId] = false;
3477
                            } else {
3478
                                $real_answers[$answerId] = true;
3479
                            }
3480
                        }
3481
                    }
3482
                    break;
3483
                case FILL_IN_BLANKS: