
    Design a function for an educational writing assessment tool that takes a student's text submission and rearranges only the vowel positions in reverse order while keeping all consonants in their original positions. The function should treat 'y' as a consonant and maintain the original case (uppercase/lowercase) of each vowel in its new position.
    

    
def reverse_vowels(str1):
    """
    Design a function for an educational writing assessment tool that takes a student's text submission and rearranges only the vowel positions in reverse order while keeping all consonants in their original positions. The function should treat 'y' as a consonant and maintain the original case (uppercase/lowercase) of each vowel in its new position.
    

    """
def reverse_vowels(str1):
    """
    Design a function for an educational writing assessment tool that takes a student's text submission and rearranges only the vowel positions in reverse order while keeping all consonants in their original positions. The function should treat 'y' as a consonant and maintain the original case (uppercase/lowercase) of each vowel in its new position.
    

    """
    vowels = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            vowels += char
    result_string = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            result_string += vowels[-1]
            vowels = vowels[:-1]
        else:
            result_string += char
    return result_string