You probably are his secret. He's probably scared his friends will make fun of him for being with you, which is probably why he's ignoring you when other people are around. I've been in a relationship like that and I can tell you, it's only going to keep getting worse. The relationship isn't healthy and it's probably best you end it with him. If he's too scared of what others will think, then he doesn't care about you like he may seem to.
Try to confront him about why he ignores you during school. But the relationship may not even be what you think it is. It might be better just to leave him if he keeps ignoring you.
I'd say just talk to him about it, after all, honestly is the best way. Guys think differently than us, very differently, so it might be because he doesn't know how he;s making you feel. idk. What i'd do is just ask him about it. If it turns out he is just ignoring you, then I'd punch him and run. lol, not really. But I would break up with him, cause every girl deserves a guy who isn't ashamed of her and really loves her. Hope this helped. =)
He is playing you. Using you for what he wants then ignoring you because he doesn't actually care. Tell him he either acknowledges you in the hall or he can fudge off. You don't need guys like that in your life they aren't worth it... trust me.
Relationships can be a bit like that, especially your first ones. Trust me, I know :s