mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 18:36:42 +02:00
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle
This commit is contained in:
commit
3278ce7aba
1147 changed files with 2621 additions and 2617 deletions
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -50,7 +50,7 @@ class provider implements
|
|||
* @param collection $collection The initialised collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
$collection->add_database_table(
|
||||
'user_enrolments',
|
||||
[
|
||||
|
@ -74,7 +74,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
$sql = "SELECT ctx.id
|
||||
FROM {user_enrolments} ue
|
||||
JOIN {enrol} e
|
||||
|
|
|
@ -55,7 +55,7 @@ class provider implements
|
|||
* @param collection $collection The initialised item collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
|
||||
$collection->add_subsystem_link('core_group', [], 'privacy:metadata:core_group');
|
||||
return $collection;
|
||||
|
@ -67,7 +67,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
return \core_group\privacy\provider::get_contexts_for_group_member($userid, 'enrol_cohort');
|
||||
}
|
||||
|
||||
|
|
|
@ -512,7 +512,7 @@ class enrol_cohort_plugin extends enrol_plugin {
|
|||
* @param int|null $courseid Course ID.
|
||||
* @return array Errors
|
||||
*/
|
||||
public function validate_enrol_plugin_data(array $enrolmentdata, ?int $courseid = null) : array {
|
||||
public function validate_enrol_plugin_data(array $enrolmentdata, ?int $courseid = null): array {
|
||||
global $DB;
|
||||
|
||||
$errors = [];
|
||||
|
@ -591,7 +591,7 @@ class enrol_cohort_plugin extends enrol_plugin {
|
|||
* @param int $courseid Course ID.
|
||||
* @return array Updated enrolment data with custom fields info.
|
||||
*/
|
||||
public function fill_enrol_custom_fields(array $enrolmentdata, int $courseid) : array {
|
||||
public function fill_enrol_custom_fields(array $enrolmentdata, int $courseid): array {
|
||||
global $DB;
|
||||
|
||||
if (isset($enrolmentdata['cohortidnumber'])) {
|
||||
|
@ -619,7 +619,7 @@ class enrol_cohort_plugin extends enrol_plugin {
|
|||
* @param int|null $courseid Course ID.
|
||||
* @return lang_string|null Error
|
||||
*/
|
||||
public function validate_plugin_data_context(array $enrolmentdata, ?int $courseid = null) : ?lang_string {
|
||||
public function validate_plugin_data_context(array $enrolmentdata, ?int $courseid = null): ?lang_string {
|
||||
if (isset($enrolmentdata['customint1'])) {
|
||||
$cohortid = $enrolmentdata['customint1'];
|
||||
$coursecontext = \context_course::instance($courseid);
|
||||
|
@ -667,7 +667,7 @@ class enrol_cohort_plugin extends enrol_plugin {
|
|||
* @param int $courseid Course ID.
|
||||
* @return stdClass|null Matching instance
|
||||
*/
|
||||
public function find_instance(array $enrolmentdata, int $courseid) : ?stdClass {
|
||||
public function find_instance(array $enrolmentdata, int $courseid): ?stdClass {
|
||||
global $DB;
|
||||
$instances = enrol_get_instances($courseid, false);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -53,7 +53,7 @@ class provider implements
|
|||
* @param collection $collection The initialised collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
return $collection->add_database_table('enrol_flatfile', [
|
||||
'action' => 'privacy:metadata:enrol_flatfile:action',
|
||||
'roleid' => 'privacy:metadata:enrol_flatfile:roleid',
|
||||
|
@ -71,7 +71,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
$sql = "SELECT c.id
|
||||
FROM {enrol_flatfile} ef
|
||||
JOIN {context} c ON c.contextlevel = ? AND c.instanceid = ef.courseid
|
||||
|
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -505,7 +505,7 @@ class enrol_guest_plugin extends enrol_plugin {
|
|||
* @param int $courseid Course ID.
|
||||
* @return stdClass|null Matching instance
|
||||
*/
|
||||
public function find_instance(array $enrolmentdata, int $courseid) : ?stdClass {
|
||||
public function find_instance(array $enrolmentdata, int $courseid): ?stdClass {
|
||||
|
||||
$instances = enrol_get_instances($courseid, false);
|
||||
$instance = null;
|
||||
|
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -51,7 +51,7 @@ class provider implements
|
|||
* @param collection $items a reference to the collection to use to store the metadata.
|
||||
* @return collection the updated collection of metadata items.
|
||||
*/
|
||||
public static function get_metadata(collection $items) : collection {
|
||||
public static function get_metadata(collection $items): collection {
|
||||
$items->add_database_table(
|
||||
'enrol_lti_users',
|
||||
[
|
||||
|
@ -72,7 +72,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
$contextlist = new contextlist();
|
||||
|
||||
$sql = "SELECT DISTINCT ctx.id
|
||||
|
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -662,7 +662,7 @@ class enrol_manual_plugin extends enrol_plugin {
|
|||
* @param int $courseid Course ID.
|
||||
* @return stdClass|null Matching instance
|
||||
*/
|
||||
public function find_instance(array $enrolmentdata, int $courseid) : ?stdClass {
|
||||
public function find_instance(array $enrolmentdata, int $courseid): ?stdClass {
|
||||
|
||||
$instances = enrol_get_instances($courseid, false);
|
||||
$instance = null;
|
||||
|
|
|
@ -55,7 +55,7 @@ class provider implements
|
|||
* @param collection $collection The initialised item collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
|
||||
$collection->add_subsystem_link('core_group', [], 'privacy:metadata:core_group');
|
||||
return $collection;
|
||||
|
@ -67,7 +67,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist $contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
return \core_group\privacy\provider::get_contexts_for_group_member($userid, 'enrol_meta');
|
||||
}
|
||||
|
||||
|
|
|
@ -490,7 +490,7 @@ class enrol_meta_plugin extends enrol_plugin {
|
|||
* @param int $courseid Course ID.
|
||||
* @return stdClass|null Matching instance
|
||||
*/
|
||||
public function find_instance(array $enrolmentdata, int $courseid) : ?stdClass {
|
||||
public function find_instance(array $enrolmentdata, int $courseid): ?stdClass {
|
||||
global $DB;
|
||||
$instances = enrol_get_instances($courseid, false);
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -56,7 +56,7 @@ class provider implements
|
|||
* @param collection $collection The initialised collection to add items to.
|
||||
* @return collection A listing of user data stored through this system.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
$collection->add_external_location_link(
|
||||
'paypal.com',
|
||||
[
|
||||
|
@ -106,7 +106,7 @@ class provider implements
|
|||
* @param int $userid The user to search.
|
||||
* @return contextlist The contextlist containing the list of contexts used in this plugin.
|
||||
*/
|
||||
public static function get_contexts_for_userid(int $userid) : contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): contextlist {
|
||||
$contextlist = new contextlist();
|
||||
|
||||
// Values of ep.receiver_email and ep.business are already normalised to lowercase characters by PayPal,
|
||||
|
|
|
@ -35,7 +35,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_reason() : string {
|
||||
public static function get_reason(): string {
|
||||
return 'privacy:metadata';
|
||||
}
|
||||
}
|
|
@ -1210,7 +1210,7 @@ class enrol_self_plugin extends enrol_plugin {
|
|||
* @param int $courseid Course ID.
|
||||
* @return stdClass|null Matching instance
|
||||
*/
|
||||
public function find_instance(array $enrolmentdata, int $courseid) : ?stdClass {
|
||||
public function find_instance(array $enrolmentdata, int $courseid): ?stdClass {
|
||||
|
||||
$instances = enrol_get_instances($courseid, false);
|
||||
$instance = null;
|
||||
|
|
|
@ -1041,7 +1041,7 @@ class externallib_test extends externallib_advanced_testcase {
|
|||
/**
|
||||
* Test get_enrolled_users_with_capability
|
||||
*/
|
||||
public function test_get_enrolled_users_with_capability_with_parameters () {
|
||||
public function test_get_enrolled_users_with_capability_with_parameters() {
|
||||
$capability = 'moodle/course:viewparticipants';
|
||||
$data = $this->get_enrolled_users_with_capability_setup($capability);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue