From your description, let me analyze it.
Some people keep a straight face all day long because some people have a colder personality. Your classmate will laugh when he encounters funny things, which means that he can't let go in front of others. Or he only speaks freely in front of friends he knows very well. But it's also possible that he's faking it, all of these are possible.