Use of class name as constructor is deprecated

Use of class name as constructor is deprecated

by Biing Yin -
Number of replies: 10

i have just upgraded from moodle 2.9.2 to moodle 3.1

i am using Apache 2.4. PHP 5.6


when i edit course i get:

Use of class name as constructor is deprecated

  • line 62 of /lib/form/hidden.php: call to debugging()
  • line 363 of /home/biingwanyin/php/HTML/QuickForm/element.php: call to MoodleQuickForm_hidden->MoodleQuickForm_hidden()
  • line 171 of /home/biingwanyin/php/HTML/QuickForm/input.php: call to HTML_QuickForm_element->onQuickFormEvent()
  • line 366 of /home/biingwanyin/php/HTML/QuickForm/element.php: call to HTML_QuickForm_input->onQuickFormEvent()
  • line 171 of /home/biingwanyin/php/HTML/QuickForm/input.php: call to HTML_QuickForm_element->onQuickFormEvent()
  • line 572 of /home/biingwanyin/php/HTML/QuickForm.php: call to HTML_QuickForm_input->onQuickFormEvent()
  • line 602 of /home/biingwanyin/php/HTML/QuickForm.php: call to HTML_QuickForm->_loadElement()
  • line 51 of /course/edit_form.php: call to HTML_QuickForm->addElement()
  • line 201 of /lib/formslib.php: call to course_edit_form->definition()
  • line 149 of /course/edit.php: call to moodleform->__construct()

etc

also there is a notice: undefined index:alt in etc etc etc.


i am able to to edit the quiz. but not the settings ?

Could you please help with this ?

Attachment Screen Shot 2016-06-04 at 7.25.44 PM.png
Average of ratings: -
In reply to Biing Yin

Re: Use of class name as constructor is deprecated

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Is QuickForm a plugin?  If so, try disabling or uninstalling and see if that fixes your issue.

In reply to Emma Richardson

Re: Use of class name as constructor is deprecated

by Biing Yin -

unfortunately this is what happened when i disabled it.

Attachment Screen Shot 2016-06-04 at 11.45.42 PM.png
In reply to Biing Yin

Re: Use of class name as constructor is deprecated

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

So it is still looking for something in it - did you try uninstalling or maybe contact the developers to see if they are planning to upgrade it?

In reply to Emma Richardson

Re: Use of class name as constructor is deprecated

by Biing Yin -

uninstalling it only makes it worse. it is looking in the php which is pearl services. however there is ongoing errors.

In reply to Biing Yin

Re: Use of class name as constructor is deprecated

by Biing Yin -

Fatal error: Call to undefined method tool_lp_course_competencies_form_element::tool_lp_course_competencies_form_element() in /home/biingwanyin/php/HTML/QuickForm/element.php on line 375

In reply to Emma Richardson

Re: Use of class name as constructor is deprecated

by Biing Yin -

i have found the solution. You have to turn off the competencies settings which have been defaulted to on. Once i turn this off i could for what ever reason able to edit the settings.


Some of the bugs associated with moodle 3.1.


So you have to go to competencies settings and turn this off.

In reply to Biing Yin

Re: Use of class name as constructor is deprecated

by Biing Yin -

i turned off competencies settings which is under administration. the default is set to on. once i turn these off it work. i could now edit the items. strange.

In reply to Biing Yin

Re: Use of class name as constructor is deprecated

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

I also came across this (not with Essential) on a site with php7. But I believe the deprecation notice I saw was a 'warning' rather than an 'error', so would only show up as such when you have developer mode enabled, but should not actually prevent the site working.

Possibly the undefined index in the Essential core renderer is a separate issue - but please note that Gareth has not yet released Essential for Moodle3.1 and is currently sourcing crowd-funding to do that work and so there may be issues around Essential in Moodle3.1. You should test with another theme (prefeably clean/more) and see if the same issues recur - if they do, post as a tracker bug as this would then be a core bug needing to be fixed.

Richard

In reply to Richard Oelmann

Re: Use of class name as constructor is deprecated

by Biing Yin -

Fatal error: Call to undefined method tool_lp_course_competencies_form_element::tool_lp_course_competencies_form_element() in /home/biingwanyin/php/HTML/QuickForm/element.php on line 375


I continue to get this error. It doesn't make a difference if i use clean or essential

In reply to Richard Oelmann

Re: Use of class name as constructor is deprecated

by Biing Yin -

i continue to get the same issue if its with clean or essential. 

Fatal error: Call to undefined method tool_lp_course_competencies_form_element::tool_lp_course_competencies_form_element() in /home/biingwanyin/php/HTML/QuickForm/element.php on line 375