Po*As far as I remember, the only time when any Ravenclaws are mentioned in one of Harry's classes is in NEWT level Potions with Slughorn, since it is such a small class the students from all four houses were in it. They may share classes like Transfigurations, Ancient Runes, Arithmancy, or Muggle Studies, but since we never see those classes we cannot be sure.
- For Ginny and Luna's year, Gryffindors and Ravenclaws apparently shared Transfiguration. Luna mentions that Ginny stopped two boys from calling her "Loony" in that class. No Ravenclaws are ever mentioned in any of Harry's classes; whether they just never spoke up in the books, or whether the shared-classes are different each year, is impossible to tell.
- According to the books, Luna is in Ginny's year, a year below Harry, Ron and Hermione. Therefore Luna herself would not be likely to be mentioned in any of Harry's classes. It is highly likely though that Ravenclaws would have had Potions with the Gryffindors. Most people assume the Gryffindors have it with the Slytherins because they are the two main featured houses and Snape liked to pick on Harry.
But it is very likely the had classes with the Ravenclaws and/or Hufflepuffs too.
- In all of the main classes, or the ones Harry took, they were with the Slytherins in the movies. What you perceive is not always correct. It is plausible that Rowling put them in those classes together for awhile to show the Slytherins hatred towards Gryffindor. They were not always together. The books do not go into enough detail but it is likely to assume that they had classes with other houses.
- Hermione took all of the classes available. She could not possibly have only Slytherins in her classes all the time. When the Slytherins where in one class, the Gryffindors were in another. They couldnt all be in the same place at the same time. Therefore the Gryffindors had to have some classes with the other houses.