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.
--- 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)
--- 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)