mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-71163 mod_assign: Show the selected group's dates
This commit is contained in:
parent
d8a1cf696e
commit
dcbfe15f37
1 changed files with 14 additions and 0 deletions
|
@ -52,6 +52,20 @@ class dates extends activity_dates {
|
||||||
|
|
||||||
$timeopen = $this->cm->customdata['allowsubmissionsfromdate'] ?? null;
|
$timeopen = $this->cm->customdata['allowsubmissionsfromdate'] ?? null;
|
||||||
$timedue = $this->cm->customdata['duedate'] ?? 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();
|
$now = time();
|
||||||
$dates = [];
|
$dates = [];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue