Factual error: When Dewey is getting the class to jam on "Smoke on the Water" for the first time, he tells the girl bass player to play a G, but he shows the guitar player the chords to the song in the key of A. The chords do not match the bass line. A real guitar player who has played this song would not make this mistake.
Continuity mistake: At the title sequence, after Dewey's solo, and just before he stage-dives, the camera cuts from him, to the lead guitarist, then back to him. In the first shot of him, he is just putting down his guitar. In the shot of the lead guitarist, the neck of the guitar is visible as if he was still holding and playing it, but when it cuts back to Dewey, the guitar has been put down, and Dewey has his shirt off.
Audio problem: Right before Dewey walks into the classroom for the first time, he tells the principal, "check." The shot changes to behind Dewey's head and we can see him saying "check" again.
Continuity mistake: The amount of beer in Ms. Mullins' glass keeps changing. It sometimes grows.
Continuity mistake: When Dewey is getting the stuff out the van after he subs the kids' music class, there is a brief shot of the back as he removes the guitars and the keyboard isn't visible. However two shots later he gets it out out of his van.
Continuity mistake: When Dewy is saying that they should keep the project under wraps, he has his hands on the Gibson SG. Camera cuts and now they are at his face.
Revealing mistake: When Dewey is telling the parents at Parents' Night how awesome their kids are he says that Gordon is a genius. Gordon's mother kneels down and mouths the words "Did you?" in response to Dewey's line that continues after this shot in which he goes on to say, "He programmed an entire light show."
Visible crew/equipment: When the kids are playing music in the classroom and the teacher sings along with them, you can see a crewmember's shadow on the chalkboard.
Other mistake: During the credits when the band is having class, Dewey starts singing, "Credits got to roll. Look at that name there. I do not know that guy." While he sings that he pretends to follow one of the rolling names with his finger. Only problem is he's going the wrong way. He's scrolling down, but the credits are scrolling up. (Though an explanation is offered on the commentary, this is still a mistake within the film.)
Audio problem: When Dewey starts playing his guitar towards the end (when he was leaning back in his chair with his feet on his desk, then leaned forward and stood up on the desk) we hear the drums starting to play. In the first shot of the class, the drummer is not doing anything except sitting behind the set, and there's still a beat.
Visible crew/equipment: When Dewey is talking to Ned about his job you can see a crew member reflected on the glass window.
Continuity mistake: When Dewey leaves the bathroom after hearing the kids playing in the music class his shirt is sticking out of his waist band then in the next shot while he's running up the stairs his shirt is stuck back in again.
Audio problem: In the final battle of the bands scene, when they play Zack's song, you can see a lot of amps on stage but there are only three guitars. There is no need for so many amps with only three guitars and such a small venue. Also if you look closely, the Peavey amp next to the keyboard is the only amp that has a cable connected to it. All the other amps have the guitar input on the front but you can see that none of them are connected to anything, neither are they switched on because you can't see any lights on the front of them.
Answer: It is never said but If I was to guess, they got it from the guy he was pretending to be (Ned's) information from the school office.