Permalink
Browse files

Merge branch 'MDL-31425-m21' of git://github.com/sammarshallou/moodle…

… into MOODLE_21_STABLE
  • Loading branch information...
2 parents e77a77b + effd283 commit dbc410767ad7d8a0c999bd249dbcd476b4f03ef5 @nebgor nebgor committed Feb 7, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 course/modedit.php
View
@@ -305,10 +305,9 @@
$cm->availablefrom = $fromform->availablefrom;
$cm->availableuntil = $fromform->availableuntil;
// The form time is midnight, but because we want it to be
- // inclusive, set it to 23:59:59 on that day.
+ // inclusive, add 23:59:59 to the time (86,399 seconds).
if ($cm->availableuntil) {
- $cm->availableuntil = strtotime('23:59:59',
- $cm->availableuntil);
+ $cm->availableuntil += 86399;
}
$cm->showavailability = $fromform->showavailability;
condition_info::update_cm_from_form($cm,$fromform,true);
@@ -384,10 +383,9 @@
$newcm->availablefrom = $fromform->availablefrom;
$newcm->availableuntil = $fromform->availableuntil;
// The form time is midnight, but because we want it to be
- // inclusive, set it to 23:59:59 on that day.
+ // inclusive, add 23:59:59 to the time (86,399 seconds).
if ($newcm->availableuntil) {
- $newcm->availableuntil = strtotime('23:59:59',
- $newcm->availableuntil);
+ $newcm->availableuntil += 86399;
}
$newcm->showavailability = $fromform->showavailability;
}

0 comments on commit dbc4107

Please sign in to comment.