-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
2.4.5
-
MOODLE_24_STABLE
In the database activity the "available from" and "read only from" admin settings only allow you to input a date, which differs from most Moodle restriction fields as there are no settings to specify a time within that date - which means that the restriction occurs at midnight rather than being able to choose a time.
I asked on the Moodle forums about this (https://moodle.org/mod/forum/discuss.php?d=244778#p1061449) and Itamar Tzadok came back with a suggested code tweak that could be used to switch from date_selector to date_time_selector. Unfortunately our IT procedures mean I can't alter the core code so would need to wait until a change filtered through into core - so I'm putting in a request for this enhancement.
I've included Itamar's proposed fix here to keep the information handy.
Thanks, Gordon
In mod/data/mod_form.php around line 29, change
$mform->addElement('date_selector', 'timeavailablefrom', get_string('availablefromdate', 'data'), array('optional'=>true));
$mform->addElement('date_selector', 'timeavailableto', get_string('availabletodate', 'data'), array('optional'=>true));
$mform->addElement('date_selector', 'timeviewfrom', get_string('viewfromdate', 'data'), array('optional'=>true));
$mform->addElement('date_selector', 'timeviewto', get_string('viewtodate', 'data'), array('optional'=>true));
to
$mform->addElement('date_time_selector', 'timeavailablefrom', get_string('availablefromdate', 'data'), array('optional'=>true));
$mform->addElement('date_time_selector', 'timeavailableto', get_string('availabletodate', 'data'), array('optional'=>true));
$mform->addElement('date_time_selector', 'timeviewfrom', get_string('viewfromdate', 'data'), array('optional'=>true));
$mform->addElement('date_time_selector', 'timeviewto', get_string('viewtodate', 'data'), array('optional'=>true));
- will be (partly) resolved by
-
MDL-42842 Change mod/data availability to date_time_selector
-
- Closed
-