Moved the GHOP module into the modules package.
This also includes moving the templates and content into their respective place inside the Soc folder. This is to avoid adding every folder to the app.yaml file.
Patch by: Madhusudan C.S. and Lennard de Rijk
Reviewed by: Lennard de Rijk
--- a/app/app.yaml.template Fri Jun 05 08:24:32 2009 +0200
+++ b/app/app.yaml.template Fri Jun 05 21:27:03 2009 +0200
@@ -37,9 +37,6 @@
- url: /gsoc/content
static_dir: gsoc/content
-- url: /ghop/content
- static_dir: ghop/content
-
- url: /jquery
static_dir: jquery
--- a/app/ghop/content/css/ghop.css Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-Copyright 2008 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
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
- */
-
-body {
- font-family: Verdana, Helvetica, sans-serif;
- background-color: #DDDD00;
-}
-
-td.formfieldrequired {
- font-style: italic;
-}
-
-td.formfieldhelptext {
- font-style: italic;
-}
-
-td.formfielderror {
- color: #FF0000;
-}
-
-td.formfieldheading {
- font-weight: bold;
-}
Binary file app/ghop/content/images/ghop.jpg has changed
--- a/app/ghop/models/comment.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP specific Comment Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext
-
-import soc.models.comment
-
-
-class GHOPComment(soc.models.comment.Comment):
- """GHOP Comment model for tasks, extends the basic Comment model.
- """
-
- #: Property containing the human readable string that should be
- #: shown for the comment when something in the task changes,
- #: code.google.com issue tracker style
- change_in_task = db.StringProperty(required=True,
- verbose_name=ugettext('Changes in the task'))
--- a/app/ghop/models/mentor.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP specific Mentor Model.
-"""
-
-__authors__ = [
- '"Lennard de Rijk" <ljvderijk@gmail.com>',
-]
-
-
-import soc.models.mentor
-
-
-class GHOPMentor(soc.models.mentor.Mentor):
- """GHOP Mentor model extends the basic Mentor model.
- """
-
- pass
--- a/app/ghop/models/org_admin.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP specific Org Admin Model.
-"""
-
-__authors__ = [
- '"Lennard de Rijk" <ljvderijk@gmail.com>',
-]
-
-
-import soc.models.org_admin
-
-
-class GHOPOrgAdmin(soc.models.org_admin.OrgAdmin):
- """GHOP Org Admin model extends the basic Org Admin model.
- """
-
- pass
--- a/app/ghop/models/org_prize_assignment.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP PrizePerOrg Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-import soc.models.base
-
-import ghop.models.organization
-import ghop.models.program
-
-
-class GHOPOrgPrizeAssignment(soc.models.base.ModelWithFieldAttributes):
- """Model for prizes assigned to Students by an Organization.
- """
-
- #: Program to which these winners belong to
- program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
- required=True,
- collection_name='program_prizes')
-
- #: Organization to which these winners belong to
- org = db.ReferenceProperty(
- reference_class=ghop.models.organization.GHOPOrganization,
- required=True, collection_name='organization_prizes')
-
- #: Ordered list of winners(reference to Student entities) for the given
- #: organization under the specified program
- winners = db.ListProperty(item_type=db.Key, default=[])
-
- #: Unordered list of runner-ups(reference to Student entities) for the given
- #: organization under the specified program
- runner_ups = db.ListProperty(item_type=db.Key, default=[])
--- a/app/ghop/models/organization.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP specific Organization Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-import soc.models.organization
-
-
-class GHOPOrganization(soc.models.organization.Organization):
- """GHOP Organization model extends the basic Organization model.
- """
-
- #: Property that stores the amount of tasks the organization can publish.
- task_quota_limit = db.IntegerProperty(required=False, default=0)
--- a/app/ghop/models/program.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP specific Program Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext
-
-import soc.models.program
-
-
-class GHOPProgram(soc.models.program.Program):
- """GHOP Program model extends the basic Program model.
- """
-
- #: Property that contains the latest date of birth before which a Student
- #: can participate
- student_min_age = db.DateTimeProperty(required=False)
- student_min_age.help_text = ugettext(
- 'Minimum age of the student to sign-up. Given by the latest birthdate allowed')
-
- #: Required property containing the number of Tasks Students can work
- #: on simultaneously. For GHOP it is 1
- nr_simultaneous_tasks = db.IntegerProperty(
- required=True, default=1,
- verbose_name=ugettext('Simultaneous tasks'))
- nr_simultaneous_tasks.help_text = ugettext(
- 'Number of tasks students can work on simultaneously in the program.')
-
- #: Property containing the number of winners per Organization
- nr_winners = db.IntegerProperty(
- required=True, default=0,
- verbose_name=ugettext('Winners per organization'))
- nr_winners.help_text = ugettext(
- 'Number of winners an organization can announce.')
-
- #: Property containing the number of runner ups per Organization
- nr_runnerups = db.IntegerProperty(
- required=True, default=0,
- verbose_name=ugettext('Runner-ups per organization'))
- nr_runnerups.help_text = ugettext(
- 'Number of runner-ups an organization can announce.')
-
- #: A list of difficulty levels that can be assigned for each Task created
- task_difficulties = db.StringListProperty(
- required=True, default=[''],
- verbose_name=ugettext('Difficulty levels'))
- task_difficulties.help_text = ugettext(
- 'List all the difficulty levels that can be assigned to a task.')
-
- #: A list of task types that a Task can belong to
- task_types = db.StringListProperty(
- required=True, default=['Any'],
- verbose_name=ugettext('Task Types'))
- task_rypes.help_text = ugettext(
- 'List all the types a task can be in.')
--- a/app/ghop/models/task.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP Task Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
- '"Lennard de Rijk" <ljvderijk@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext
-
-import soc.models.linkable
-import soc.models.role
-import soc.models.student
-import soc.models.user
-
-import ghop.models.program
-
-
-class GHOPTask(soc.models.linkable.Linkable):
- """Model for a task used in GHOP workflow.
-
- The scope property of Linkable will be set to the Organization to which
- this task belongs to. A link_id will be generated automatically and will
- have no specific meaning other than identification.
- """
-
- #: Required field indicating the "title" of the task
- title = db.StringProperty(required=True,
- verbose_name=ugettext('Title'))
- title.help_text = ugettext('Title of the task')
-
- #: Required field containing the description of the task
- description = db.TextProperty(required=True,
- verbose_name=ugettext('Description'))
- description.help_text = ugettext('Complete description of the task')
-
- #: Field indicating the difficulty level of the Task. This is not
- #: mandatory so the it can be assigned at any later stage.
- #: The options are configured by a Program Admin.
- difficulty = db.StringProperty(required=False,
- verbose_name=ugettext('Difficulty'))
- difficulty.help_text = ugettext('Difficulty Level of the task')
-
- #: Required field which contains the type of the task. These types are
- #: configured by a Program Admin.
- type = db.StringListProperty(required=True,
- verbose_name=ugettext('Task Type'))
- type.help_text = ugettext('Type of the task')
-
- #: A field which contains time allowed for completing the task (in hours)
- #: from the moment that this task has been assigned to a Student
- time_to_complete = db.IntegerProperty(required=True,
- verbose_name=('Time to Complete'))
- time_to_complete.help_text = ugettext(
- 'Time allowed to complete the task, in hours, once it is claimed')
-
- #: List of Mentors assigned to this task. A Mentor who creates this
- #: task is assigned as the Mentor by default. An Org Admin will have
- #: to assign a Mentor upon task creation.
- mentors = db.ListProperty(item_type=db.Key, default=[])
-
- #: User profile to whom this task has been claimed by. This field
- #: is mandatory for claimed tasks
- user = db.ReferenceProperty(reference_class=soc.models.user.User,
- required=False,
- collection_name='assigned_tasks')
-
- #: Student profile to whom this task is currently assigned to. If the user
- #: has registered as a Student than this field will be filled in. This field
- #: is mandatory for all Tasks in the closed state.
- student = db.ReferenceProperty(reference_class=soc.models.student.Student,
- required=False,
- collection_name='assigned_tasks')
-
- #: Program in which this Task has been created
- program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
- required=True,
- collection_name='tasks')
-
- #: Required property which holds the state, the Task is currently in.
- #: This is a hidden field not shown on forms. Handled by logic internally.
- #: The state can be one of the following:
- #: unapproved: If Task is created by a Mentor, this is the automatically
- #: assigned state.
- #: unpublished: This Task is not published yet.
- #: open: This Task is open and ready to be claimed.
- #: reopened: This Task has been claimed but never finished and has been
- #: reopened.
- #: claim_requested: A Student has requested to claim this task.
- #: claimed: This Task has been claimed and someone is working on it.
- #: action_needed: Work on this Task must be submitted for review within
- #: 24 hours.
- #: closed: Work on this Task has been completed to the org's content.
- #: awaiting_registration: Student has completed work on this task, but
- #: needs to complete Student registration before this task is closed.
- #: needs_work: This work on this Tasks needs a bit more brushing up. This
- #: state is followed by a Mentor review.
- #: needs_review: Student has submitted work for this task and it should
- #: be reviewed by a Mentor.
- status = db.StringProperty(
- required=True, verbose_name=ugettext('Status'),
- choices=['unapproved', 'unpublished', 'open', 'reopened',
- 'claim_requested', 'claimed', 'action_needed',
- 'closed', 'awaiting_registration', 'needs_work',
- 'needs_review'],
- default='unapproved')
-
- #: A field which indicates if the Task was ever in the Reopened state.
- #: True indicates that its state was Reopened once, false indicated that it
- #: has never been in the Reopened state.
- was_reopened = db.BooleanProperty(default=False,
- verbose_name=ugettext('Has been reopened'))
-
- #: This field is set to the next deadline that will have consequences for
- #: this Task. For instance this will store a DateTime property which will
- #: tell when this Task should be completed.
- deadline = db.DateTimeProperty(required=False,
- verbose_name=ugettext('Deadline'))
-
- #: Required field containing the Mentor/Org Admin who created this task
- created_by = db.ReferenceProperty(reference_class=soc.models.role.Role,
- required=True,
- collection_name='created_tasks',
- verbose_name=ugettext('Created by'))
-
- #: Date when the proposal was created
- created_on = db.DateTimeProperty(required=True, auto_now_add=True,
- verbose_name=ugettext('Created on'))
-
- #: Required field containing the Mentor/Org Admin who last edited this
- #: task. It changes only when Mentor/Org Admin changes title, description,
- #: difficulty, type, time_to_complete.
- modified_by = db.ReferenceProperty(reference_class=soc.models.role.Role,
- required=True,
- collection_name='edited_tasks',
- verbose_name=ugettext('Modified by'))
-
- #: Date when the proposal was last modified, should be set manually on edit
- modified_on = db.DateTimeProperty(required=True, auto_now_add=True,
- verbose_name=ugettext('Modified on'))
-
- #: A field which holds the entire history of this task in JSON. The
- #: structure of this JSON string is as follows:
- #: {
- #: timestamp1: {
- #: "user": User reference
- #: "student": Student reference
- #: ...
- #: "state": "Unapproved"
- #: ...
- #: "edited_by": Role reference
- #:
- #: }
- #: timestamp2: {
- #: "state": "Unpublished"
- #: }
- #: }
- #: First dictionary item holds the values for all the properties in this
- #: model. The subsequent items hold the properties that changed at the
- #: timestamp given by the key.
- #: Reference properties will be stored by calling str() on their Key.
- history = db.TextProperty(required=True, default='')
--- a/app/ghop/models/timeline.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP specific Timeline Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext
-
-import soc.models.timeline
-
-
-class GHOPTimeline(soc.models.timeline.Timeline):
- """GHOP Timeline model extends the basic Timeline model. It implements
- the GHOP specific timeline entries.
- """
-
- task_claim_deadline = db.DateTimeProperty(
- verbose_name=ugettext('Task Claim Deadline date'))
- task_claim_deadline.help_text = ugettext(
- 'No tasks can be claimed after this date.'
- 'Work on claimed tasks can continue.')
-
- stop_all_work = db.DateTimeProperty(
- verbose_name=ugettext('Work Submission Deadline date'))
- stop_all_work.help_text = ugettext(
- 'All work must stop by this date.')
-
- winner_selection_start = db.DateTimeProperty(
- verbose_name=ugettext('Winner Selection Start date'))
- winner_selection_start.help_text = ugettext(
- 'Organizations start choosing their winners.')
-
- winner_selection_end = db.DateTimeProperty(
- verbose_name=ugettext('Winner Selection End date'))
- winner_selection_end.help_text = ugettext(
- 'Organizations must have completed choosing their winners.')
-
- winner_announcement = db.DateTimeProperty(
- verbose_name=ugettext('Winner Announcement date'))
- winner_announcement.help_text = ugettext(
- 'All winners are announced.')
-
--- a/app/ghop/models/work_submission.py Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-#!/usr/bin/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
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This module contains the GHOP WorkSubmission Model.
-"""
-
-__authors__ = [
- '"Madhusudan.C.S" <madhusudancs@gmail.com>',
- '"Lennard de Rijk" <ljvderijk@gmail.com>',
-]
-
-
-from google.appengine.ext import db
-
-from django.utils.translation import ugettext
-
-import soc.models.linkable
-import soc.models.user
-
-import ghop.models.program
-import ghop.models.task
-
-
-class GHOPWorkSubmission(soc.models.linkable.Linkable):
- """Model for work submissions for a task by students.
-
- Scope will be set to the Organization to which this work has been submitted.
- """
-
- #: Task to which this work was submitted
- task = db.ReferenceProperty(reference_class=ghop.models.task.GHOPTask,
- required=True,
- collection_name='work_submissions')
-
- #: User who submitted this work
- user = db.ReferenceProperty(reference_class=soc.models.user.User,
- required=True,
- collection_name='work_submissions')
-
- #: Program to which this work belongs to
- program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
- required=True,
- collection_name='work_submissions')
-
- #: Property allowing you to store information about your work
- information = db.TextProperty(
- required=True, verbose_name=ugettext('Info'))
- information.help_text = ugettext(
- 'Information about the work you submit for this task')
-
- #: Property containing an URL to this work or more information about it
- url_to_work = db.LinkProperty(
- required=False, verbose_name=ugettext('URL to your Work'))
- url_to_work.help_text = ugettext(
- 'URL to a resource containing your work or more information about it')
-
- #: Property containing the date when the work was submitted
- submitted_on = db.DateTimeProperty(required=True, auto_now_add=True,
- verbose_name=ugettext('Submitted on'))
--- a/app/ghop/templates/ghop/person/profile/edit.html Fri Jun 05 08:24:32 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-{% extends 'soc/person/profile/edit.html' %}
-{% comment %}
-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
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-{% endcomment %}
-{% block 'stylesheet' %}
-<link rel="stylesheet" type="text/css" href="/ghop/content/css/ghop.css" />
-{% endblock %}
-{% block 'logo' %}
-<img src="/ghop/content/images/ghop.jpg" alt="GHOP" />
-{% endblock %}
-{% block 'greeting' %}
-Welcome, {{link_name}} ({{user.nickname}}).
-{% endblock %}
-{% block 'instructions' %}
-Please update your profile for the {{program}} program:
-{% endblock %}
--- a/app/settings.py Fri Jun 05 08:24:32 2009 +0200
+++ b/app/settings.py Fri Jun 05 21:27:03 2009 +0200
@@ -97,7 +97,6 @@
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DIRS = (
# TODO(proto): customize the template search directories
- os.path.join(ROOT_PATH, 'ghop', 'templates'),
os.path.join(ROOT_PATH, 'gsoc', 'templates'),
os.path.join(ROOT_PATH, 'soc', 'templates'),
os.path.join(ROOT_PATH, 'shell', 'templates'),
@@ -112,4 +111,4 @@
)
MODULE_FMT = 'soc.modules.%s'
-MODULES = []
+MODULES = ['ghop']
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/content/modules/ghop/css/ghop.css Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,36 @@
+/*
+Copyright 2008 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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+ */
+
+body {
+ font-family: Verdana, Helvetica, sans-serif;
+ background-color: #DDDD00;
+}
+
+td.formfieldrequired {
+ font-style: italic;
+}
+
+td.formfieldhelptext {
+ font-style: italic;
+}
+
+td.formfielderror {
+ color: #FF0000;
+}
+
+td.formfieldheading {
+ font-weight: bold;
+}
Binary file app/soc/content/modules/ghop/images/ghop.jpg has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/__init__.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,29 @@
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This is the main modules module.
+"""
+
+__authors__ = [
+ '"Sverre Rabbelier" <sverre@rabbelier.nl>',
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
+ ]
+
+
+
+from soc.modules.ghop import callback
+
+def getCallback():
+ return callback.Callback
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/callback.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,47 @@
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Module containing the GHOP Callback.
+"""
+
+__authors__ = [
+ '"Madhusudan C.S." <madhusudancs@gmail.com>',
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
+ ]
+
+
+class Callback(object):
+ """Callback object that handles interaction between the core.
+ """
+
+ API_VERSION = 1
+
+ def __init__(self, core):
+ """Initializes a new Callback object for the specified core.
+ """
+
+ self.core = core
+
+ def registerWithSitemap(self):
+ """Called by the server when sitemap entries should be registered.
+ """
+
+ self.core.requireUniqueService('registerWithSitemap')
+
+ def registerWithSidebar(self):
+ """Called by the server when sidebar entries should be registered.
+ """
+
+ # require that we had the chance to register the urls we need with the sitemap
+ self.core.requireUniqueService('registerWithSidebar')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/comment.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,40 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP specific Comment Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+from django.utils.translation import ugettext
+
+import soc.models.comment
+
+
+class GHOPComment(soc.models.comment.Comment):
+ """GHOP Comment model for tasks, extends the basic Comment model.
+ """
+
+ #: Property containing the human readable string that should be
+ #: shown for the comment when something in the task changes,
+ #: code.google.com issue tracker style
+ change_in_task = db.StringProperty(required=True,
+ verbose_name=ugettext('Changes in the task'))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/mentor.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,32 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP specific Mentor Model.
+"""
+
+__authors__ = [
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
+]
+
+
+import soc.models.mentor
+
+
+class GHOPMentor(soc.models.mentor.Mentor):
+ """GHOP Mentor model extends the basic Mentor model.
+ """
+
+ pass
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/org_admin.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,32 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP specific Org Admin Model.
+"""
+
+__authors__ = [
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
+]
+
+
+import soc.models.org_admin
+
+
+class GHOPOrgAdmin(soc.models.org_admin.OrgAdmin):
+ """GHOP Org Admin model extends the basic Org Admin model.
+ """
+
+ pass
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/org_prize_assignment.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,53 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP OrgPrizeAssignment Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+import soc.models.base
+
+import ghop.models.organization
+import ghop.models.program
+
+
+class GHOPOrgPrizeAssignment(soc.models.base.ModelWithFieldAttributes):
+ """Model for prizes assigned to Students by an Organization.
+ """
+
+ #: Program to which these winners belong to
+ program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
+ required=True,
+ collection_name='program_prizes')
+
+ #: Organization to which these winners belong to
+ org = db.ReferenceProperty(
+ reference_class=ghop.models.organization.GHOPOrganization,
+ required=True, collection_name='organization_prizes')
+
+ #: Ordered list of winners(reference to Student entities) for the given
+ #: organization under the specified program
+ winners = db.ListProperty(item_type=db.Key, default=[])
+
+ #: Unordered list of runner-ups(reference to Student entities) for the given
+ #: organization under the specified program
+ runner_ups = db.ListProperty(item_type=db.Key, default=[])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/organization.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,35 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP specific Organization Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+import soc.models.organization
+
+
+class GHOPOrganization(soc.models.organization.Organization):
+ """GHOP Organization model extends the basic Organization model.
+ """
+
+ #: Property that stores the amount of tasks the organization can publish.
+ task_quota_limit = db.IntegerProperty(required=False, default=0)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/program.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,76 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP specific Program Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+from django.utils.translation import ugettext
+
+import soc.models.program
+
+
+class GHOPProgram(soc.models.program.Program):
+ """GHOP Program model extends the basic Program model.
+ """
+
+ #: Property that contains the latest date of birth before which a Student
+ #: can participate
+ student_min_age = db.DateTimeProperty(required=False)
+ student_min_age.help_text = ugettext(
+ 'Minimum age of the student to sign-up. Given by the latest birthdate allowed')
+
+ #: Required property containing the number of Tasks Students can work
+ #: on simultaneously. For GHOP it is 1
+ nr_simultaneous_tasks = db.IntegerProperty(
+ required=True, default=1,
+ verbose_name=ugettext('Simultaneous tasks'))
+ nr_simultaneous_tasks.help_text = ugettext(
+ 'Number of tasks students can work on simultaneously in the program.')
+
+ #: Property containing the number of winners per Organization
+ nr_winners = db.IntegerProperty(
+ required=True, default=0,
+ verbose_name=ugettext('Winners per organization'))
+ nr_winners.help_text = ugettext(
+ 'Number of winners an organization can announce.')
+
+ #: Property containing the number of runner ups per Organization
+ nr_runnerups = db.IntegerProperty(
+ required=True, default=0,
+ verbose_name=ugettext('Runner-ups per organization'))
+ nr_runnerups.help_text = ugettext(
+ 'Number of runner-ups an organization can announce.')
+
+ #: A list of difficulty levels that can be assigned for each Task created
+ task_difficulties = db.StringListProperty(
+ required=True, default=[''],
+ verbose_name=ugettext('Difficulty levels'))
+ task_difficulties.help_text = ugettext(
+ 'List all the difficulty levels that can be assigned to a task.')
+
+ #: A list of task types that a Task can belong to
+ task_types = db.StringListProperty(
+ required=True, default=['Any'],
+ verbose_name=ugettext('Task Types'))
+ task_types.help_text = ugettext(
+ 'List all the types a task can be in.')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/task.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,181 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP Task Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+from django.utils.translation import ugettext
+
+import soc.models.linkable
+import soc.models.role
+import soc.models.student
+import soc.models.user
+
+import ghop.models.program
+
+
+class GHOPTask(soc.models.linkable.Linkable):
+ """Model for a task used in GHOP workflow.
+
+ The scope property of Linkable will be set to the Organization to which
+ this task belongs to. A link_id will be generated automatically and will
+ have no specific meaning other than identification.
+ """
+
+ #: Required field indicating the "title" of the task
+ title = db.StringProperty(required=True,
+ verbose_name=ugettext('Title'))
+ title.help_text = ugettext('Title of the task')
+
+ #: Required field containing the description of the task
+ description = db.TextProperty(required=True,
+ verbose_name=ugettext('Description'))
+ description.help_text = ugettext('Complete description of the task')
+
+ #: Field indicating the difficulty level of the Task. This is not
+ #: mandatory so the it can be assigned at any later stage.
+ #: The options are configured by a Program Admin.
+ difficulty = db.StringProperty(required=False,
+ verbose_name=ugettext('Difficulty'))
+ difficulty.help_text = ugettext('Difficulty Level of the task')
+
+ #: Required field which contains the type of the task. These types are
+ #: configured by a Program Admin.
+ type = db.StringListProperty(required=True,
+ verbose_name=ugettext('Task Type'))
+ type.help_text = ugettext('Type of the task')
+
+ #: A field which contains time allowed for completing the task (in hours)
+ #: from the moment that this task has been assigned to a Student
+ time_to_complete = db.IntegerProperty(required=True,
+ verbose_name=('Time to Complete'))
+ time_to_complete.help_text = ugettext(
+ 'Time allowed to complete the task, in hours, once it is claimed')
+
+ #: List of Mentors assigned to this task. A Mentor who creates this
+ #: task is assigned as the Mentor by default. An Org Admin will have
+ #: to assign a Mentor upon task creation.
+ mentors = db.ListProperty(item_type=db.Key, default=[])
+
+ #: User profile to whom this task has been claimed by. This field
+ #: is mandatory for claimed tasks
+ user = db.ReferenceProperty(reference_class=soc.models.user.User,
+ required=False,
+ collection_name='assigned_tasks')
+
+ #: Student profile to whom this task is currently assigned to. If the user
+ #: has registered as a Student than this field will be filled in. This field
+ #: is mandatory for all Tasks in the closed state.
+ student = db.ReferenceProperty(reference_class=soc.models.student.Student,
+ required=False,
+ collection_name='assigned_tasks')
+
+ #: Program in which this Task has been created
+ program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
+ required=True,
+ collection_name='tasks')
+
+ #: Required property which holds the state, the Task is currently in.
+ #: This is a hidden field not shown on forms. Handled by logic internally.
+ #: The state can be one of the following:
+ #: unapproved: If Task is created by a Mentor, this is the automatically
+ #: assigned state.
+ #: unpublished: This Task is not published yet.
+ #: open: This Task is open and ready to be claimed.
+ #: reopened: This Task has been claimed but never finished and has been
+ #: reopened.
+ #: claim_requested: A Student has requested to claim this task.
+ #: claimed: This Task has been claimed and someone is working on it.
+ #: action_needed: Work on this Task must be submitted for review within
+ #: 24 hours.
+ #: closed: Work on this Task has been completed to the org's content.
+ #: awaiting_registration: Student has completed work on this task, but
+ #: needs to complete Student registration before this task is closed.
+ #: needs_work: This work on this Tasks needs a bit more brushing up. This
+ #: state is followed by a Mentor review.
+ #: needs_review: Student has submitted work for this task and it should
+ #: be reviewed by a Mentor.
+ status = db.StringProperty(
+ required=True, verbose_name=ugettext('Status'),
+ choices=['unapproved', 'unpublished', 'open', 'reopened',
+ 'claim_requested', 'claimed', 'action_needed',
+ 'closed', 'awaiting_registration', 'needs_work',
+ 'needs_review'],
+ default='unapproved')
+
+ #: A field which indicates if the Task was ever in the Reopened state.
+ #: True indicates that its state was Reopened once, false indicated that it
+ #: has never been in the Reopened state.
+ was_reopened = db.BooleanProperty(default=False,
+ verbose_name=ugettext('Has been reopened'))
+
+ #: This field is set to the next deadline that will have consequences for
+ #: this Task. For instance this will store a DateTime property which will
+ #: tell when this Task should be completed.
+ deadline = db.DateTimeProperty(required=False,
+ verbose_name=ugettext('Deadline'))
+
+ #: Required field containing the Mentor/Org Admin who created this task
+ created_by = db.ReferenceProperty(reference_class=soc.models.role.Role,
+ required=True,
+ collection_name='created_tasks',
+ verbose_name=ugettext('Created by'))
+
+ #: Date when the proposal was created
+ created_on = db.DateTimeProperty(required=True, auto_now_add=True,
+ verbose_name=ugettext('Created on'))
+
+ #: Required field containing the Mentor/Org Admin who last edited this
+ #: task. It changes only when Mentor/Org Admin changes title, description,
+ #: difficulty, type, time_to_complete.
+ modified_by = db.ReferenceProperty(reference_class=soc.models.role.Role,
+ required=True,
+ collection_name='edited_tasks',
+ verbose_name=ugettext('Modified by'))
+
+ #: Date when the proposal was last modified, should be set manually on edit
+ modified_on = db.DateTimeProperty(required=True, auto_now_add=True,
+ verbose_name=ugettext('Modified on'))
+
+ #: A field which holds the entire history of this task in JSON. The
+ #: structure of this JSON string is as follows:
+ #: {
+ #: timestamp1: {
+ #: "user": User reference
+ #: "student": Student reference
+ #: ...
+ #: "state": "Unapproved"
+ #: ...
+ #: "edited_by": Role reference
+ #:
+ #: }
+ #: timestamp2: {
+ #: "state": "Unpublished"
+ #: }
+ #: }
+ #: First dictionary item holds the values for all the properties in this
+ #: model. The subsequent items hold the properties that changed at the
+ #: timestamp given by the key.
+ #: Reference properties will be stored by calling str() on their Key.
+ history = db.TextProperty(required=True, default='')
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/timeline.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,62 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP specific Timeline Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+from django.utils.translation import ugettext
+
+import soc.models.timeline
+
+
+class GHOPTimeline(soc.models.timeline.Timeline):
+ """GHOP Timeline model extends the basic Timeline model. It implements
+ the GHOP specific timeline entries.
+ """
+
+ task_claim_deadline = db.DateTimeProperty(
+ verbose_name=ugettext('Task Claim Deadline date'))
+ task_claim_deadline.help_text = ugettext(
+ 'No tasks can be claimed after this date.'
+ 'Work on claimed tasks can continue.')
+
+ stop_all_work = db.DateTimeProperty(
+ verbose_name=ugettext('Work Submission Deadline date'))
+ stop_all_work.help_text = ugettext(
+ 'All work must stop by this date.')
+
+ winner_selection_start = db.DateTimeProperty(
+ verbose_name=ugettext('Winner Selection Start date'))
+ winner_selection_start.help_text = ugettext(
+ 'Organizations start choosing their winners.')
+
+ winner_selection_end = db.DateTimeProperty(
+ verbose_name=ugettext('Winner Selection End date'))
+ winner_selection_end.help_text = ugettext(
+ 'Organizations must have completed choosing their winners.')
+
+ winner_announcement = db.DateTimeProperty(
+ verbose_name=ugettext('Winner Announcement date'))
+ winner_announcement.help_text = ugettext(
+ 'All winners are announced.')
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/modules/ghop/models/work_submission.py Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,72 @@
+#!/usr/bin/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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""This module contains the GHOP WorkSubmission Model.
+"""
+
+__authors__ = [
+ '"Madhusudan.C.S" <madhusudancs@gmail.com>',
+ '"Lennard de Rijk" <ljvderijk@gmail.com>',
+]
+
+
+from google.appengine.ext import db
+
+from django.utils.translation import ugettext
+
+import soc.models.linkable
+import soc.models.user
+
+import ghop.models.program
+import ghop.models.task
+
+
+class GHOPWorkSubmission(soc.models.linkable.Linkable):
+ """Model for work submissions for a task by students.
+
+ Scope will be set to the Organization to which this work has been submitted.
+ """
+
+ #: Task to which this work was submitted
+ task = db.ReferenceProperty(reference_class=ghop.models.task.GHOPTask,
+ required=True,
+ collection_name='work_submissions')
+
+ #: User who submitted this work
+ user = db.ReferenceProperty(reference_class=soc.models.user.User,
+ required=True,
+ collection_name='work_submissions')
+
+ #: Program to which this work belongs to
+ program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
+ required=True,
+ collection_name='work_submissions')
+
+ #: Property allowing you to store information about your work
+ information = db.TextProperty(
+ required=True, verbose_name=ugettext('Info'))
+ information.help_text = ugettext(
+ 'Information about the work you submit for this task')
+
+ #: Property containing an URL to this work or more information about it
+ url_to_work = db.LinkProperty(
+ required=False, verbose_name=ugettext('URL to your Work'))
+ url_to_work.help_text = ugettext(
+ 'URL to a resource containing your work or more information about it')
+
+ #: Property containing the date when the work was submitted
+ submitted_on = db.DateTimeProperty(required=True, auto_now_add=True,
+ verbose_name=ugettext('Submitted on'))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/soc/templates/modules/ghop/person/profile/edit.html Fri Jun 05 21:27:03 2009 +0200
@@ -0,0 +1,26 @@
+{% extends 'soc/person/profile/edit.html' %}
+{% comment %}
+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
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+{% block 'stylesheet' %}
+<link rel="stylesheet" type="text/css" href="/ghop/content/css/ghop.css" />
+{% endblock %}
+{% block 'logo' %}
+<img src="/ghop/content/images/ghop.jpg" alt="GHOP" />
+{% endblock %}
+{% block 'greeting' %}
+Welcome, {{link_name}} ({{user.nickname}}).
+{% endblock %}
+{% block 'instructions' %}
+Please update your profile for the {{program}} program:
+{% endblock %}