How do grad schools design courses for potential students? For graduate schools in STEM which take students with a Bachelor's degree (BS/BE/BTech etc.) and graduate them with an MS and/or PhD, what do they assume about the student's prerequisite knowledge when designing courses, their difficulty and overall dynamics? 

My question is pointed towards knowledge and not what is on the student's transcripts. For instance, a student might have "Linear Algebra" on his transcripts but might not remember Singular Value Decomposition very well.

Do they:


assume that student knows all the courses he has taken very well and build from there? (What happens to people who had a BS in allied fields? For instance a student may have a BS in Pure Math but enrol for a MS/PhD in Computational Math with little idea about a "compiler".)
assume he knows nothing and take him to proficiency?
anything in between?
I agree with @aeismail's and @dmckee's answers, but let me add a different spin:

Students are admitted to strong PhD programs not on the basis of how much or what they know, but rather on their potential for successful research.  Every program admits students from all over the world, who may or may not have undergraduate degrees in exactly the same field.  Beyond a few fundamental concepts, it is not reasonable to assume that incoming graduate students have any specific prior knowledge.  

That said, most courses for PhD students are generally taught as if the students have a strong undergraduate background in the same field.  The definition of "strong undergraduate background" depends strongly on the graduate program; the expectations at the top PhD programs are generally extremely high.  More importantly, PhD students in top departments are expected to have the intellectual maturity to recognize and correct weaknesses in their background, even if the missing material is not normally covered in a strong undergraduate program.

Also: Courses are arguably the least important part of any PhD program.