Pull up your students in a found set (perform a find, use Go to Related records...)
Use Replace field contents and the calculation option with the random function to assign a random number to a number field in the table.
Sort your records by the value in this number field
The first record in your found set will be your randomly selected student.
Use a number field to sequentially number the student records from 1 to 15 (or whatever number of students are in your class)
Use this expression to generate a random integer from 1 to NumberOfStudents:
Int ( Random * NumberOfStudents ) + 1
Either perform a find for this number or use it in a relationship to match to the selected student record.
Thanks PhilModJunk- method 1 worked fine and i have now refined it to show just the name in another layout.
PS Do you know if FileMaker 12 is able to perform queries on summary fields.
I have yet to see a copy of FileMaker 12. (If I had received a copy an NDA would prevent me from saying anyway.)
Queries against summary fields are problematic as the values in them do not refer to specific records and the values they return depend on the current found set and sort order.