who did chloe grace moretz play in diary of a wimpy kid