The answer is: pre-conventional stage
During the pre-conventional stage of moral development, people would judge whether a certain action is right or wrong on the direct impact that the action would give them.
If the direct impact of that action is good, the person would not feel wrong in doing that action. But if the direct impact of that action is bad ( such as failing the class) than the person would choose avoid the action. This stage of moral development is very common during adolescents.