This is one solution and may not be the best, but this is what I think.
I think the student should get rid of the two board events for the toggle switches and just check the status of the toggle switches when the buttons are pressed.
I'd also then delete the and the up_down and left_right functions as they will be not needed.
So, the program would look more like:
Board Event: buttonL is pressed. Inside that check the status of the toggle switch with an if statement. if the toggle switch is open call the move_plane_up function
Let me know if that makes sense.