diff --git a/mod/data/locallib.php b/mod/data/locallib.php index aa54b878310..df4d1c75f70 100644 --- a/mod/data/locallib.php +++ b/mod/data/locallib.php @@ -65,13 +65,6 @@ class data_portfolio_caller extends portfolio_module_caller_base { */ public function __construct($callbackargs) { parent::__construct($callbackargs); - // set up the list of fields to export - $this->selectedfields = array(); - foreach ($callbackargs as $key => $value) { - if (strpos($key, 'field_') === 0) { - $this->selectedfields[] = substr($key, 6); - } - } } /** diff --git a/mod/glossary/locallib.php b/mod/glossary/locallib.php index 904a0eed8ae..e3cb339d52d 100644 --- a/mod/glossary/locallib.php +++ b/mod/glossary/locallib.php @@ -224,6 +224,9 @@ class glossary_entry_portfolio_caller extends portfolio_module_caller_base { /** @var array Array that contains all aliases for the given glossary entry. */ private array $aliases = []; + /** @var array categories. */ + private array $categories = []; + /* * @return array */ diff --git a/mod/lesson/tests/external/external_test.php b/mod/lesson/tests/external/external_test.php index b933833dc05..056491c76c8 100644 --- a/mod/lesson/tests/external/external_test.php +++ b/mod/lesson/tests/external/external_test.php @@ -74,6 +74,36 @@ class testable_mod_lesson_external extends mod_lesson_external { */ class external_test extends externallib_advanced_testcase { + /** @var \stdClass course record. */ + protected \stdClass $course; + + /** @var \stdClass */ + protected \stdClass $lesson; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $page1; + + /** @var \stdClass a fieldset object false or exception if error not found. */ + protected $page2; + + /** @var \core\context\module context instance. */ + protected \core\context\module $context; + + /** @var \stdClass */ + protected \stdClass $cm; + + /** @var \stdClass user record. */ + protected \stdClass $student; + + /** @var \stdClass user record. */ + protected \stdClass $teacher; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $studentrole; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $teacherrole; + /** * Set up for every test */ diff --git a/mod/lti/OAuth.php b/mod/lti/OAuth.php index dde625452a3..762d236ae72 100644 --- a/mod/lti/OAuth.php +++ b/mod/lti/OAuth.php @@ -81,6 +81,9 @@ class OAuthConsumer { public $key; public $secret; + /** @var string|null callback URL. */ + public ?string $callback_url; + function __construct($key, $secret, $callback_url = null) { $this->key = $key; $this->secret = $secret; diff --git a/mod/lti/classes/output/registration_upgrade_choice_page.php b/mod/lti/classes/output/registration_upgrade_choice_page.php index 1e7e3a0f4d8..0232bc734f0 100644 --- a/mod/lti/classes/output/registration_upgrade_choice_page.php +++ b/mod/lti/classes/output/registration_upgrade_choice_page.php @@ -40,6 +40,12 @@ use stdClass; */ class registration_upgrade_choice_page implements renderable, templatable { + /** @var array array of tools. */ + protected array $tools = []; + + /** @var string tool URL. */ + protected string $startregurl; + /** * Constructor * diff --git a/mod/lti/classes/output/repost_crosssite_page.php b/mod/lti/classes/output/repost_crosssite_page.php index 23fc2cc679d..151fe778819 100644 --- a/mod/lti/classes/output/repost_crosssite_page.php +++ b/mod/lti/classes/output/repost_crosssite_page.php @@ -48,6 +48,12 @@ use stdClass; */ class repost_crosssite_page implements renderable, templatable { + /** @var array POST params. */ + protected $params; + + /** @var string URL to repost to. */ + protected string $url; + /** * Constructor * diff --git a/mod/lti/mod_form.php b/mod/lti/mod_form.php index c77f72d4f18..3984a97bbee 100644 --- a/mod/lti/mod_form.php +++ b/mod/lti/mod_form.php @@ -76,8 +76,6 @@ class mod_lti_mod_form extends moodleform_mod { $showtypes = !$typeid; } - $this->typeid = 0; - $mform =& $this->_form; // Adding the "general" fieldset, where all the common settings are shown. diff --git a/mod/lti/service/gradebookservices/tests/gradebookservices_test.php b/mod/lti/service/gradebookservices/tests/gradebookservices_test.php index 50b5479dc96..62913bc0084 100644 --- a/mod/lti/service/gradebookservices/tests/gradebookservices_test.php +++ b/mod/lti/service/gradebookservices/tests/gradebookservices_test.php @@ -302,7 +302,7 @@ class gradebookservices_test extends \advanced_testcase { $this->assertEquals(!empty($subreviewurl), isset($lineitem->submissionReview)); if ($subreviewurl) { if ($subreviewurl == 'DEFAULT') { - $this->assertFalse(isset($this->submissionReview->url)); + $this->assertFalse(isset($lineitem->submissionReview->url)); } else { $this->assertEquals($subreviewurl, $lineitem->submissionReview->url); } @@ -310,7 +310,7 @@ class gradebookservices_test extends \advanced_testcase { $custom = $lineitem->submissionReview->custom; $this->assertEquals($subreviewparams, join("\n", array_map(fn($k) => $k.'='.$custom[$k], array_keys($custom)))); } else { - $this->assertFalse(isset($this->submissionReview->custom)); + $this->assertFalse(isset($lineitem->submissionReview->custom)); } } diff --git a/mod/lti/tests/mod_lti_testcase.php b/mod/lti/tests/mod_lti_testcase.php index ca7809defab..7d3a9af71b5 100644 --- a/mod/lti/tests/mod_lti_testcase.php +++ b/mod/lti/tests/mod_lti_testcase.php @@ -14,6 +14,8 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . +use core_external\external_api; + defined('MOODLE_INTERNAL') || die(); global $CFG; diff --git a/mod/scorm/tests/externallib_test.php b/mod/scorm/tests/externallib_test.php index d0f618dad25..6713eb29539 100644 --- a/mod/scorm/tests/externallib_test.php +++ b/mod/scorm/tests/externallib_test.php @@ -38,6 +38,30 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); */ class externallib_test extends externallib_advanced_testcase { + /** @var \stdClass course record. */ + protected \stdClass $course; + + /** @var \stdClass activity record. */ + protected \stdClass $scorm; + + /** @var \core\context\module context instance. */ + protected \core\context\module $context; + + /** @var \stdClass */ + protected \stdClass $cm; + + /** @var \stdClass user record. */ + protected \stdClass $student; + + /** @var \stdClass user record. */ + protected \stdClass $teacher; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $studentrole; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $teacherrole; + /** * Set up for every test */ diff --git a/mod/scorm/tests/lib_test.php b/mod/scorm/tests/lib_test.php index 961f9a2d555..92453b73a37 100644 --- a/mod/scorm/tests/lib_test.php +++ b/mod/scorm/tests/lib_test.php @@ -45,6 +45,30 @@ require_once($CFG->dirroot . '/mod/scorm/lib.php'); */ class lib_test extends \advanced_testcase { + /** @var \stdClass course record. */ + protected \stdClass $course; + + /** @var \stdClass activity record. */ + protected \stdClass $scorm; + + /** @var \core\context\module context instance. */ + protected \core\context\module $context; + + /** @var \stdClass */ + protected \stdClass $cm; + + /** @var \stdClass user record. */ + protected \stdClass $student; + + /** @var \stdClass user record. */ + protected \stdClass $teacher; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $studentrole; + + /** @var \stdClass a fieldset object, false or exception if error not found. */ + protected \stdClass $teacherrole; + /** * Set up for every test */