Are there examples of classes with students publishing their reports instead of just turning them into TA & Professor?
Disclaimer: As I've only been a graduate student at the university I'm currently attending (USA) I can only comment on my individual experience at this university in my particular field (computer science) and the classes that accompany it.

Experience: I have a publication currently accepted that is the direct result of a course I took.

Throughout my time as a graduate student I've observed several class formats as far as expected work goes, typically involving some combination of homework, exams, and projects. Those involving projects, particularly when greater emphasis is placed on the project, are those rife with opportunity for publication. An additional indication of this is if the faculty member is teaching the project-based course in his/her area of research.

If your intent is to take a class with the hope of turning your work into a publication I would recommend taking a course where the above align (project-emphasized course work being taught by a faculty member whose research area is the same as that of the topic being taught).  Additionally, I would recommend:

1) Choosing a class that aligns with your own interests and research.

2) Speak with the professor prior to the start of the class about your intention of turning the project into a publication. The professor should be able to comment on whether their project is a good opportunity for such an endeavor and perhaps be able to provide you with advice on how to be successful in completing the project and turning it into a publication.

3) In discussing with the class instructor, it would also be a good idea to discuss project expectations, particularly as they relate to (a) working with other class members and (b) the criteria that will be used to grade your work. Regarding (a), not all class members may be interested in going the extra mile to turn a project into a publication. Having this discussion with the professor up front will mitigate the chance of encountering "snags" related to this (e.g., you be given an exception to work on the project by yourself). Regarding (b), the criteria used to grade your project may be slightly different than what it takes to make a publication. Granted your intent, and what will almost certainly entail a greater amount of work, some leeway may be granted to you if tasks to create a publication and those needed to earn full marks on the project don't line up entirely. This, of course, depends on the instructor.

4) Getting [at least] some preliminary idea of the course material and ongoing research in the area of the topic of the course, prior to its start, will help. Furthermore, having some project idea (i.e., research idea) in mind, would be ideal. This can also be discussed with the professor.

I'm sure there are points and recommendation that could be made here, as well as other scenarios, which may vary by field and university, but for me, in my own unique experience, these were the highlights that led to my course-based publication. Best of luck!