1. Let the total number of students in the class be denoted by x.
2. According to the problem, 30% of the students made a B, and this equals 12 students.
3. Set up the equation:
0.30 \times x = 12
4. To find x, divide both sides of the equation by 0.30:
x = \frac{12}{0.30}
5. Simplify the right side:
x = \frac{12}{0.30} = 40
6. Therefore, the total number of students in the class is \boxed{40} .
Answer: 40 students.