Skip to content

Commit 3fd8d50

Browse files
committed
allow bug selection if the group deadline hasn't expired
1 parent 46df538 commit 3fd8d50

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pages/bugs.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@
1313
$deadlines = db_fetch_deadline($year);
1414
$deadline = $deadlines->bug_selection;
1515

16+
if ($group !== null)
17+
$deadline = $deadline > $group->allow_modifications_date
18+
? $deadline : $group->allow_modifications_date;
19+
1620
if (auth_at_least(ROLE_TA)) {
1721
$groups = filter_by(['group', 'year', 'shift', 'own_shifts', 'repo']);
1822
} else {
1923
$groups = $user->groups;
2024
}
2125

22-
if ($user->role == ROLE_STUDENT && $deadlines->isBugSelectionActive()) {
26+
if ($user->role == ROLE_STUDENT && is_deadline_current($deadline)) {
2327
$info_message = "You can submit this form multiple times until the deadline.".
2428
" Only the last submission will be considered.";
2529

0 commit comments

Comments
 (0)