# HG changeset patch # User Daniel Hans # Date 1257367064 -3600 # Node ID c491d96dce2cc5cab7e2426dcd670dea5160bd28 # Parent bd001e9ab9d42139dddc11b9f5247d2dd10a5782 Fixed 'Register as a student' link problem for GHOP program. Params and new_params in student view are also sub-merged now, so the apply pattern may be used by GHOP student view. diff -r bd001e9ab9d4 -r c491d96dce2c app/soc/modules/ghop/views/models/student.py --- a/app/soc/modules/ghop/views/models/student.py Tue Nov 03 17:07:10 2009 +0100 +++ b/app/soc/modules/ghop/views/models/student.py Wed Nov 04 21:37:44 2009 +0100 @@ -72,10 +72,11 @@ rights['edit'] = [('checkIsMyActiveRole', ghop_student_logic.logic)] rights['apply'] = [ 'checkIsUser', - ('checkIsActivePeriod', ['student_signup', 'scope_path']), + ('checkIsActivePeriod', ['student_signup', 'scope_path', + ghop_program_logic.logic]), ('checkIsNotParticipatingInProgramInScope', - [ghop_student_logic.logic, ghop_org_admin_logic.logic, - ghop_mentor_logic.logic]), + [ghop_program_logic.logic, ghop_student_logic.logic, + ghop_org_admin_logic.logic, ghop_mentor_logic.logic]), 'checkCanApply'] rights['manage'] = [('checkIsMyActiveRole', ghop_student_logic.logic)] rights['list_student_tasks'] = [('checkHasActiveRoleForScope', @@ -163,6 +164,7 @@ return result + view = View() apply = decorators.view(view.apply) diff -r bd001e9ab9d4 -r c491d96dce2c app/soc/views/models/student.py --- a/app/soc/views/models/student.py Tue Nov 03 17:07:10 2009 +0100 +++ b/app/soc/views/models/student.py Wed Nov 04 21:37:44 2009 +0100 @@ -147,7 +147,7 @@ new_params['show_in_roles_overview'] = True - params = dicts.merge(params, new_params) + params = dicts.merge(params, new_params, sub_merge=True) super(View, self).__init__(params=params)