|
@ -34,9 +34,13 @@ if (!defined('MOODLE_INTERNAL')) { |
|
|
* Finally format them to print |
|
|
* Finally format them to print |
|
|
*/ |
|
|
*/ |
|
|
require_once("$CFG->dirroot/completion/completion_completion.php"); |
|
|
require_once("$CFG->dirroot/completion/completion_completion.php"); |
|
|
|
|
|
require_once("$CFG->dirroot/enrol/locallib.php"); |
|
|
$cc = new completion_completion(array('userid'=>$USER->id, 'course'=>$course->id)); |
|
|
$cc = new completion_completion(array('userid'=>$USER->id, 'course'=>$course->id)); |
|
|
|
|
|
|
|
|
$start_date = $cc->timeenrolled; |
|
|
$enrol_manager = new course_enrolment_manager($PAGE, $course); |
|
|
|
|
|
$user_enrol = end($enrol_manager->get_user_enrolments($USER->id)); |
|
|
|
|
|
|
|
|
|
|
|
$start_date = $user_enrol->timestart; |
|
|
$end_date = $cc->timecompleted; |
|
|
$end_date = $cc->timecompleted; |
|
|
|
|
|
|
|
|
$fmt = '%d/%m/%Y'; // Default format |
|
|
$fmt = '%d/%m/%Y'; // Default format |
|
|