Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…into MOODLE_22_STABLE
  • Loading branch information...
commit 01080b468fa24a29b9d346889a74646bc02d8ef5 2 parents 66bd7ae + 04773f2
@samhemelryk samhemelryk authored
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();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.