I think your attitude at school can affect your gade in several ways. For example, going to school in a bad mood can make it more difficult to focus or make you feel less motivated to work. That can definitely result in worsened grades. However, going to school in a good mood can result in more motivation and concentration, thus resulting in better grades.