Commit 8c9eecde authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Merge branch 'MDL-60682' of git://github.com/timhunt/moodle

parents 012398a8 223419d9
......@@ -221,9 +221,11 @@ class core_calendar_type_testcase extends advanced_testcase {
$counter++;
if ($element == 'dateselector') {
$el = $this->mform->addElement('date_selector', 'dateselector' . $counter, null, array('timezone' => 0.0, 'step' => 1));
$el = $this->mform->addElement('date_selector',
'dateselector' . $counter, null, array('timezone' => 0.0));
} else {
$el = $this->mform->addElement('date_time_selector', 'dateselector' . $counter, null, array('timezone' => 0.0, 'step' => 1, 'optional' => false));
$el = $this->mform->addElement('date_time_selector',
'dateselector' . $counter, null, array('timezone' => 0.0, 'optional' => false));
}
$submitvalues = array('dateselector' . $counter => $date);
......
......@@ -79,7 +79,7 @@ class MoodleQuickForm_date_selector extends MoodleQuickForm_group {
// Get the calendar type used - see MDL-18375.
$calendartype = \core_calendar\type_factory::get_calendar_instance();
$this->_options = array('startyear' => $calendartype->get_min_year(), 'stopyear' => $calendartype->get_max_year(),
'defaulttime' => 0, 'timezone' => 99, 'step' => 5, 'optional' => false);
'defaulttime' => 0, 'timezone' => 99, 'step' => 1, 'optional' => false);
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
......
......@@ -81,7 +81,7 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group {
// Get the calendar type used - see MDL-18375.
$calendartype = \core_calendar\type_factory::get_calendar_instance();
$this->_options = array('startyear' => $calendartype->get_min_year(), 'stopyear' => $calendartype->get_max_year(),
'defaulttime' => 0, 'timezone' => 99, 'step' => 5, 'optional' => false);
'defaulttime' => 0, 'timezone' => 99, 'step' => 1, 'optional' => false);
// TODO MDL-52313 Replace with the call to parent::__construct().
HTML_QuickForm_element::__construct($elementName, $elementLabel, $attributes);
......
......@@ -77,7 +77,7 @@ class MoodleQuickForm_defaultcustom extends MoodleQuickForm_group {
'startyear' => $calendartype->get_min_year(),
'stopyear' => $calendartype->get_max_year(),
'defaulttime' => 0,
'step' => 5,
'step' => 1,
'optional' => false,
];
......
......@@ -37,7 +37,7 @@ require_once($CFG->dirroot . '/mod/quiz/locallib.php');
*/
class mod_quiz_mod_form extends moodleform_mod {
/** @var array options to be used with date_time_selector fields in the quiz. */
public static $datefieldoptions = array('optional' => true, 'step' => 1);
public static $datefieldoptions = array('optional' => true);
protected $_feedbacks;
protected static $reviewfields = array(); // Initialised in the constructor.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment