Skip to content
Browse files

Fix teacher assignment behavior when a class's category is changed by…

… a non-teacher
  • Loading branch information...
1 parent e0a07b1 commit 7d3d4795243c45cdf5b793f45e4d6e0784aa8064 @pricem pricem committed Sep 28, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 esp/esp/program/controllers/classreg.py
View
9 esp/esp/program/controllers/classreg.py
@@ -105,12 +105,15 @@ def make_class_happen(self, cls, user, reg_form, resource_formset, restype_forms
self.update_class_sections(cls, int(reg_form.cleaned_data['num_sections']))
# If someone is editing the class, we assume they don't want to be
# added as a teacher if they aren't already one.
- if anchor_modified or not editing:
- self.associate_teacher_with_class(cls, user)
+ if anchor_modified:
+ for teacher in cls.teachers():
+ self.associate_teacher_with_class(cls, teacher)
+ if not editing:
+ self.associate_teacher_with_class(cls, user)
self.add_rsrc_requests_to_class(cls, resource_formset, restype_formset)
cls.propose()
cls.update_cache()
-
+
def set_class_data(self, cls, reg_form):
custom_fields = get_custom_fields()
custom_data = {}

0 comments on commit 7d3d479

Please sign in to comment.
Something went wrong with that request. Please try again.