mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-71163 mod_assign: Show the selected group's dates
This commit is contained in:
parent
9e3b2d6f47
commit
940f57d519
@ -52,6 +52,20 @@ class dates extends activity_dates {
|
||||
|
||||
$timeopen = $this->cm->customdata['allowsubmissionsfromdate'] ?? null;
|
||||
$timedue = $this->cm->customdata['duedate'] ?? null;
|
||||
|
||||
$activitygroup = groups_get_activity_group($this->cm, true);
|
||||
if ($activitygroup) {
|
||||
if ($assign->can_view_grades()) {
|
||||
$groupoverride = \cache::make('mod_assign', 'overrides')->get("{$this->cm->instance}_g_{$activitygroup}");
|
||||
if (!empty($groupoverride->allowsubmissionsfromdate)) {
|
||||
$timeopen = $groupoverride->allowsubmissionsfromdate;
|
||||
}
|
||||
if (!empty($groupoverride->duedate)) {
|
||||
$timedue = $groupoverride->duedate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$now = time();
|
||||
$dates = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user