mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-77348-master' of https://github.com/meirzamoodle/moodle
This commit is contained in:
commit
e9327f7339
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
*/
|
||||
|
30
mod/lesson/tests/external/external_test.php
vendored
30
mod/lesson/tests/external/external_test.php
vendored
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use core_external\external_api;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user