learning-unlimited/ESP-Website — pull request #235 by jmoldow (2012-01-08 02:59:09+00:00)
Title: Fix bug in teacherreg listclasses template.

Previously, when you went to teach///teacherreg, no
classes appeared at the bottom of the page, even if you had registered
classes.

The method TeacherClassRegModule.clslist() takes two arguments, not
one. Therefore, this method can't be called in the listclasses
template.

I'm guessing that this was changed when user was removed as an
attribute from all of the modules. Presumbably, clslist() used to be a
one-argument function, because user was built into self. But now that
this isn't the case, user is needed as a second argument.

This commit fixes this by manually adding clslist as context in the
prepare() method. However, its possible that a more elegant fix is
called for.