app/soc/logic/models/student_project.py
author Lennard de Rijk <ljvderijk@gmail.com>
Mon, 13 Jul 2009 11:12:42 +0200
changeset 2628 0440ac4e5f34
parent 1933 49aef36e0022
child 2643 222be0eb4aab
permissions -rw-r--r--
Added getRecordLogic method to GradingSurveyGroup Logic.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1933
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/python2.5
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     2
#
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     3
# Copyright 2009 the Melange authors.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     4
#
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     5
# Licensed under the Apache License, Version 2.0 (the "License");
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     6
# you may not use this file except in compliance with the License.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     7
# You may obtain a copy of the License at
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     8
#
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     9
#   http://www.apache.org/licenses/LICENSE-2.0
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    10
#
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    11
# Unless required by applicable law or agreed to in writing, software
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    12
# distributed under the License is distributed on an "AS IS" BASIS,
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    13
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    14
# See the License for the specific language governing permissions and
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    15
# limitations under the License.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    16
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    17
"""Student Project (Model) query functions.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    18
"""
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    19
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    20
__authors__ = [
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    21
  '"Lennard de Rijk" <ljvderijk@gmail.com>',
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    22
  ]
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    23
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    24
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    25
from soc.logic.models import base
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    26
from soc.logic.models import organization as org_logic
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    27
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    28
import soc.models.linkable
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    29
import soc.models.student_project
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    30
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    31
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    32
class Logic(base.Logic):
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    33
  """Logic methods for the Student Project model.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    34
  """
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    35
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    36
  def __init__(self, model=soc.models.student_project.StudentProject,
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    37
               base_model=soc.models.linkable.Linkable, 
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    38
               scope_logic=org_logic):
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    39
    """Defines the name, key_name and model for this entity.
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    40
    """
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    41
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    42
    super(Logic, self).__init__(model=model, base_model=base_model,
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    43
                                scope_logic=scope_logic)
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    44
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    45
49aef36e0022 Added StudentProject logic.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    46
logic = Logic()