Code Duplication    Length = 4-4 lines in 2 locations

main/exercise/export/aiken/aiken_import.inc.php 1 location

@@ 57-60 (lines=4) @@
54
    $_user = api_get_user_info();
55
56
    // Check if the file is valid (not to big and exists)
57
    if (!isset($_FILES['userFile']) || !is_uploaded_file($_FILES['userFile']['tmp_name'])) {
58
        // upload failed
59
        return false;
60
    }
61
62
    if (preg_match('/.zip$/i', $_FILES['userFile']['name']) &&
63
        handle_uploaded_document(

main/exercise/export/exercise_import.inc.php 1 location

@@ 28-31 (lines=4) @@
25
    $_user = api_get_user_info();
26
27
    //Check if the file is valid (not to big and exists)
28
    if (!isset($_FILES['userFile']) || !is_uploaded_file($_FILES['userFile']['tmp_name'])) {
29
        // upload failed
30
        return false;
31
    }
32
33
    if (preg_match('/.zip$/i', $_FILES['userFile']['name']) &&
34
        handle_uploaded_document(