From 00e1212b9c018cdc3e72cb9f2a2e9702e5688f44 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Thu, 9 Aug 2018 17:46:34 -0400 Subject: [PATCH 1/4] Fix deprecation warning in locallib.php This is a fix for the following PHP deprecation warning: "Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wwassignment_client has a deprecated constructor in wwassignment/locallib.php on line 655" --- locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locallib.php b/locallib.php index 98bbbdd..c29d678 100644 --- a/locallib.php +++ b/locallib.php @@ -661,7 +661,7 @@ class wwassignment_client { /** * @desc Constructs a singleton webwork_client. */ - function wwassignment_client() + function __constructor() { global $CFG; // static associative array containing the real objects, key is classname From 3a18566485835f7b0324f876422f8ce1883ce3b1 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Thu, 9 Aug 2018 17:48:11 -0400 Subject: [PATCH 2/4] Fix moodleform_mod::add_intro_editor() deprecation warning --- mod_form.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod_form.php b/mod_form.php index 136ea80..f967f1a 100644 --- a/mod_form.php +++ b/mod_form.php @@ -61,8 +61,7 @@ function definition() // $OUTPUT->help_icon('enablenotification','assignment'); $mform->addHelpButton('webwork_set', 'webwork_set', 'wwassignment'); - // Instead of the wwassign description, we should use the normal intro... - $this->add_intro_editor($config->requiremodintro); + $this->standard_intro_elements(); $features = new stdClass; $features->gradecat = true; From 5e95ee9ee1a5ab5f5407f3d4afd0770974717d34 Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Thu, 9 Aug 2018 17:50:06 -0400 Subject: [PATCH 3/4] Fix deprecation warning in view.php As per warning message: "core_renderer::update_module_button() has been deprecated and should not be used anymore." --- view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view.php b/view.php index 369ee96..d38dc50 100644 --- a/view.php +++ b/view.php @@ -66,7 +66,7 @@ $PAGE->set_cacheable(true); $PAGE->set_focuscontrol(""); //$PAGE->set_button(update_module_button($cm->id, $course->id, $strwwassignment)); -$PAGE->set_button($OUTPUT->update_module_button($cm->id, 'wwassignment')); +//$PAGE->set_button($OUTPUT->update_module_button($cm->id, 'wwassignment')); //$PAGE->navbar->add($strwwassignments,"index.php?id=$course->id"); //$PAGE->navbar->add($wwassignment->name); From a5946ea652273ed18d40d4de48923fb9cbc4766c Mon Sep 17 00:00:00 2001 From: Jerome Charaoui Date: Fri, 17 Aug 2018 11:11:54 -0400 Subject: [PATCH 4/4] Fix wwassignment_client class constuctor The correct function name for a constructor is __construct() --- locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locallib.php b/locallib.php index c29d678..4423dda 100644 --- a/locallib.php +++ b/locallib.php @@ -661,7 +661,7 @@ class wwassignment_client { /** * @desc Constructs a singleton webwork_client. */ - function __constructor() + function __construct() { global $CFG; // static associative array containing the real objects, key is classname