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:
@@ -368,6 +368,15 @@
|
||||
}
|
||||
|
||||
|
||||
//if data activity closed dont let students in
|
||||
if (!has_capability('mod/data:manageentries', $context)) {
|
||||
$timenow = time();
|
||||
if (!empty($data->timeavailablefrom) && $data->timeavailablefrom > $timenow) {
|
||||
print_error('notopenyet', 'data', null, userdate($data->timeavailablefrom));
|
||||
} else if (!empty($data->timeavailableto) && $timenow > $data->timeavailableto) {
|
||||
print_error('expired', 'data', null, userdate($data->timeavailableto));
|
||||
}
|
||||
}
|
||||
|
||||
/// Print the tabs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user