app/soc/modules/ghop/models/program.py
changeset 2408 726183fad650
parent 2406 6f966e1a80bc
child 2716 9921ac952f13
equal deleted inserted replaced
2407:e23fce20ad3a 2408:726183fad650
    35 
    35 
    36   #: Property that contains the minimum age of a student allowed to
    36   #: Property that contains the minimum age of a student allowed to
    37   #: participate
    37   #: participate
    38   student_min_age = db.IntegerProperty(
    38   student_min_age = db.IntegerProperty(
    39       required=True, verbose_name=ugettext('Student minimum age'))
    39       required=True, verbose_name=ugettext('Student minimum age'))
       
    40   student_min_age.group = ugettext('Contest Rules')
    40   student_min_age.help_text = ugettext(
    41   student_min_age.help_text = ugettext(
    41       'Minimum age of the student to sign-up in years.')
    42       'Minimum age of the student to sign-up in years.')
    42 
    43 
    43   #: Property that contains the date as of which above student
    44   #: Property that contains the date as of which above student
    44   #: minimum age requirement holds. This is a DateTimeProperty because
    45   #: minimum age requirement holds. This is a DateTimeProperty because
    45   #: programs might run in a different timezone then the Appengine Server
    46   #: programs might run in a different timezone then the Appengine Server
    46   #: is running on.
    47   #: is running on.
    47   student_min_age_as_of = db.DateTimeProperty(
    48   student_min_age_as_of = db.DateTimeProperty(
    48       required=True, verbose_name=ugettext('Minimum age as of'))
    49       required=True, verbose_name=ugettext('Minimum age as of'))
       
    50   student_min_age_as_of.group = ugettext('Contest Rules')
    49   student_min_age_as_of.help_text = ugettext(
    51   student_min_age_as_of.help_text = ugettext(
    50       'Date as of which the student minimum age requirement holds.')
    52       'Date as of which the student minimum age requirement holds.')
    51 
    53 
    52   #: Required property containing the number of Tasks Students can work
    54   #: Required property containing the number of Tasks Students can work
    53   #: on simultaneously. For GHOP it is 1
    55   #: on simultaneously. For GHOP it is 1
    54   nr_simultaneous_tasks = db.IntegerProperty(
    56   nr_simultaneous_tasks = db.IntegerProperty(
    55       required=True, default=1, 
    57       required=True, default=1, 
    56       verbose_name=ugettext('Simultaneous tasks'))
    58       verbose_name=ugettext('Simultaneous tasks'))
       
    59   nr_simultaneous_tasks.group = ugettext('Contest Rules')
    57   nr_simultaneous_tasks.help_text = ugettext(
    60   nr_simultaneous_tasks.help_text = ugettext(
    58       'Number of tasks students can work on simultaneously in the program.')
    61       'Number of tasks students can work on simultaneously in the program.')
    59 
    62 
    60   #: Property containing the number of winners per Organization
    63   #: Property containing the number of winners per Organization
    61   nr_winners = db.IntegerProperty(
    64   nr_winners = db.IntegerProperty(
    62       required=True, default=0,
    65       required=True, default=0,
    63       verbose_name=ugettext('Winners per organization'))
    66       verbose_name=ugettext('Winners per organization'))
       
    67   nr_winners.group = ugettext('Prize Information')
    64   nr_winners.help_text = ugettext(
    68   nr_winners.help_text = ugettext(
    65       'Number of winners an organization can announce.')
    69       'Number of winners an organization can announce.')
    66 
    70 
    67   #: Property containing the number of runner ups per Organization
    71   #: Property containing the number of runner ups per Organization
    68   nr_runnerups = db.IntegerProperty(
    72   nr_runnerups = db.IntegerProperty(
    69       required=True, default=0,
    73       required=True, default=0,
    70       verbose_name=ugettext('Runner-ups per organization'))
    74       verbose_name=ugettext('Runner-ups per organization'))
       
    75   nr_runnerups.group = ugettext('Prize Information')
    71   nr_runnerups.help_text = ugettext(
    76   nr_runnerups.help_text = ugettext(
    72       'Number of runner-ups an organization can announce.')
    77       'Number of runner-ups an organization can announce.')
    73 
    78 
    74   #: A list of difficulty levels that can be assigned for each Task created
    79   #: A list of difficulty levels that can be assigned for each Task created
    75   task_difficulties = db.StringListProperty(
    80   task_difficulties = db.StringListProperty(
    76       required=True, default=[''],
    81       required=True, default=[''],
    77       verbose_name=ugettext('Difficulty levels'))
    82       verbose_name=ugettext('Difficulty levels'))
       
    83   task_difficulties.group = ugettext('Task Settings')
    78   task_difficulties.help_text = ugettext(
    84   task_difficulties.help_text = ugettext(
    79       'List all the difficulty levels that can be assigned to a task.')
    85       'List all the difficulty levels that can be assigned to a task.')
    80 
    86 
    81   #: A list of task types that a Task can belong to
    87   #: A list of task types that a Task can belong to
    82   task_types = db.StringListProperty(
    88   task_types = db.StringListProperty(
    83       required=True, default=['Any'],
    89       required=True, default=['Any'],
    84       verbose_name=ugettext('Task Types'))
    90       verbose_name=ugettext('Task Types'))
       
    91   task_types.group = ugettext('Task Settings')
    85   task_types.help_text = ugettext(
    92   task_types.help_text = ugettext(
    86       'List all the types a task can be in.')
    93       'List all the types a task can be in.')