mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +02:00
data MDL-23488 made database activity respect availability and visibility dates
AMOS BEGIN CPY [expired,mod_choice],[expired,mod_data] CPY [notopenyet,mod_choice],[notopenyet,mod_data] AMOS END
This commit is contained in:
parent
eb8d85c1d3
commit
2742ffe7c9
3 changed files with 17 additions and 0 deletions
|
@ -1946,6 +1946,12 @@ function data_user_can_add_entry($data, $currentgroup, $groupmode) {
|
|||
return false;
|
||||
}
|
||||
|
||||
//if in the view only time window
|
||||
$now = time();
|
||||
if ($now>$data->timeviewfrom && $now<$data->timeviewto) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$groupmode or has_capability('moodle/site:accessallgroups', $context)) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue