mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-53251 tool_lp: Apply PHP7 fixes
This commit is contained in:
parent
8e3eb9f865
commit
a8f1af5e6f
3 changed files with 3 additions and 8 deletions
|
@ -43,14 +43,12 @@ class tool_lp_course_competencies_form_element extends MoodleQuickForm_autocompl
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @TODO: Convert this to a real constructor when the PHP7 changes are merged.
|
|
||||||
*
|
|
||||||
* @param string $elementName Element name
|
* @param string $elementName Element name
|
||||||
* @param mixed $elementLabel Label(s) for an element
|
* @param mixed $elementLabel Label(s) for an element
|
||||||
* @param array $options Options to control the element's display
|
* @param array $options Options to control the element's display
|
||||||
* @param mixed $attributes Either a typical HTML attribute string or an associative array.
|
* @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;
|
global $OUTPUT;
|
||||||
|
|
||||||
if ($elementName == null) {
|
if ($elementName == null) {
|
||||||
|
|
|
@ -45,14 +45,12 @@ class tool_lp_course_competency_rule_form_element extends MoodleQuickForm_select
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @TODO: Convert this to a real constructor when the PHP7 changes are merged.
|
|
||||||
*
|
|
||||||
* @param string $elementName Element name
|
* @param string $elementName Element name
|
||||||
* @param mixed $elementLabel Label(s) for an element
|
* @param mixed $elementLabel Label(s) for an element
|
||||||
* @param array $options Options to control the element's display
|
* @param array $options Options to control the element's display
|
||||||
* @param mixed $attributes Either a typical HTML attribute string or an associative array.
|
* @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;
|
global $OUTPUT;
|
||||||
|
|
||||||
if ($elementName == null) {
|
if ($elementName == null) {
|
||||||
|
|
|
@ -104,9 +104,8 @@ abstract class persistent extends moodleform {
|
||||||
$this->persistent = new static::$persistentclass();
|
$this->persistent = new static::$persistentclass();
|
||||||
$this->persistent->from_record($persistendata);
|
$this->persistent->from_record($persistendata);
|
||||||
|
|
||||||
// TODO Make PHP7 compatible.
|
|
||||||
unset($customdata['persistent']);
|
unset($customdata['persistent']);
|
||||||
parent::moodleform($action, $customdata, $method, $target, $attributes, $editable);
|
parent::__construct($action, $customdata, $method, $target, $attributes, $editable);
|
||||||
|
|
||||||
// Load the defaults.
|
// Load the defaults.
|
||||||
$this->set_data($this->get_default_data());
|
$this->set_data($this->get_default_data());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue