This commit is contained in:
Jun Pataleta 2024-03-08 08:00:41 +08:00
commit 3278ce7aba
No known key found for this signature in database
GPG key ID: F83510526D99E2C7
1147 changed files with 2621 additions and 2617 deletions

View file

@ -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');
}

View file

@ -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');
}

View file

@ -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');
}

View file

@ -41,7 +41,7 @@ class calendar_form extends \moodleform {
/**
* Define the form.
*/
public function definition () {
public function definition() {
global $CFG, $USER;
$mform = $this->_form;

View file

@ -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;

View file

@ -41,7 +41,7 @@ class defaulthomepage_form extends \moodleform {
/**
* Define the form.
*/
public function definition () {
public function definition() {
global $CFG;
$mform = $this->_form;

View file

@ -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);
}

View file

@ -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}

View file

@ -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');
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);
/**
*