MDL-36095 Section availability: Make behaviour consistent with activities
This commit is contained in:
@@ -71,11 +71,19 @@ class editsection_form extends moodleform {
|
||||
$mform->addHelpButton('groupingid', 'groupingsection', 'group');
|
||||
}
|
||||
|
||||
// Date and time conditions
|
||||
// Available from/to defaults to midnight because then the display
|
||||
// will be nicer where it tells users when they can access it (it
|
||||
// shows only the date and not time).
|
||||
$date = usergetdate(time());
|
||||
$midnight = make_timestamp($date['year'], $date['mon'], $date['mday']);
|
||||
|
||||
// Date and time conditions.
|
||||
$mform->addElement('date_time_selector', 'availablefrom',
|
||||
get_string('availablefrom', 'condition'), array('optional' => true));
|
||||
get_string('availablefrom', 'condition'),
|
||||
array('optional' => true, 'defaulttime' => $midnight));
|
||||
$mform->addElement('date_time_selector', 'availableuntil',
|
||||
get_string('availableuntil', 'condition'), array('optional' => true));
|
||||
get_string('availableuntil', 'condition'),
|
||||
array('optional' => true, 'defaulttime' => $midnight));
|
||||
|
||||
// Conditions based on grades
|
||||
$gradeoptions = array();
|
||||
|
||||
Reference in New Issue
Block a user