|
3 | 3 | import pytz |
4 | 4 | import datetime |
5 | 5 | from urlparse import urljoin |
6 | | -import copy |
7 | 6 | import os |
8 | 7 | import re |
9 | 8 | import string |
|
24 | 23 | from ietf.group.utils import can_manage_materials |
25 | 24 | from ietf.name.models import MeetingTypeName, TimeSlotTypeName, SessionStatusName, ConstraintName, RoomResourceName |
26 | 25 | from ietf.person.models import Person |
27 | | -from ietf.utils import log |
28 | 26 | from ietf.utils.storage import NoLocationMigrationFileSystemStorage |
29 | 27 | from ietf.utils.text import xslugify |
30 | 28 |
|
@@ -527,24 +525,6 @@ def json_dict(self, host_scheme): |
527 | 525 | def json_url(self): |
528 | 526 | return "/meeting/%s/timeslot/%s.json" % (self.meeting.number, self.id) |
529 | 527 |
|
530 | | - """ |
531 | | - This routine takes the current timeslot, which is assumed to have no location, |
532 | | - and assigns a room, and then creates an identical timeslot for all of the other |
533 | | - rooms. |
534 | | - """ |
535 | | - def create_concurrent_timeslots(self): |
536 | | - log.unreachable("28 Feb 2017") |
537 | | - rooms = self.meeting.room_set.all() |
538 | | - self.room = rooms[0] |
539 | | - self.save() |
540 | | - for room in rooms[1:]: |
541 | | - ts = copy.copy(self) |
542 | | - ts.id = None |
543 | | - ts.location = room |
544 | | - ts.save() |
545 | | - |
546 | | - #self.meeting.create_all_timeslots() |
547 | | - |
548 | 528 | """ |
549 | 529 | This routine deletes all timeslots which are in the same time as this slot. |
550 | 530 | """ |
@@ -677,25 +657,12 @@ def json_dict(self, host_scheme): |
677 | 657 | def qs_assignments_with_sessions(self): |
678 | 658 | return self.assignments.filter(session__isnull=False) |
679 | 659 |
|
680 | | - @property |
681 | | - def group_mapping(self): |
682 | | - log.unreachable("28 Feb 2017") |
683 | | - assignments,sessions,total,scheduled = self.group_session_mapping |
684 | | - return assignments |
685 | | - |
686 | 660 | @property |
687 | 661 | def sessions_that_can_meet(self): |
688 | 662 | if not hasattr(self, "_cached_sessions_that_can_meet"): |
689 | 663 | self._cached_sessions_that_can_meet = self.meeting.sessions_that_can_meet.all() |
690 | 664 | return self._cached_sessions_that_can_meet |
691 | 665 |
|
692 | | - # calculate badness of entire schedule |
693 | | - def calc_badness(self): |
694 | | - log.unreachable("28 Feb 2017") |
695 | | - # now calculate badness |
696 | | - assignments = self.group_mapping |
697 | | - return self.calc_badness1(assignments) |
698 | | - |
699 | 666 | def delete_schedule(self): |
700 | 667 | self.assignments.all().delete() |
701 | 668 | self.delete() |
@@ -739,27 +706,6 @@ def slot_to_the_right(self): |
739 | 706 | else: |
740 | 707 | return None |
741 | 708 |
|
742 | | - @property |
743 | | - def area(self): |
744 | | - log.unreachable("28 Feb 2017") |
745 | | - if not self.session or not self.session.group: |
746 | | - return "" |
747 | | - if self.session.group.type_id == "irtf": |
748 | | - return "irtf" |
749 | | - if self.timeslot.type_id == "plenary": |
750 | | - return "1plenary" |
751 | | - if not self.session.group.parent or not self.session.group.parent.type_id in ["area","irtf"]: |
752 | | - return "" |
753 | | - return self.session.group.parent.acronym |
754 | | - |
755 | | - @property |
756 | | - def slottype(self): |
757 | | - log.unreachable("28 Feb 2017") |
758 | | - if self.timeslot and self.timeslot.type: |
759 | | - return self.timeslot.type.slug |
760 | | - else: |
761 | | - return "" |
762 | | - |
763 | 709 | def json_url(self): |
764 | 710 | if not hasattr(self, '_cached_json_url'): |
765 | 711 | self._cached_json_url = "/meeting/%s/agenda/%s/%s/session/%u.json" % ( |
@@ -854,13 +800,6 @@ def brief_display(self): |
854 | 800 | elif not self.target and self.person: |
855 | 801 | return u"%s " % (self.person) |
856 | 802 |
|
857 | | - def status(self): |
858 | | - log.unreachable("28 Feb 2017") |
859 | | - if self.active_status is not None: |
860 | | - return self.active_status |
861 | | - else: |
862 | | - return True |
863 | | - |
864 | 803 | def json_url(self): |
865 | 804 | return "/meeting/%s/constraint/%s.json" % (self.meeting.number, self.id) |
866 | 805 |
|
@@ -1075,25 +1014,6 @@ def timeslotassignment_for_agenda(self, schedule): |
1075 | 1014 | def official_timeslotassignment(self): |
1076 | 1015 | return self.timeslotassignment_for_agenda(self.meeting.agenda) |
1077 | 1016 |
|
1078 | | - def unique_constraints(self): |
1079 | | - log.unreachable("28 Feb 2017") |
1080 | | - global constraint_cache_uses, constraint_cache_initials |
1081 | | - constraint_cache_uses += 1 |
1082 | | - # this cache keeps the automatic placer from visiting the database continuously |
1083 | | - if self.unique_constraints_dict is not None: |
1084 | | - constraint_cache_initials += 1 |
1085 | | - return self.unique_constraints_dict |
1086 | | - self.unique_constraints_dict = dict() |
1087 | | - for constraint in self.constraints(): |
1088 | | - self.unique_constraints_dict[constraint.target] = constraint |
1089 | | - |
1090 | | - for constraint in self.reverse_constraints(): |
1091 | | - # update the constraint if there is a previous one, and |
1092 | | - # it is more important than what we had before |
1093 | | - if not (constraint in self.unique_constraints_dict) or (self.unique_constraints_dict[constraint.source] < constraint): |
1094 | | - self.unique_constraints_dict[constraint.source] = constraint |
1095 | | - return self.unique_constraints_dict |
1096 | | - |
1097 | 1017 | def constraints_dict(self, host_scheme): |
1098 | 1018 | constraint_list = [] |
1099 | 1019 | for constraint in self.constraints(): |
|
0 commit comments