1.1 --- a/imiptools/handlers/resource.py Tue Feb 09 12:19:13 2016 +0100
1.2 +++ b/imiptools/handlers/resource.py Tue Feb 09 14:17:52 2016 +0100
1.3 @@ -176,6 +176,13 @@
1.4
1.5 # Scheduling details.
1.6
1.7 + def get_scheduling_functions(self):
1.8 +
1.9 + "Return the scheduling functions for the resource."
1.10 +
1.11 + return self.get_preferences().get("scheduling_function",
1.12 + "schedule_in_freebusy").split("\n")
1.13 +
1.14 def schedule(self):
1.15
1.16 """
1.17 @@ -185,39 +192,25 @@
1.18 invalid requests.
1.19 """
1.20
1.21 - # Obtain a list of scheduling functions.
1.22 -
1.23 - functions = self.get_preferences().get("scheduling_function",
1.24 - "schedule_in_freebusy").split("\n")
1.25 -
1.26 - return apply_scheduling_functions(functions, self)
1.27 + return apply_scheduling_functions(self)
1.28
1.29 def confirm_scheduling(self):
1.30
1.31 "Confirm that this event has been scheduled."
1.32
1.33 - functions = self.get_preferences().get("confirmation_function")
1.34 -
1.35 - if functions:
1.36 - confirm_scheduling(functions.split("\n"), self)
1.37 + confirm_scheduling(self)
1.38
1.39 def finish_scheduling(self):
1.40
1.41 "Finish the scheduling, unlocking resources where appropriate."
1.42
1.43 - functions = self.get_preferences().get("scheduling_function",
1.44 - "schedule_in_freebusy").split("\n")
1.45 -
1.46 - finish_scheduling(functions, self)
1.47 + finish_scheduling(self)
1.48
1.49 def retract_scheduling(self):
1.50
1.51 "Retract this event from scheduling records."
1.52
1.53 - functions = self.get_preferences().get("retraction_function")
1.54 -
1.55 - if functions:
1.56 - retract_scheduling(functions.split("\n"), self)
1.57 + retract_scheduling(self)
1.58
1.59 class Event(ResourceHandler):
1.60