document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. class IntendedCourseTypeProxy(colproxy.BaseProxy):
  2.     def save(self, courses, request):
  3.         [store.remove(sic) for sic in store.find(StudentIntendedCourse, StudentIntendedCourse.student_id  == self.obj.id)]
  4.         if courses is not None:
  5.             for c in courses:
  6.                 c = int(c);
  7.             sic = StudentIntendedCourse()
  8.                 sic.student_id = self.obj.id
  9.         sic.intended_course_id = c
  10.         store.add(sic)
  11.  
  12. class StudyPlanProxy(colproxy.BaseProxy):
  13.     def save(self, courses, request):
  14.         [store.remove(ssp) for ssp in store.find(StudentStudyPlan, StudentStudyPlan.student_id == self.obj.id)]
  15.         if courses is not None:
  16.             for c in courses:
  17.                 c = int(c);
  18.                 ssp = StudentStudyPlan()
  19.                 ssp.student_id = self.obj.id
  20.                 ssp.course_id = c
  21.                 store.add(ssp)
');