Skip to content

Commit

Permalink
MDL-53251 tool_lp: Apply PHP7 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Apr 18, 2016
1 parent 8e3eb9f commit a8f1af5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 1 addition & 3 deletions admin/tool/lp/classes/course_competencies_form_element.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ class tool_lp_course_competencies_form_element extends MoodleQuickForm_autocompl
/**
* Constructor
*
* @TODO: Convert this to a real constructor when the PHP7 changes are merged.
*
* @param string $elementName Element name
* @param mixed $elementLabel Label(s) for an element
* @param array $options Options to control the element's display
* @param mixed $attributes Either a typical HTML attribute string or an associative array.
*/
function tool_lp_course_competencies_form_element($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
public function __construct($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
global $OUTPUT;

if ($elementName == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ class tool_lp_course_competency_rule_form_element extends MoodleQuickForm_select
/**
* Constructor
*
* @TODO: Convert this to a real constructor when the PHP7 changes are merged.
*
* @param string $elementName Element name
* @param mixed $elementLabel Label(s) for an element
* @param array $options Options to control the element's display
* @param mixed $attributes Either a typical HTML attribute string or an associative array.
*/
function tool_lp_course_competency_rule_form_element($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
public function __construct($elementName=null, $elementLabel=null, $options=array(), $attributes=null) {
global $OUTPUT;

if ($elementName == null) {
Expand Down
3 changes: 1 addition & 2 deletions admin/tool/lp/classes/form/persistent.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ public function __construct($action = null, $customdata = null, $method = 'post'
$this->persistent = new static::$persistentclass();
$this->persistent->from_record($persistendata);

// TODO Make PHP7 compatible.
unset($customdata['persistent']);
parent::moodleform($action, $customdata, $method, $target, $attributes, $editable);
parent::__construct($action, $customdata, $method, $target, $attributes, $editable);

// Load the defaults.
$this->set_data($this->get_default_data());
Expand Down

0 comments on commit a8f1af5

Please sign in to comment.