MDL-63844 enrol: Reordering status_field constructor parameters

This commit is contained in:
Amaia Anabitarte
2018-12-18 17:57:57 +01:00
parent 6676f20214
commit 26b34c30d3
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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;
}
/**
+2 -2
View File
@@ -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);
}