mirror of
https://github.com/moodle/moodle.git
synced 2025-08-10 03:16: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
|
@ -358,7 +358,7 @@ abstract class backup_activity_task extends backup_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) {
|
||||
throw new coding_exception('encode_content_links() method needs to be overridden in each subclass of backup_activity_task');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,7 +213,7 @@ abstract class backup_block_task extends backup_task {
|
|||
* Code the transformations to perform in the block in
|
||||
* order to get transportable (encoded) links
|
||||
*/
|
||||
static public function encode_content_links($content) {
|
||||
public static function encode_content_links($content) {
|
||||
throw new coding_exception('encode_content_links() method needs to be overridden in each subclass of backup_block_task');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ class backup_course_task extends backup_task {
|
|||
* @param string $content content in which to encode links.
|
||||
* @return string content with links encoded.
|
||||
*/
|
||||
static public function encode_content_links($content) {
|
||||
public static function encode_content_links($content) {
|
||||
|
||||
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
|
||||
// because they don't become transformed (section number) in backup/restore.
|
||||
|
|
|
@ -51,7 +51,7 @@ class backup_default_block_task extends backup_block_task {
|
|||
return array();
|
||||
}
|
||||
|
||||
static public function encode_content_links($content) {
|
||||
public static function encode_content_links($content) {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ abstract class backup_plan_builder {
|
|||
/**
|
||||
* Dispatches, based on type to specialised builders
|
||||
*/
|
||||
static public function build_plan($controller) {
|
||||
public static function build_plan($controller) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
|
||||
|
@ -115,7 +115,7 @@ abstract class backup_plan_builder {
|
|||
/**
|
||||
* Return one array of supported backup types
|
||||
*/
|
||||
static public function supported_backup_types() {
|
||||
public static function supported_backup_types() {
|
||||
return array(backup::TYPE_1COURSE, backup::TYPE_1SECTION, backup::TYPE_1ACTIVITY);
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ abstract class backup_plan_builder {
|
|||
/**
|
||||
* Build one 1-activity backup
|
||||
*/
|
||||
static protected function build_activity_plan($controller, $id) {
|
||||
protected static function build_activity_plan($controller, $id) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
|
||||
|
@ -153,7 +153,7 @@ abstract class backup_plan_builder {
|
|||
/**
|
||||
* Build one 1-section backup
|
||||
*/
|
||||
static protected function build_section_plan($controller, $id) {
|
||||
protected static function build_section_plan($controller, $id) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
|
||||
|
@ -175,7 +175,7 @@ abstract class backup_plan_builder {
|
|||
/**
|
||||
* Build one 1-course backup
|
||||
*/
|
||||
static protected function build_course_plan($controller, $id) {
|
||||
protected static function build_course_plan($controller, $id) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ class backup_xml_transformer extends xml_contenttransformer {
|
|||
return $content;
|
||||
}
|
||||
|
||||
static private function process_filephp_uses($matches) {
|
||||
private static function process_filephp_uses($matches) {
|
||||
|
||||
// Replace slashes (plain and encoded) and forcedownload=1 parameter
|
||||
$search = array('/', '%2f', '%2F', '?forcedownload=1', '&forcedownload=1', '&forcedownload=1');
|
||||
|
|
|
@ -260,7 +260,7 @@ abstract class restore_activity_task extends restore_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() {
|
||||
throw new coding_exception('define_decode_contents() method needs to be overridden in each subclass of restore_activity_task');
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ abstract class restore_activity_task extends restore_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() {
|
||||
throw new coding_exception('define_decode_rules() method needs to be overridden in each subclass of restore_activity_task');
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ abstract class restore_activity_task extends restore_task {
|
|||
* activity 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() {
|
||||
throw new coding_exception('define_restore_log_rules() method needs to be overridden in each subclass of restore_activity_task');
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ abstract class restore_block_task extends restore_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() {
|
||||
throw new coding_exception('define_decode_contents() method needs to be overridden in each subclass of restore_block_task');
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ abstract class restore_block_task extends restore_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() {
|
||||
throw new coding_exception('define_decode_rules() method needs to be overridden in each subclass of restore_block_task');
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ class restore_course_task extends restore_task {
|
|||
* Define the contents in the course 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('course', 'summary');
|
||||
|
@ -154,7 +154,7 @@ class restore_course_task extends restore_task {
|
|||
* Define the decoding rules for links belonging
|
||||
* to the course to be executed by the link decoder
|
||||
*/
|
||||
static public function define_decode_rules() {
|
||||
public static function define_decode_rules() {
|
||||
$rules = array();
|
||||
|
||||
// Link to the course main page (it also covers "&topic=xx" and "&week=xx"
|
||||
|
|
|
@ -50,11 +50,11 @@ class restore_default_block_task extends restore_block_task {
|
|||
return array();
|
||||
}
|
||||
|
||||
static public function define_decode_contents() {
|
||||
public static function define_decode_contents() {
|
||||
return array();
|
||||
}
|
||||
|
||||
static public function define_decode_rules() {
|
||||
public static function define_decode_rules() {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ class restore_final_task extends restore_task {
|
|||
* in final task because we need all the activities to be
|
||||
* restored in order to handle some log records properly
|
||||
*/
|
||||
static public function define_restore_log_rules() {
|
||||
public static function define_restore_log_rules() {
|
||||
$rules = array();
|
||||
|
||||
// module 'course' rules
|
||||
|
|
|
@ -93,7 +93,7 @@ abstract class restore_plan_builder {
|
|||
/**
|
||||
* Dispatches, based on type to specialised builders
|
||||
*/
|
||||
static public function build_plan($controller) {
|
||||
public static function build_plan($controller) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
|
||||
|
@ -131,7 +131,7 @@ abstract class restore_plan_builder {
|
|||
/**
|
||||
* Restore one 1-activity backup
|
||||
*/
|
||||
static protected function build_activity_plan($controller, $activityid) {
|
||||
protected static function build_activity_plan($controller, $activityid) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
$info = $controller->get_info();
|
||||
|
@ -164,7 +164,7 @@ abstract class restore_plan_builder {
|
|||
/**
|
||||
* Restore one 1-section backup
|
||||
*/
|
||||
static protected function build_section_plan($controller, $sectionid) {
|
||||
protected static function build_section_plan($controller, $sectionid) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
$info = $controller->get_info();
|
||||
|
@ -190,7 +190,7 @@ abstract class restore_plan_builder {
|
|||
/**
|
||||
* Restore one 1-course backup
|
||||
*/
|
||||
static protected function build_course_plan($controller, $courseid) {
|
||||
protected static function build_course_plan($controller, $courseid) {
|
||||
|
||||
$plan = $controller->get_plan();
|
||||
$info = $controller->get_info();
|
||||
|
|
|
@ -129,7 +129,7 @@ abstract class restore_plugin {
|
|||
* method (when available), first in the main restore_xxxx_plugin class
|
||||
* and later on each of the available subclasses
|
||||
*/
|
||||
static public function get_restore_decode_contents($plugintype) {
|
||||
public static function get_restore_decode_contents($plugintype) {
|
||||
$decodecontents = array();
|
||||
// Check the requested plugintype is a valid one
|
||||
if (!array_key_exists($plugintype, core_component::get_plugin_types($plugintype))) {
|
||||
|
@ -165,7 +165,7 @@ abstract class restore_plugin {
|
|||
* Define the contents in the plugin that must be
|
||||
* processed by the link decoder
|
||||
*/
|
||||
static public function define_plugin_decode_contents() {
|
||||
public static function define_plugin_decode_contents() {
|
||||
throw new coding_exception('define_plugin_decode_contents() method needs to be overridden in each subclass of restore_plugin');
|
||||
}
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ abstract class restore_qtype_plugin extends restore_plugin {
|
|||
*
|
||||
* Note each qtype will have, if needed, its own define_decode_contents method
|
||||
*/
|
||||
static public function define_plugin_decode_contents() {
|
||||
public static function define_plugin_decode_contents() {
|
||||
|
||||
$contents = array();
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ class restore_section_task extends restore_task {
|
|||
* Define the contents in the course 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('course_sections', 'summary', 'course_section');
|
||||
|
@ -140,7 +140,7 @@ class restore_section_task extends restore_task {
|
|||
* Define the decoding rules for links belonging
|
||||
* to the sections to be executed by the link decoder
|
||||
*/
|
||||
static public function define_decode_rules() {
|
||||
public static function define_decode_rules() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
|
|
@ -2024,7 +2024,7 @@ class restore_course_structure_step extends restore_structure_step {
|
|||
* @throws base_step_exception
|
||||
* @throws dml_exception
|
||||
*/
|
||||
public function process_course_format_option(array $data) : void {
|
||||
public function process_course_format_option(array $data): void {
|
||||
global $DB;
|
||||
|
||||
if ($data['sectionid']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue