Permalink
Browse files

Merge branch 'MDL-28283-m21' of git://github.com/ankitagarwal/moodle …

…into MOODLE_21_STABLE
  • Loading branch information...
2 parents 9bfa5bd + 1a8aa67 commit fd20256bad463642aec5b344ad2846a1ac4bbc0c Sam Hemelryk committed Feb 14, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/completion/completion_criteria_date.php
View
5 lib/completion/completion_criteria_date.php
@@ -53,7 +53,7 @@ public static function fetch($params) {
public function config_form_display(&$mform, $data = null)
{
$mform->addElement('checkbox', 'criteria_date', get_string('enable'));
- $mform->addElement('date', 'criteria_date_value', get_string('afterspecifieddate', 'completion'));
+ $mform->addElement('date_selector', 'criteria_date_value', get_string('afterspecifieddate', 'completion'));
// If instance of criteria exists
if ($this->id) {
@@ -74,8 +74,7 @@ public function update_config(&$data) {
if (!empty($data->criteria_date)) {
$this->course = $data->id;
- $date = $data->criteria_date_value;
- $this->timeend = strtotime($date['Y'].'-'.$date['M'].'-'.$date['d']);
+ $this->timeend = $data->criteria_date_value;
$this->insert();
}
}

0 comments on commit fd20256

Please sign in to comment.