mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +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
|
@ -42,7 +42,7 @@ class user_profile_set extends \core_analytics\local\indicator\linear {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static function get_name() : \lang_string {
|
||||
public static function get_name(): \lang_string {
|
||||
return new \lang_string('indicator:completeduserprofile');
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class user_track_forums extends \core_analytics\local\indicator\binary {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static function get_name() : \lang_string {
|
||||
public static function get_name(): \lang_string {
|
||||
return new \lang_string('indicator:userforumstracking');
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class upcoming_activities_due extends \core_analytics\local\target\binary {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static function get_name() : \lang_string {
|
||||
public static function get_name(): \lang_string {
|
||||
return new \lang_string('target:upcomingactivitiesdue', 'user');
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class calendar_form extends \moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG, $USER;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -34,7 +34,7 @@ class contentbank_user_preferences_form extends \moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG, $USER;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -41,7 +41,7 @@ class defaulthomepage_form extends \moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -38,7 +38,7 @@ class profile_field_form extends dynamic_form {
|
|||
/**
|
||||
* Define the form
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot.'/user/profile/definelib.php');
|
||||
|
||||
|
@ -65,7 +65,7 @@ class profile_field_form extends dynamic_form {
|
|||
/**
|
||||
* Alter definition based on existing or submitted data
|
||||
*/
|
||||
public function definition_after_data () {
|
||||
public function definition_after_data() {
|
||||
$mform = $this->_form;
|
||||
$this->field->define_after_data($mform);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class provider implements
|
|||
* @param collection $collection A list of information about this component
|
||||
* @return collection The collection object filled out with information about this component.
|
||||
*/
|
||||
public static function get_metadata(collection $collection) : collection {
|
||||
public static function get_metadata(collection $collection): collection {
|
||||
$userfields = [
|
||||
'id' => 'privacy:metadata:id',
|
||||
'auth' => 'privacy:metadata:auth',
|
||||
|
@ -192,7 +192,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 {
|
||||
$params = ['userid' => $userid, 'contextuser' => CONTEXT_USER];
|
||||
$sql = "SELECT id
|
||||
FROM {context}
|
||||
|
|
|
@ -212,7 +212,7 @@ class user extends \core_search\base {
|
|||
*
|
||||
* @return \core_search\document_icon
|
||||
*/
|
||||
public function get_doc_icon(\core_search\document $doc) : \core_search\document_icon {
|
||||
public function get_doc_icon(\core_search\document $doc): \core_search\document_icon {
|
||||
return new \core_search\document_icon('i/user');
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class user_edit_form extends moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG, $COURSE, $USER;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -39,7 +39,7 @@ class user_edit_editor_form extends moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG, $COURSE;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -42,7 +42,7 @@ class user_edit_forum_form extends moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG, $COURSE;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -40,7 +40,7 @@ class user_edit_language_form extends moodleform {
|
|||
/**
|
||||
* Define the form.
|
||||
*/
|
||||
public function definition () {
|
||||
public function definition() {
|
||||
global $CFG, $COURSE, $USER;
|
||||
|
||||
$mform = $this->_form;
|
||||
|
|
|
@ -49,7 +49,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('user_info_data', [
|
||||
'userid' => 'privacy:metadata:profilefield_checkbox:userid',
|
||||
'fieldid' => 'privacy:metadata:profilefield_checkbox:fieldid',
|
||||
|
@ -64,7 +64,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_info_data} uda
|
||||
JOIN {user_info_field} uif ON uda.fieldid = uif.id
|
||||
|
|
|
@ -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 {
|
||||
return $collection->add_database_table('user_info_data', [
|
||||
'userid' => 'privacy:metadata:profilefield_datetime:userid',
|
||||
'fieldid' => 'privacy:metadata:profilefield_datetime:fieldid',
|
||||
|
@ -65,7 +65,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_info_data} uda
|
||||
JOIN {user_info_field} uif ON uda.fieldid = uif.id
|
||||
|
|
|
@ -49,7 +49,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('user_info_data', [
|
||||
'userid' => 'privacy:metadata:profilefield_menu:userid',
|
||||
'fieldid' => 'privacy:metadata:profilefield_menu:fieldid',
|
||||
|
@ -64,7 +64,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_info_data} uda
|
||||
JOIN {user_info_field} uif ON uda.fieldid = uif.id
|
||||
|
|
|
@ -49,7 +49,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('user_info_data', [
|
||||
'userid' => 'privacy:metadata:profile_field_social:userid',
|
||||
'fieldid' => 'privacy:metadata:profile_field_social:fieldid',
|
||||
|
@ -64,7 +64,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_info_data} uda
|
||||
JOIN {user_info_field} uif ON uda.fieldid = uif.id
|
||||
|
|
|
@ -47,7 +47,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('user_info_data', [
|
||||
'userid' => 'privacy:metadata:profilefield_text:userid',
|
||||
'fieldid' => 'privacy:metadata:profilefield_text:fieldid',
|
||||
|
@ -62,7 +62,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_info_data} uda
|
||||
JOIN {user_info_field} uif ON uda.fieldid = uif.id
|
||||
|
|
|
@ -49,7 +49,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('user_info_data', [
|
||||
'userid' => 'privacy:metadata:profile_field_textarea:userid',
|
||||
'fieldid' => 'privacy:metadata:profile_field_textarea:fieldid',
|
||||
|
@ -64,7 +64,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_info_data} uda
|
||||
JOIN {user_info_field} uif ON uda.fieldid = uif.id
|
||||
|
|
|
@ -386,7 +386,7 @@ abstract class user_selector_base {
|
|||
* that is true, then that option will be displayed greyed out, and
|
||||
* will not be returned by get_selected_users.
|
||||
*/
|
||||
public abstract function find_users($search);
|
||||
abstract public function find_users($search);
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue