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
|
@ -51,7 +51,7 @@ class backup_chat_activity_task extends backup_activity_task {
|
|||
* @param string $content some HTML text that eventually contains URLs to the activity instance scripts
|
||||
* @return string the content with the URLs encoded
|
||||
*/
|
||||
static public function encode_content_links($content) {
|
||||
public static function encode_content_links($content) {
|
||||
global $CFG;
|
||||
|
||||
$base = preg_quote($CFG->wwwroot . '/mod/chat', '#');
|
||||
|
|
|
@ -50,7 +50,7 @@ class restore_chat_activity_task extends restore_activity_task {
|
|||
* Define the contents in the activity that must be
|
||||
* processed by the link decoder
|
||||
*/
|
||||
static public function define_decode_contents() {
|
||||
public static function define_decode_contents() {
|
||||
$contents = array();
|
||||
|
||||
$contents[] = new restore_decode_content('chat', array('intro'), 'chat');
|
||||
|
@ -63,7 +63,7 @@ class restore_chat_activity_task extends restore_activity_task {
|
|||
* Define the decoding rules for links belonging
|
||||
* to the activity to be executed by the link decoder
|
||||
*/
|
||||
static public function define_decode_rules() {
|
||||
public static function define_decode_rules() {
|
||||
$rules = array();
|
||||
|
||||
$rules[] = new restore_decode_rule('CHATVIEWBYID', '/mod/chat/view.php?id=$1', 'course_module');
|
||||
|
@ -79,7 +79,7 @@ class restore_chat_activity_task extends restore_activity_task {
|
|||
* chat logs. It must return one array
|
||||
* of {@link restore_log_rule} objects
|
||||
*/
|
||||
static public function define_restore_log_rules() {
|
||||
public static function define_restore_log_rules() {
|
||||
$rules = array();
|
||||
|
||||
$rules[] = new restore_log_rule('chat', 'add', 'view.php?id={course_module}', '{chat}');
|
||||
|
@ -101,7 +101,7 @@ class restore_chat_activity_task extends restore_activity_task {
|
|||
* by the restore final task, but are defined here at
|
||||
* activity level. All them are rules not linked to any module instance (cmid = 0)
|
||||
*/
|
||||
static public function define_restore_log_rules_for_course() {
|
||||
public static function define_restore_log_rules_for_course() {
|
||||
$rules = array();
|
||||
|
||||
$rules[] = new restore_log_rule('chat', 'view all', 'index.php?id={course}', null);
|
||||
|
|
|
@ -153,7 +153,7 @@ class ChatDaemon {
|
|||
}
|
||||
}
|
||||
|
||||
public function error_handler ($errno, $errmsg, $filename, $linenum, $vars) {
|
||||
public function error_handler($errno, $errmsg, $filename, $linenum, $vars) {
|
||||
// Checks if an error needs to be suppressed due to @.
|
||||
if (error_reporting() != 0) {
|
||||
$this->trace($errmsg.' on line '.$linenum, $errno);
|
||||
|
|
|
@ -42,7 +42,7 @@ class cognitive_depth extends activity_base {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static function get_name() : \lang_string {
|
||||
public static function get_name(): \lang_string {
|
||||
return new \lang_string('indicator:cognitivedepth', 'mod_chat');
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class social_breadth extends activity_base {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static function get_name() : \lang_string {
|
||||
public static function get_name(): \lang_string {
|
||||
return new \lang_string('indicator:socialbreadth', 'mod_chat');
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,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('chat_messages', [
|
||||
'userid' => 'privacy:metadata:messages:userid',
|
||||
|
@ -98,7 +98,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) : \core_privacy\local\request\contextlist {
|
||||
public static function get_contexts_for_userid(int $userid): \core_privacy\local\request\contextlist {
|
||||
$contextlist = new \core_privacy\local\request\contextlist();
|
||||
|
||||
$sql = "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue