Plot hole: When Robin and Lily find Barney's secret Robin notebook, Barney and Ted are at the class, so Barney should have the notebook with him.
Suggested correction: This is a character mistake at best, and quite a common one. Students constantly forget their textbooks, homework, notes, supplies etc.
It should be noted that the plot hole isn't talking about "students." This isn't about forgetting textbooks, supplies, or homework. Barney is trying to be a better boyfriend to Robin and wants to learn Ted's secrets since Ted had dated Robin. If Barney has been writing everything down before, the mistake is pointing out why isn't he writing it down this time, except to allow the writers to have Lily and Robin find the notebook and the class.