diff --git a/user/classes/output/status_field.php b/user/classes/output/status_field.php index a51ef985451..a1953b18984 100644 --- a/user/classes/output/status_field.php +++ b/user/classes/output/status_field.php @@ -92,19 +92,19 @@ class status_field implements renderable, templatable { * @param string $status The user enrolment status. * @param int|null $timestart The timestamp when the user's enrolment starts. * @param int|null $timeend The timestamp when the user's enrolment ends. - * @param int|null $timeenrolled The timestamp when the user was enrolled. * @param user_enrolment_action[] $enrolactions Array of enrol action objects for the given enrolment method. + * @param int|null $timeenrolled The timestamp when the user was enrolled. */ public function __construct($enrolinstancename, $coursename, $fullname, $status, $timestart = null, $timeend = null, - $timeenrolled, $enrolactions = []) { + $enrolactions = [], $timeenrolled = null) { $this->enrolinstancename = $enrolinstancename; $this->coursename = $coursename; $this->fullname = $fullname; $this->status = $status; $this->timestart = $timestart; $this->timeend = $timeend; - $this->timeenrolled = $timeenrolled; $this->enrolactions = $enrolactions; + $this->timeenrolled = $timeenrolled; } /** diff --git a/user/classes/participants_table.php b/user/classes/participants_table.php index d0497ad783e..095ba8a9f59 100644 --- a/user/classes/participants_table.php +++ b/user/classes/participants_table.php @@ -400,8 +400,8 @@ class participants_table extends \table_sql { break; } - $statusfield = new status_field($instancename, $coursename, $fullname, $status, $timestart, $timeend, $timeenrolled, - $actions); + $statusfield = new status_field($instancename, $coursename, $fullname, $status, $timestart, $timeend, + $actions, $timeenrolled); $statusfielddata = $statusfield->set_status($statusval)->export_for_template($OUTPUT); $enrolstatusoutput .= $OUTPUT->render_from_template('core_user/status_field', $statusfielddata); }