[opw-web] Always allow users to view an accepted contract
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [opw-web] Always allow users to view an accepted contract
- Date: Sun, 17 May 2015 22:55:24 +0000 (UTC)
commit d08513933d5ebed9ce999f0538279dafa47b16d6
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu May 14 14:25:59 2015 -0400
Always allow users to view an accepted contract
Allow users to view contracts they previously accepted even for programs
that are no longer active.
modules/mod_contract.php | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/modules/mod_contract.php b/modules/mod_contract.php
index a264da9..c709d40 100644
--- a/modules/mod_contract.php
+++ b/modules/mod_contract.php
@@ -111,13 +111,16 @@ if ($action == 'edit_student' || $action == 'edit_mentor') {
$user->restrict($role_data['has_project']);
- $user->restrict($program_data['is_active'] &&
- $program_data['contracts_active'] &&
- $core->timestamp > $program_data['dl_mentor']);
+
+ $contract_accepted_time = $role_data['contract_accepted_time'];
+
+ $user->restrict($contract_accepted_time != 0 ||
+ ($program_data['is_active'] &&
+ $program_data['contracts_active'] &&
+ $core->timestamp > $program_data['dl_mentor']));
$is_student = $role_data['role'] == 's';
$is_mentor = $role_data['role'] == 'm';
- $contract_accepted_time = $role_data['contract_accepted_time'];
}
$has_accepted = $contract_accepted_time != 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]