Creating an Uploads folder with post ID

I wrote this code for you:

global $lesson_id;
$lesson_id = $_POST['lesson_id']; 

function create_uploads_folder() {
    global $lesson_id;

    $upload_dir = wp_upload_dir();
    $upload_dir = $upload_dir['basedir'];
    $upload_dir = $upload_dir . '/submissions/'. $lesson_id;
    if ( ! is_dir( $upload_dir ) ) {
        wp_mkdir_p( $upload_dir );
    }
}

register_activation_hook( __FILE__, 'create_uploads_folder' );

// Upload file
$uploadFolder = wp_upload_dir();
if ( ! move_uploaded_file($_FILES['file_upload']['tmp_name'], $uploadFolder['basedir'] . '/submissions/' . $lesson_id . "https://wordpress.stackexchange.com/" . $_FILES['file_upload']['name'])){
    die('Error uploading file - check destination is writeable');
}

tech