blob: b5d9e35726c6ae0ddb261bb839cf28fc6e1eb111 [file] [log] [blame]
#!/usr/bin/env python2.5
# Copyright 2009 the Melange authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
"""This module contains the GCI specific Program Model.
from google.appengine.ext import db
from django.utils.translation import ugettext
import soc.models.program
class GCIProgramMessages(soc.models.program.ProgramMessages):
"""The GCIProgramMessages model.
class GCIProgram(soc.models.program.Program):
"""GCI Program model extends the basic Program model.
_messages_model = GCIProgramMessages
homepage_url_name = "gci_homepage"
#: Required property containing the number of Tasks Students can work
#: on simultaneously. For GCI it is 1
nr_simultaneous_tasks = db.IntegerProperty(
required=True, default=1,
verbose_name=ugettext('Simultaneous tasks')) = ugettext('Contest')
nr_simultaneous_tasks.help_text = ugettext(
'Number of tasks students can work on simultaneously in the program.')
#: Required property containing the number of winners to be selected in
#: the program. Defaults to 10
nr_winners = db.IntegerProperty(
required=True, default=10,
verbose_name=ugettext('Number of winners')) = ugettext('Contest')
nr_winners.help_text = ugettext(
'Number of winners to be selected at the end of the program.')
#: A list of task types that a Task can belong to
task_types = db.StringListProperty(
required=True, default=['Any'],
verbose_name=ugettext('Task Types')) = ugettext('Task Types')
task_types.help_text = ugettext(
'List all the types a task can be in.')
#: Document reference property used for the Student Agreement
terms_and_conditions = db.ReferenceProperty(
verbose_name=ugettext('Terms and Conditions'),
terms_and_conditions.help_text = ugettext(
'Document containing Terms and Conditions for participants.')
#: An URL to a page with example tasks so that students can get
#: some intuition about the types of tasks in the program
example_tasks = db.LinkProperty(
required=False, verbose_name=ugettext('Example tasks'))
example_tasks.help_text = ugettext(
'URL to a page with example tasks.')
#: URL to a page that contains the form translations.
form_translations_url = db.LinkProperty(
required=False, verbose_name=ugettext('Form translation URL'))
form_translations_url.help_text = ugettext(
'URL to the page containing translations of the forms students '
'should upload.')