Code Duplication    Length = 13-13 lines in 2 locations

main/exercise/exercise.class.php 2 locations

@@ 3420-3432 (lines=13) @@
3417
3418
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3419
3420
                        if ($answerCorrect == 1) {
3421
                            if ($studentChoice) {
3422
                                $real_answers[$answerId] = true;
3423
                            } else {
3424
                                $real_answers[$answerId] = false;
3425
                            }
3426
                        } else {
3427
                            if ($studentChoice) {
3428
                                $real_answers[$answerId] = false;
3429
                            } else {
3430
                                $real_answers[$answerId] = true;
3431
                            }
3432
                        }
3433
                    } else {
3434
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3435
@@ 3436-3448 (lines=13) @@
3433
                    } else {
3434
                        $studentChoice = isset($choice[$answerAutoId]) ? $choice[$answerAutoId] : null;
3435
3436
                        if ($answerCorrect == 1) {
3437
                            if ($studentChoice) {
3438
                                $real_answers[$answerId] = true;
3439
                            } else {
3440
                                $real_answers[$answerId] = false;
3441
                            }
3442
                        } else {
3443
                            if ($studentChoice) {
3444
                                $real_answers[$answerId] = false;
3445
                            } else {
3446
                                $real_answers[$answerId] = true;
3447
                            }
3448
                        }
3449
                    }
3450
                    break;
3451
                case FILL_IN_BLANKS: