Reverted some changes in SurveyLogic.
SurveyRecord logic is defined in its own module.
--- a/app/soc/logic/models/survey.py Tue Jun 30 15:58:56 2009 +0200
+++ b/app/soc/logic/models/survey.py Tue Jun 30 17:55:43 2009 +0200
@@ -462,65 +462,9 @@
super(GradingProjectLogic, self).__init__(model=model,
base_model=base_model,
-<<<<<<< local
scope_logic=scope_logic)
-class ResultsLogic(work.Logic):
- """Logic methods for the Survey model
- """
-
- def __init__(self, model=SurveyRecord,
- base_model=Work, scope_logic=linkable_logic):
- """Defines the name, key_name and model for this entity.
- """
-
- super(ResultsLogic, self).__init__(model=model, base_model=base_model,
- scope_logic=scope_logic)
-=======
- scope_logic=scope_logic,
- record_logic=record_logic)
->>>>>>> other
-
- def getKeyValuesFromEntity(self, entity):
- """See base.Logic.getKeyNameValues.
- """
-
- return [entity.prefix, entity.scope_path, entity.link_id]
-
- def getKeyValuesFromFields(self, fields):
- """See base.Logic.getKeyValuesFromFields.
- """
-
- return [fields['prefix'], fields['scope_path'], fields['link_id']]
-
- def getKeyFieldNames(self):
- """See base.Logic.getKeyFieldNames.
- """
-
- return ['prefix', 'scope_path', 'link_id']
-
- def isDeletable(self, entity):
- """See base.Logic.isDeletable.
- """
-
- return not entity.home_for
-
- def _updateField(self, entity, entity_properties, name):
- """Special logic for role. If state changes to active we flush the sidebar.
- """
-
- value = entity_properties[name]
-
- if (name == 'is_featured') and (entity.is_featured != value):
- sidebar.flush()
-
- home_for = entity.home_for
- if (name != 'home_for') and home_for:
- home.flush(home_for)
- return True
-
logic = Logic()
project_logic = ProjectLogic()
grading_logic = GradingProjectLogic()
-results_logic = ResultsLogic()