mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +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
|
@ -99,7 +99,7 @@ abstract class core_role_allow_role_page {
|
|||
* @param int $fromroleid
|
||||
* @param int $targetroleid
|
||||
*/
|
||||
protected abstract function set_allow($fromroleid, $targetroleid);
|
||||
abstract protected function set_allow($fromroleid, $targetroleid);
|
||||
|
||||
/**
|
||||
* Load the current allows from the database.
|
||||
|
@ -183,11 +183,11 @@ abstract class core_role_allow_role_page {
|
|||
* Snippet of text displayed above the table, telling the admin what to do.
|
||||
* @return string
|
||||
*/
|
||||
public abstract function get_intro_text();
|
||||
abstract public function get_intro_text();
|
||||
|
||||
/**
|
||||
* Returns the allow class respective event class name.
|
||||
* @return string
|
||||
*/
|
||||
protected abstract function get_eventclass();
|
||||
abstract protected function get_eventclass();
|
||||
}
|
||||
|
|
|
@ -142,12 +142,12 @@ abstract class core_role_capability_table_base {
|
|||
/**
|
||||
* For subclasses to override, output header cells, after the initial capability one.
|
||||
*/
|
||||
protected abstract function add_header_cells();
|
||||
abstract protected function add_header_cells();
|
||||
|
||||
/**
|
||||
* For subclasses to override, return the number of cells that add_header_cells/add_row_cells output.
|
||||
*/
|
||||
protected abstract function num_extra_columns();
|
||||
abstract protected function num_extra_columns();
|
||||
|
||||
/**
|
||||
* For subclasses to override. Allows certain capabilties
|
||||
|
@ -191,5 +191,5 @@ abstract class core_role_capability_table_base {
|
|||
* @param stdClass $capability the capability this row relates to.
|
||||
* @return string html of row cells
|
||||
*/
|
||||
protected abstract function add_row_cells($capability);
|
||||
abstract protected function add_row_cells($capability);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
|
|||
}
|
||||
}
|
||||
|
||||
protected abstract function load_parent_permissions();
|
||||
abstract protected function load_parent_permissions();
|
||||
|
||||
/**
|
||||
* Update $this->permissions based on submitted data, while making a list of
|
||||
|
@ -156,7 +156,7 @@ abstract class core_role_capability_table_with_risks extends core_role_capabilit
|
|||
return $rowclasses;
|
||||
}
|
||||
|
||||
protected abstract function add_permission_cells($capability);
|
||||
abstract protected function add_permission_cells($capability);
|
||||
|
||||
protected function add_row_cells($capability) {
|
||||
$cells = $this->add_permission_cells($capability);
|
||||
|
|
|
@ -44,7 +44,7 @@ abstract class crud_element {
|
|||
*
|
||||
* @return \action_link[]
|
||||
*/
|
||||
protected final function get_navigation() {
|
||||
final protected function get_navigation() {
|
||||
$back = new \action_link(
|
||||
new \moodle_url('/admin/tool/dataprivacy/dataregistry.php'),
|
||||
get_string('back'),
|
||||
|
@ -62,7 +62,7 @@ abstract class crud_element {
|
|||
* @param \core\persistent $persistent
|
||||
* @return \action_menu
|
||||
*/
|
||||
protected final function action_menu($elementname, $exported, $persistent) {
|
||||
final protected function action_menu($elementname, $exported, $persistent) {
|
||||
|
||||
// Just in case, we are doing funny stuff below.
|
||||
$elementname = clean_param($elementname, PARAM_ALPHA);
|
||||
|
|
|
@ -47,33 +47,33 @@ abstract class base_bin {
|
|||
*
|
||||
* @param int $itemid Item ID to retrieve.
|
||||
*/
|
||||
public abstract function get_item($itemid);
|
||||
abstract public function get_item($itemid);
|
||||
|
||||
/**
|
||||
* Returns a list of items in the recycle bin.
|
||||
*/
|
||||
public abstract function get_items();
|
||||
abstract public function get_items();
|
||||
|
||||
/**
|
||||
* Store an item in this recycle bin.
|
||||
*
|
||||
* @param \stdClass $item Item to store.
|
||||
*/
|
||||
public abstract function store_item($item);
|
||||
abstract public function store_item($item);
|
||||
|
||||
/**
|
||||
* Restore an item from the recycle bin.
|
||||
*
|
||||
* @param \stdClass $item The item database record
|
||||
*/
|
||||
public abstract function restore_item($item);
|
||||
abstract public function restore_item($item);
|
||||
|
||||
/**
|
||||
* Delete an item from the recycle bin.
|
||||
*
|
||||
* @param \stdClass $item The item database record
|
||||
*/
|
||||
public abstract function delete_item($item);
|
||||
abstract public function delete_item($item);
|
||||
|
||||
/**
|
||||
* Empty the recycle bin.
|
||||
|
@ -91,15 +91,15 @@ abstract class base_bin {
|
|||
/**
|
||||
* Can we view items in this recycle bin?
|
||||
*/
|
||||
public abstract function can_view();
|
||||
abstract public function can_view();
|
||||
|
||||
/**
|
||||
* Can we restore items in this recycle bin?
|
||||
*/
|
||||
public abstract function can_restore();
|
||||
abstract public function can_restore();
|
||||
|
||||
/**
|
||||
* Can we delete this?
|
||||
*/
|
||||
public abstract function can_delete();
|
||||
abstract public function can_delete();
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ abstract class webservice_test_client_base_form extends moodleform {
|
|||
/**
|
||||
* Definition of the parameters used by this WS function
|
||||
*/
|
||||
protected abstract function test_client_definition();
|
||||
abstract protected function test_client_definition();
|
||||
|
||||
/**
|
||||
* The form definition.
|
||||
|
|
|
@ -79,7 +79,7 @@ abstract class calculable {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static abstract function get_name() : \lang_string;
|
||||
abstract public static function get_name(): \lang_string;
|
||||
|
||||
/**
|
||||
* The class id is the calculable class full qualified class name.
|
||||
|
@ -160,7 +160,7 @@ abstract class calculable {
|
|||
* @param array $info The data. Indexed by an id unique across the site. E.g. an activity id.
|
||||
* @return null
|
||||
*/
|
||||
protected final function add_shared_calculation_info(int $sampleid, array $info) {
|
||||
final protected function add_shared_calculation_info(int $sampleid, array $info) {
|
||||
if (is_null($this->calculationinfo)) {
|
||||
// Lazy loading.
|
||||
$this->calculationinfo = new \core_analytics\calculation_info();
|
||||
|
@ -178,7 +178,7 @@ abstract class calculable {
|
|||
* @param int $rangeindex
|
||||
* @return null
|
||||
*/
|
||||
public final function save_calculation_info(\core_analytics\local\time_splitting\base $timesplitting, int $rangeindex) {
|
||||
final public function save_calculation_info(\core_analytics\local\time_splitting\base $timesplitting, int $rangeindex) {
|
||||
if (!is_null($this->calculationinfo)) {
|
||||
$this->calculationinfo->save($this, $timesplitting, $rangeindex);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ abstract class binary extends discrete {
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public static final function get_classes() {
|
||||
final public static function get_classes() {
|
||||
return [-1, 1];
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ abstract class community_of_inquiry_activity extends linear {
|
|||
*
|
||||
* @var string The activity name (e.g. assign or quiz)
|
||||
*/
|
||||
public final function get_activity_type() {
|
||||
final public function get_activity_type() {
|
||||
$class = get_class($this);
|
||||
$package = stristr($class, "\\", true);
|
||||
$type = str_replace("mod_", "", $package);
|
||||
|
@ -197,7 +197,7 @@ abstract class community_of_inquiry_activity extends linear {
|
|||
* @param \stdClass|false $user
|
||||
* @return bool
|
||||
*/
|
||||
protected final function any_log($contextid, $user) {
|
||||
final protected function any_log($contextid, $user) {
|
||||
if (empty($this->activitylogs[$contextid])) {
|
||||
return false;
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ abstract class community_of_inquiry_activity extends linear {
|
|||
* @param \stdClass|false $user
|
||||
* @return bool
|
||||
*/
|
||||
protected final function any_write_log($contextid, $user) {
|
||||
final protected function any_write_log($contextid, $user) {
|
||||
if (empty($this->activitylogs[$contextid])) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ abstract class binary extends discrete {
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public static final function get_classes() {
|
||||
final public static function get_classes() {
|
||||
return array(0, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ abstract class base {
|
|||
*
|
||||
* @return \lang_string
|
||||
*/
|
||||
public static abstract function get_name() : \lang_string;
|
||||
abstract public static function get_name(): \lang_string;
|
||||
|
||||
/**
|
||||
* Returns the time splitting method id.
|
||||
|
@ -231,7 +231,7 @@ abstract class base {
|
|||
* @param int $rangeindex
|
||||
* @return string
|
||||
*/
|
||||
public final function append_rangeindex($sampleid, $rangeindex) {
|
||||
final public function append_rangeindex($sampleid, $rangeindex) {
|
||||
return $sampleid . '-' . $rangeindex;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ abstract class base {
|
|||
* @param string $uniquesampleid
|
||||
* @return array array($sampleid, $rangeindex)
|
||||
*/
|
||||
public final function infer_sample_info($uniquesampleid) {
|
||||
final public function infer_sample_info($uniquesampleid) {
|
||||
return explode('-', $uniquesampleid);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class test_target_shortname_multiclass extends \core_analytics\local\target\disc
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public static final function get_classes() {
|
||||
final public static function get_classes() {
|
||||
return array(0, 1, 2);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ abstract class condition extends tree_node {
|
|||
* @param int $userid User ID to check availability for
|
||||
* @return bool True if available
|
||||
*/
|
||||
public abstract function is_available($not, info $info, $grabthelot, $userid);
|
||||
abstract public function is_available($not, info $info, $grabthelot, $userid);
|
||||
|
||||
public function check_available($not, info $info, $grabthelot, $userid) {
|
||||
// Use is_available, and we always display (at this stage).
|
||||
|
@ -195,7 +195,7 @@ abstract class condition extends tree_node {
|
|||
* @return string Information string (for admin) about all restrictions on
|
||||
* this item
|
||||
*/
|
||||
public abstract function get_description($full, $not, info $info);
|
||||
abstract public function get_description($full, $not, info $info);
|
||||
|
||||
/**
|
||||
* Obtains a string describing this restriction, used when there is only
|
||||
|
@ -235,7 +235,7 @@ abstract class condition extends tree_node {
|
|||
*
|
||||
* @return string Text representation of parameters
|
||||
*/
|
||||
protected abstract function get_debug_string();
|
||||
abstract protected function get_debug_string();
|
||||
|
||||
public function update_dependency_id($table, $oldid, $newid) {
|
||||
// By default, assumes there are no dependent ids.
|
||||
|
|
|
@ -81,7 +81,7 @@ abstract class info {
|
|||
*
|
||||
* @return \context Context for this item
|
||||
*/
|
||||
public abstract function get_context();
|
||||
abstract public function get_context();
|
||||
|
||||
/**
|
||||
* Obtains the modinfo associated with this availability information.
|
||||
|
@ -378,7 +378,7 @@ abstract class info {
|
|||
*
|
||||
* @return string Name of item
|
||||
*/
|
||||
protected abstract function get_thing_name();
|
||||
abstract protected function get_thing_name();
|
||||
|
||||
/**
|
||||
* Stores an updated availability tree JSON structure into the relevant
|
||||
|
@ -386,7 +386,7 @@ abstract class info {
|
|||
*
|
||||
* @param string $availabilty New JSON value
|
||||
*/
|
||||
protected abstract function set_in_database($availabilty);
|
||||
abstract protected function set_in_database($availabilty);
|
||||
|
||||
/**
|
||||
* In rare cases the system may want to change all references to one ID
|
||||
|
@ -662,7 +662,7 @@ abstract class info {
|
|||
*
|
||||
* @return string Name of capability used to view hidden items of this type
|
||||
*/
|
||||
protected abstract function get_view_hidden_capability();
|
||||
abstract protected function get_view_hidden_capability();
|
||||
|
||||
/**
|
||||
* Obtains SQL that returns a list of enrolled users that has been filtered
|
||||
|
|
|
@ -63,7 +63,7 @@ abstract class tree_node {
|
|||
* @param int $userid User ID to check availability for
|
||||
* @return result Availability check result
|
||||
*/
|
||||
public abstract function check_available($not,
|
||||
abstract public function check_available($not,
|
||||
\core_availability\info $info, $grabthelot, $userid);
|
||||
|
||||
/**
|
||||
|
@ -77,14 +77,14 @@ abstract class tree_node {
|
|||
* @param bool $not Set true if we are inverting the condition
|
||||
* @return bool True if condition will return available for everyone
|
||||
*/
|
||||
public abstract function is_available_for_all($not = false);
|
||||
abstract public function is_available_for_all($not = false);
|
||||
|
||||
/**
|
||||
* Saves tree data back to a structure object.
|
||||
*
|
||||
* @return \stdClass Structure object (ready to be made into JSON format)
|
||||
*/
|
||||
public abstract function save();
|
||||
abstract public function save();
|
||||
|
||||
/**
|
||||
* Checks whether this node should be included after restore or not. The
|
||||
|
@ -134,7 +134,7 @@ abstract class tree_node {
|
|||
* @param int $newid New ID
|
||||
* @return bool True if it changed, otherwise false
|
||||
*/
|
||||
public abstract function update_dependency_id($table, $oldid, $newid);
|
||||
abstract public function update_dependency_id($table, $oldid, $newid);
|
||||
|
||||
/**
|
||||
* Checks whether this condition applies to user lists. The default is
|
||||
|
|
|
@ -217,7 +217,7 @@ abstract class base_converter implements loggable {
|
|||
/**
|
||||
* Converts the contents of the tempdir into the target format in the workdir
|
||||
*/
|
||||
protected abstract function execute();
|
||||
abstract protected function execute();
|
||||
|
||||
/**
|
||||
* Prepares a new empty working directory
|
||||
|
|
|
@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die();
|
|||
require_once($CFG->dirroot . '/backup/converter/convertlib.php');
|
||||
|
||||
class imscc11_export_converter extends base_converter {
|
||||
static public function get_deps() {
|
||||
public static function get_deps() {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/backup/util/settings/setting_dependency.class.php');
|
||||
return array(
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ abstract class backup_factory {
|
|||
/**
|
||||
* Dispatches the creation of the @backup_plan to the proper format builder
|
||||
*/
|
||||
static public function build_plan($controller) {
|
||||
public static function build_plan($controller) {
|
||||
backup_plan_builder::build_plan($controller);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ class async_helper {
|
|||
* @param int $id The backup id to get.
|
||||
* @return object $backuprec The backup controller record.
|
||||
*/
|
||||
static public function get_backup_record($id) {
|
||||
public static function get_backup_record($id) {
|
||||
global $DB;
|
||||
|
||||
$backuprec = $DB->get_record('backup_controllers', array('backupid' => $id), '*', MUST_EXIST);
|
||||
|
@ -203,7 +203,7 @@ class async_helper {
|
|||
*
|
||||
* @return bool $async True if async mode enabled false otherwise.
|
||||
*/
|
||||
static public function is_async_enabled() {
|
||||
public static function is_async_enabled() {
|
||||
global $CFG;
|
||||
|
||||
$async = false;
|
||||
|
|
|
@ -32,7 +32,7 @@ abstract class backup_helper {
|
|||
/**
|
||||
* Given one backupid, create all the needed dirs to have one backup temp dir available
|
||||
*/
|
||||
static public function check_and_create_backup_dir($backupid) {
|
||||
public static function check_and_create_backup_dir($backupid) {
|
||||
$backupiddir = make_backup_temp_directory($backupid, false);
|
||||
if (empty($backupiddir)) {
|
||||
throw new backup_helper_exception('cannot_create_backup_temp_dir');
|
||||
|
@ -48,7 +48,7 @@ abstract class backup_helper {
|
|||
* @param string $backupid Backup id
|
||||
* @param \core\progress\base $progress Optional progress reporting object
|
||||
*/
|
||||
static public function clear_backup_dir($backupid, \core\progress\base $progress = null) {
|
||||
public static function clear_backup_dir($backupid, \core\progress\base $progress = null) {
|
||||
$backupiddir = make_backup_temp_directory($backupid, false);
|
||||
if (!self::delete_dir_contents($backupiddir, '', $progress)) {
|
||||
throw new backup_helper_exception('cannot_empty_backup_temp_dir');
|
||||
|
@ -65,7 +65,7 @@ abstract class backup_helper {
|
|||
* @param string $backupid Backup id
|
||||
* @param \core\progress\base $progress Optional progress reporting object
|
||||
*/
|
||||
static public function delete_backup_dir($backupid, \core\progress\base $progress = null) {
|
||||
public static function delete_backup_dir($backupid, \core\progress\base $progress = null) {
|
||||
$backupiddir = make_backup_temp_directory($backupid, false);
|
||||
self::clear_backup_dir($backupid, $progress);
|
||||
return rmdir($backupiddir);
|
||||
|
@ -83,7 +83,7 @@ abstract class backup_helper {
|
|||
* @param string $excludedir Exclude this directory
|
||||
* @param \core\progress\base $progress Optional progress reporting object
|
||||
*/
|
||||
static public function delete_dir_contents($dir, $excludeddir='', \core\progress\base $progress = null) {
|
||||
public static function delete_dir_contents($dir, $excludeddir='', \core\progress\base $progress = null) {
|
||||
global $CFG;
|
||||
|
||||
if ($progress) {
|
||||
|
@ -156,7 +156,7 @@ abstract class backup_helper {
|
|||
* @param int $deletebefore Delete files and directories older than this time
|
||||
* @param \core\progress\base $progress Optional progress reporting object
|
||||
*/
|
||||
static public function delete_old_backup_dirs($deletebefore, \core\progress\base $progress = null) {
|
||||
public static function delete_old_backup_dirs($deletebefore, \core\progress\base $progress = null) {
|
||||
$status = true;
|
||||
// Get files and directories in the backup temp dir.
|
||||
$backuptempdir = make_backup_temp_directory('');
|
||||
|
@ -188,7 +188,7 @@ abstract class backup_helper {
|
|||
* parameter is true, supporting translation via get_string() and sending to
|
||||
* standard output.
|
||||
*/
|
||||
static public function log($message, $level, $a, $depth, $display, $logger) {
|
||||
public static function log($message, $level, $a, $depth, $display, $logger) {
|
||||
// Send to standard loggers
|
||||
$logmessage = $message;
|
||||
$options = empty($depth) ? array() : array('depth' => $depth);
|
||||
|
@ -219,7 +219,7 @@ abstract class backup_helper {
|
|||
*
|
||||
* @throws moodle_exception in case of any problems
|
||||
*/
|
||||
static public function store_backup_file($backupid, $filepath, \core\progress\base $progress = null) {
|
||||
public static function store_backup_file($backupid, $filepath, \core\progress\base $progress = null) {
|
||||
global $CFG;
|
||||
|
||||
// First of all, get some information from the backup_controller to help us decide
|
||||
|
|
|
@ -47,7 +47,7 @@ abstract class base_logger implements checksumable {
|
|||
$this->next = null;
|
||||
}
|
||||
|
||||
public final function set_next($next) {
|
||||
final public function set_next($next) {
|
||||
// TODO: Check is a base logger
|
||||
|
||||
// TODO: Check next hasn't been set already
|
||||
|
@ -76,7 +76,7 @@ abstract class base_logger implements checksumable {
|
|||
*
|
||||
* @since Moodle 3.1
|
||||
*/
|
||||
public final function destroy() {
|
||||
final public function destroy() {
|
||||
// Recursively destroy the chain.
|
||||
if ($this->next !== null) {
|
||||
$this->next->destroy();
|
||||
|
@ -112,7 +112,7 @@ abstract class base_logger implements checksumable {
|
|||
|
||||
abstract protected function action($message, $level, $options = null); // To implement
|
||||
|
||||
public final function process($message, $level, $options = null) {
|
||||
final public function process($message, $level, $options = null) {
|
||||
$result = true;
|
||||
if ($this->level != backup::LOG_NONE && $this->level >= $level
|
||||
&& !(defined('BEHAT_TEST') && BEHAT_TEST)) { // Perform action conditionally.
|
||||
|
|
|
@ -158,7 +158,7 @@ abstract class base_plan implements checksumable, executable {
|
|||
* with their corresponding settings
|
||||
* (must set the $built property to true)
|
||||
*/
|
||||
public abstract function build();
|
||||
abstract public function build();
|
||||
|
||||
public function is_checksum_correct($checksum) {
|
||||
return $this->calculate_checksum() === $checksum;
|
||||
|
@ -201,7 +201,7 @@ abstract class base_plan implements checksumable, executable {
|
|||
*
|
||||
* @return \core\progress\base Progress reporting object
|
||||
*/
|
||||
public abstract function get_progress();
|
||||
abstract public function get_progress();
|
||||
|
||||
/**
|
||||
* Destroy all circular references. It helps PHP 5.2 a lot!
|
||||
|
|
|
@ -162,7 +162,7 @@ abstract class base_task implements checksumable, executable, loggable {
|
|||
* Function responsible for building the steps of any task
|
||||
* (must set the $built property to true)
|
||||
*/
|
||||
public abstract function build();
|
||||
abstract public function build();
|
||||
|
||||
/**
|
||||
* Function responsible for executing the steps of any task
|
||||
|
@ -264,7 +264,7 @@ abstract class base_task implements checksumable, executable, loggable {
|
|||
* that are associated with one task. The function will, directly, inject the settings
|
||||
* in the task.
|
||||
*/
|
||||
protected abstract function define_settings();
|
||||
abstract protected function define_settings();
|
||||
|
||||
protected function add_setting($setting) {
|
||||
if (! $setting instanceof base_setting) {
|
||||
|
|
|
@ -101,7 +101,7 @@ class restore_activity_results_block_task extends restore_block_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() {
|
||||
return array();
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ class restore_activity_results_block_task extends restore_block_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() {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,11 +85,11 @@ class restore_glossary_random_block_task extends restore_block_task {
|
|||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class backup_html_block_task extends backup_block_task {
|
|||
return array('text'); // We need to encode some attrs in configdata
|
||||
}
|
||||
|
||||
static public function encode_content_links($content) {
|
||||
public static function encode_content_links($content) {
|
||||
return $content; // No special encoding of links
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class restore_html_block_task extends restore_block_task {
|
|||
return array('text'); // We need to encode some attrs in configdata
|
||||
}
|
||||
|
||||
static public function define_decode_contents() {
|
||||
public static function define_decode_contents() {
|
||||
|
||||
$contents = array();
|
||||
|
||||
|
@ -52,7 +52,7 @@ class restore_html_block_task extends restore_block_task {
|
|||
return $contents;
|
||||
}
|
||||
|
||||
static public function define_decode_rules() {
|
||||
public static function define_decode_rules() {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class backup_rss_client_block_task extends backup_block_task {
|
|||
return array(); // No special handling of configdata
|
||||
}
|
||||
|
||||
static public function encode_content_links($content) {
|
||||
public static function encode_content_links($content) {
|
||||
return $content; // No special encoding of links
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,11 +47,11 @@ class restore_rss_client_block_task extends restore_block_task {
|
|||
return array(); // No special handling of configdata
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,11 +78,11 @@ class restore_tags_block_task extends restore_block_task {
|
|||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
2
cache/classes/administration_helper.php
vendored
2
cache/classes/administration_helper.php
vendored
|
@ -395,7 +395,7 @@ abstract class administration_helper extends cache_helper {
|
|||
* @param array $forminfo empty array to be set by actions.
|
||||
* @return array array of form info.
|
||||
*/
|
||||
public abstract function perform_cache_actions(string $action, array $forminfo): array;
|
||||
abstract public function perform_cache_actions(string $action, array $forminfo): array;
|
||||
|
||||
/**
|
||||
* This function must be implemented to display the cache admin page.
|
||||
|
|
6
cache/forms.php
vendored
6
cache/forms.php
vendored
|
@ -42,7 +42,7 @@ class cachestore_addinstance_form extends moodleform {
|
|||
/**
|
||||
* The definition of the add instance form
|
||||
*/
|
||||
protected final function definition() {
|
||||
final protected function definition() {
|
||||
$form = $this->_form;
|
||||
$store = $this->_customdata['store'];
|
||||
$plugin = $this->_customdata['plugin'];
|
||||
|
@ -131,7 +131,7 @@ class cache_definition_mappings_form extends moodleform {
|
|||
/**
|
||||
* The definition of the form
|
||||
*/
|
||||
protected final function definition() {
|
||||
final protected function definition() {
|
||||
global $OUTPUT;
|
||||
|
||||
$definition = $this->_customdata['definition'];
|
||||
|
@ -202,7 +202,7 @@ class cache_definition_sharing_form extends moodleform {
|
|||
/**
|
||||
* The definition of the form
|
||||
*/
|
||||
protected final function definition() {
|
||||
final protected function definition() {
|
||||
$definition = $this->_customdata['definition'];
|
||||
$sharingoptions = $this->_customdata['sharingoptions'];
|
||||
$form = $this->_form;
|
||||
|
|
2
cache/lib.php
vendored
2
cache/lib.php
vendored
|
@ -214,7 +214,7 @@ class cacheable_object_array extends ArrayObject implements cacheable_object {
|
|||
* @return cacheable_object_array
|
||||
* @throws coding_exception
|
||||
*/
|
||||
final static public function wake_from_cache($data) {
|
||||
final public static function wake_from_cache($data) {
|
||||
if (!is_array($data)) {
|
||||
throw new coding_exception('Invalid data type when reviving cacheable_array data');
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ abstract class event_abstract_factory implements event_factory_interface {
|
|||
* @param event_interface $event The event to be updated.
|
||||
* @return event_interface The potentially modified event.
|
||||
*/
|
||||
protected abstract function apply_component_action(event_interface $event);
|
||||
abstract protected function apply_component_action(event_interface $event);
|
||||
|
||||
/**
|
||||
* Exposes the event (or not).
|
||||
|
@ -82,7 +82,7 @@ abstract class event_abstract_factory implements event_factory_interface {
|
|||
* @param event_interface $event The event to potentially expose.
|
||||
* @return event_interface|null The exposed event or null.
|
||||
*/
|
||||
protected abstract function expose_event(event_interface $event);
|
||||
abstract protected function expose_event(event_interface $event);
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
@ -35,7 +35,7 @@ abstract class type_base {
|
|||
*
|
||||
* @return string the calendar name
|
||||
*/
|
||||
public abstract function get_name();
|
||||
abstract public function get_name();
|
||||
|
||||
/**
|
||||
* Returns a list of all the possible days for all months.
|
||||
|
@ -49,28 +49,28 @@ abstract class type_base {
|
|||
*
|
||||
* @return array the days
|
||||
*/
|
||||
public abstract function get_days();
|
||||
abstract public function get_days();
|
||||
|
||||
/**
|
||||
* Returns a list of all the names of the months.
|
||||
*
|
||||
* @return array the month names
|
||||
*/
|
||||
public abstract function get_months();
|
||||
abstract public function get_months();
|
||||
|
||||
/**
|
||||
* Returns the minimum year for the calendar.
|
||||
*
|
||||
* @return int The minimum year
|
||||
*/
|
||||
public abstract function get_min_year();
|
||||
abstract public function get_min_year();
|
||||
|
||||
/**
|
||||
* Returns the maximum year for the calendar
|
||||
*
|
||||
* @return int The maximum year
|
||||
*/
|
||||
public abstract function get_max_year();
|
||||
abstract public function get_max_year();
|
||||
|
||||
/**
|
||||
* Returns an array of years.
|
||||
|
@ -79,7 +79,7 @@ abstract class type_base {
|
|||
* @param int $maxyear
|
||||
* @return array the years
|
||||
*/
|
||||
public abstract function get_years($minyear = null, $maxyear = null);
|
||||
abstract public function get_years($minyear = null, $maxyear = null);
|
||||
|
||||
/**
|
||||
* Returns a multidimensional array with information for day, month, year
|
||||
|
@ -91,14 +91,14 @@ abstract class type_base {
|
|||
* @param int $maxyear The year to finish with
|
||||
* @return array Full date information
|
||||
*/
|
||||
public abstract function get_date_order($minyear = null, $maxyear = null);
|
||||
abstract public function get_date_order($minyear = null, $maxyear = null);
|
||||
|
||||
/**
|
||||
* Returns the number of days in a week.
|
||||
*
|
||||
* @return int the number of days
|
||||
*/
|
||||
public abstract function get_num_weekdays();
|
||||
abstract public function get_num_weekdays();
|
||||
|
||||
/**
|
||||
* Returns an indexed list of all the names of the weekdays.
|
||||
|
@ -109,7 +109,7 @@ abstract class type_base {
|
|||
*
|
||||
* @return array array of days
|
||||
*/
|
||||
public abstract function get_weekdays();
|
||||
abstract public function get_weekdays();
|
||||
|
||||
/**
|
||||
* Returns the index of the starting week day.
|
||||
|
@ -119,7 +119,7 @@ abstract class type_base {
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
public abstract function get_starting_weekday();
|
||||
abstract public function get_starting_weekday();
|
||||
|
||||
/**
|
||||
* Returns the index of the weekday for a specific calendar date.
|
||||
|
@ -129,7 +129,7 @@ abstract class type_base {
|
|||
* @param int $day
|
||||
* @return int
|
||||
*/
|
||||
public abstract function get_weekday($year, $month, $day);
|
||||
abstract public function get_weekday($year, $month, $day);
|
||||
|
||||
/**
|
||||
* Returns the number of days in a given month.
|
||||
|
@ -139,7 +139,7 @@ abstract class type_base {
|
|||
* @param int $month
|
||||
* @return int the number of days
|
||||
*/
|
||||
public abstract function get_num_days_in_month($year, $month);
|
||||
abstract public function get_num_days_in_month($year, $month);
|
||||
|
||||
/**
|
||||
* Get the previous month.
|
||||
|
@ -148,7 +148,7 @@ abstract class type_base {
|
|||
* @param int $month
|
||||
* @return array previous month and year
|
||||
*/
|
||||
public abstract function get_prev_month($year, $month);
|
||||
abstract public function get_prev_month($year, $month);
|
||||
|
||||
/**
|
||||
* Get the next month.
|
||||
|
@ -157,7 +157,7 @@ abstract class type_base {
|
|||
* @param int $month
|
||||
* @return array the following month and year
|
||||
*/
|
||||
public abstract function get_next_month($year, $month);
|
||||
abstract public function get_next_month($year, $month);
|
||||
|
||||
/**
|
||||
* Returns a formatted string that represents a date in user time.
|
||||
|
@ -172,7 +172,7 @@ abstract class type_base {
|
|||
* if false then the leading zero is maintained
|
||||
* @return string the formatted date/time
|
||||
*/
|
||||
public abstract function timestamp_to_date_string($time, $format, $timezone, $fixday, $fixhour);
|
||||
abstract public function timestamp_to_date_string($time, $format, $timezone, $fixday, $fixhour);
|
||||
|
||||
/**
|
||||
* Given a $time timestamp in GMT (seconds since epoch), returns an array that represents
|
||||
|
@ -183,7 +183,7 @@ abstract class type_base {
|
|||
* {@link https://moodledev.io/docs/apis/subsystems/time#timezone}
|
||||
* @return array an array that represents the date in user time
|
||||
*/
|
||||
public abstract function timestamp_to_date_array($time, $timezone = 99);
|
||||
abstract public function timestamp_to_date_array($time, $timezone = 99);
|
||||
|
||||
/**
|
||||
* Provided with a day, month, year, hour and minute in the specific
|
||||
|
@ -196,7 +196,7 @@ abstract class type_base {
|
|||
* @param int $minute
|
||||
* @return array the converted date
|
||||
*/
|
||||
public abstract function convert_to_gregorian($year, $month, $day, $hour = 0, $minute = 0);
|
||||
abstract public function convert_to_gregorian($year, $month, $day, $hour = 0, $minute = 0);
|
||||
|
||||
/**
|
||||
* Provided with a day, month, year, hour and minute in a Gregorian date
|
||||
|
@ -209,14 +209,14 @@ abstract class type_base {
|
|||
* @param int $minute
|
||||
* @return array the converted date
|
||||
*/
|
||||
public abstract function convert_from_gregorian($year, $month, $day, $hour = 0, $minute = 0);
|
||||
abstract public function convert_from_gregorian($year, $month, $day, $hour = 0, $minute = 0);
|
||||
|
||||
/**
|
||||
* This return locale for windows os.
|
||||
*
|
||||
* @return string locale
|
||||
*/
|
||||
public abstract function locale_win_charset();
|
||||
abstract public function locale_win_charset();
|
||||
|
||||
/**
|
||||
* Provided with a day, month, year, hour and minute in the specific
|
||||
|
|
|
@ -374,7 +374,7 @@ abstract class contenttype {
|
|||
* @param content $content The content to be managed.
|
||||
* @return bool True if content could be managed. False otherwise.
|
||||
*/
|
||||
public final function can_manage(content $content): bool {
|
||||
final public function can_manage(content $content): bool {
|
||||
global $USER;
|
||||
|
||||
if ($this->context->id != $content->get_content()->contextid) {
|
||||
|
|
|
@ -110,7 +110,7 @@ abstract class base {
|
|||
* @param string $format
|
||||
* @return string
|
||||
*/
|
||||
protected static final function get_format_or_default($format) {
|
||||
final protected static function get_format_or_default($format) {
|
||||
global $CFG;
|
||||
require_once($CFG->dirroot . '/course/lib.php');
|
||||
|
||||
|
@ -153,7 +153,7 @@ abstract class base {
|
|||
* @param string $format
|
||||
* @return string
|
||||
*/
|
||||
protected static final function get_class_name($format) {
|
||||
final protected static function get_class_name($format) {
|
||||
global $CFG;
|
||||
static $classnames = array('site' => 'format_site');
|
||||
if (!isset($classnames[$format])) {
|
||||
|
@ -180,7 +180,7 @@ abstract class base {
|
|||
* an object that has the property 'format' and may contain property 'id'
|
||||
* @return base
|
||||
*/
|
||||
public static final function instance($courseorid) {
|
||||
final public static function instance($courseorid) {
|
||||
global $DB;
|
||||
if (!is_object($courseorid)) {
|
||||
$courseid = (int)$courseorid;
|
||||
|
@ -214,7 +214,7 @@ abstract class base {
|
|||
*
|
||||
* @param int $courseid
|
||||
*/
|
||||
public static final function reset_course_cache($courseid = 0) {
|
||||
final public static function reset_course_cache($courseid = 0) {
|
||||
if ($courseid) {
|
||||
if (isset(self::$instances[$courseid])) {
|
||||
foreach (self::$instances[$courseid] as $format => $object) {
|
||||
|
@ -289,7 +289,7 @@ abstract class base {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public final function get_format() {
|
||||
final public function get_format() {
|
||||
return $this->format;
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ abstract class base {
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
public final function get_courseid() {
|
||||
final public function get_courseid() {
|
||||
return $this->courseid;
|
||||
}
|
||||
|
||||
|
@ -490,7 +490,7 @@ abstract class base {
|
|||
*
|
||||
* @return array of section_info objects
|
||||
*/
|
||||
public final function get_sections() {
|
||||
final public function get_sections() {
|
||||
if ($course = $this->get_course()) {
|
||||
$modinfo = get_fast_modinfo($course);
|
||||
return $modinfo->get_section_info_all();
|
||||
|
@ -505,7 +505,7 @@ abstract class base {
|
|||
* @param int $strictness
|
||||
* @return section_info
|
||||
*/
|
||||
public final function get_section($section, $strictness = IGNORE_MISSING) {
|
||||
final public function get_section($section, $strictness = IGNORE_MISSING) {
|
||||
if (is_object($section)) {
|
||||
$sectionnum = $section->section;
|
||||
} else {
|
||||
|
@ -989,7 +989,7 @@ abstract class base {
|
|||
*
|
||||
* @return lang_string
|
||||
*/
|
||||
public final function get_format_name() {
|
||||
final public function get_format_name() {
|
||||
return new lang_string('pluginname', 'format_'.$this->get_format());
|
||||
}
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
* @param array $ignored argument ignored
|
||||
* @return string
|
||||
*/
|
||||
public final function course_category_tree(array $ignored) {
|
||||
final public function course_category_tree(array $ignored) {
|
||||
debugging('Function core_course_renderer::course_category_tree() is deprecated, please use frontpage_combo_list()', DEBUG_DEVELOPER);
|
||||
return $this->frontpage_combo_list();
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ class core_course_renderer extends plugin_renderer_base {
|
|||
* @param int $depth
|
||||
* @return string
|
||||
*/
|
||||
protected final function course_category_tree_category(stdClass $category, $depth=1) {
|
||||
final protected function course_category_tree_category(stdClass $category, $depth=1) {
|
||||
debugging('Function core_course_renderer::course_category_tree_category() is deprecated', DEBUG_DEVELOPER);
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -299,7 +299,7 @@ abstract class data_controller {
|
|||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public abstract function get_default_value();
|
||||
abstract public function get_default_value();
|
||||
|
||||
/**
|
||||
* Returns the value as it is stored in the database or default value if data record is not present
|
||||
|
@ -334,7 +334,7 @@ abstract class data_controller {
|
|||
*
|
||||
* @param \MoodleQuickForm $mform
|
||||
*/
|
||||
public abstract function instance_form_definition(\MoodleQuickForm $mform);
|
||||
abstract public function instance_form_definition(\MoodleQuickForm $mform);
|
||||
|
||||
/**
|
||||
* Returns value in a human-readable format or default value if data record is not present
|
||||
|
|
|
@ -208,7 +208,7 @@ abstract class field_controller {
|
|||
*
|
||||
* @return category_controller
|
||||
*/
|
||||
public final function get_category() : category_controller {
|
||||
final public function get_category(): category_controller {
|
||||
return $this->category;
|
||||
}
|
||||
|
||||
|
@ -231,7 +231,7 @@ abstract class field_controller {
|
|||
*
|
||||
* @return handler
|
||||
*/
|
||||
public final function get_handler() : handler {
|
||||
final public function get_handler(): handler {
|
||||
return $this->get_category()->get_handler();
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ abstract class field_controller {
|
|||
*
|
||||
* @param \MoodleQuickForm $mform
|
||||
*/
|
||||
public abstract function config_form_definition(\MoodleQuickForm $mform);
|
||||
abstract public function config_form_definition(\MoodleQuickForm $mform);
|
||||
|
||||
/**
|
||||
* Returns the field name formatted according to configuration context.
|
||||
|
|
|
@ -83,7 +83,7 @@ abstract class handler {
|
|||
*
|
||||
* @param int $itemid
|
||||
*/
|
||||
protected final function __construct(int $itemid = 0) {
|
||||
final protected function __construct(int $itemid = 0) {
|
||||
if (!preg_match('|^(\w+_[\w_]+)\\\\customfield\\\\([\w_]+)_handler$|', static::class, $matches)) {
|
||||
throw new \coding_exception('Handler class name must have format: <PLUGIN>\\customfield\\<AREA>_handler');
|
||||
}
|
||||
|
|
|
@ -748,7 +748,7 @@ abstract class grade_edit_tree_column {
|
|||
}
|
||||
}
|
||||
|
||||
public abstract function get_header_cell();
|
||||
abstract public function get_header_cell();
|
||||
|
||||
public function get_category_cell($category, $levelclass, $params) {
|
||||
$cell = clone($this->categorycell);
|
||||
|
|
|
@ -306,7 +306,7 @@ abstract class grade_export {
|
|||
/**
|
||||
* Implemented by child class
|
||||
*/
|
||||
public abstract function print_grades();
|
||||
abstract public function print_grades();
|
||||
|
||||
/**
|
||||
* Prints preview of exported grades on screen as a feedback mechanism
|
||||
|
|
|
@ -701,7 +701,7 @@ abstract class gradingform_controller {
|
|||
* last key is the maximum grade.
|
||||
* @param bool $allowgradedecimals if decimal values are allowed as grades.
|
||||
*/
|
||||
public final function set_grade_range(array $graderange, $allowgradedecimals = false) {
|
||||
final public function set_grade_range(array $graderange, $allowgradedecimals = false) {
|
||||
$this->graderange = $graderange;
|
||||
$this->allowgradedecimals = $allowgradedecimals;
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ abstract class gradingform_controller {
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
public final function get_grade_range() {
|
||||
final public function get_grade_range() {
|
||||
if (empty($this->graderange)) {
|
||||
return array();
|
||||
}
|
||||
|
@ -723,7 +723,7 @@ abstract class gradingform_controller {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public final function get_allow_grade_decimals() {
|
||||
final public function get_allow_grade_decimals() {
|
||||
return $this->allowgradedecimals;
|
||||
}
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ class helper {
|
|||
* @param string $statusaction A link to 'Run now' option for the task
|
||||
* @return array
|
||||
*/
|
||||
static private function convert_info_into_array(string $tool,
|
||||
private static function convert_info_into_array(string $tool,
|
||||
\moodle_url $link,
|
||||
int $status,
|
||||
string $statusaction = ''): array {
|
||||
|
|
|
@ -2023,7 +2023,7 @@ abstract class admin_setting {
|
|||
* Returns current value of this setting
|
||||
* @return mixed array or string depending on instance, NULL means not set yet
|
||||
*/
|
||||
public abstract function get_setting();
|
||||
abstract public function get_setting();
|
||||
|
||||
/**
|
||||
* Returns default setting if exists
|
||||
|
@ -2048,7 +2048,7 @@ abstract class admin_setting {
|
|||
* @param mixed $data string or array, must not be NULL
|
||||
* @return string empty string if ok, string error message otherwise
|
||||
*/
|
||||
public abstract function write_setting($data);
|
||||
abstract public function write_setting($data);
|
||||
|
||||
/**
|
||||
* Return part of form with setting
|
||||
|
|
|
@ -104,7 +104,7 @@ class behat_command {
|
|||
* @param bool $absolutepath return command with absolute path.
|
||||
* @return string
|
||||
*/
|
||||
public final static function get_behat_command($custombyterm = false, $parallerun = false, $absolutepath = false) {
|
||||
final public static function get_behat_command($custombyterm = false, $parallerun = false, $absolutepath = false) {
|
||||
|
||||
$separator = DIRECTORY_SEPARATOR;
|
||||
$exec = 'behat';
|
||||
|
@ -146,7 +146,7 @@ class behat_command {
|
|||
* @param string $options Defaults to '' so tests would be executed
|
||||
* @return array CLI command outputs [0] => string, [1] => integer
|
||||
*/
|
||||
public final static function run($options = '') {
|
||||
final public static function run($options = '') {
|
||||
global $CFG;
|
||||
|
||||
$currentcwd = getcwd();
|
||||
|
|
|
@ -184,7 +184,7 @@ class behat_config_manager {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public final static function get_behat_run_config_file_path() {
|
||||
final public static function get_behat_run_config_file_path() {
|
||||
return behat_command::get_parent_behat_dir() . '/run_environment.json';
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ class behat_config_manager {
|
|||
* @param string $key Key to store
|
||||
* @return string|int|array value which is stored.
|
||||
*/
|
||||
public final static function get_behat_run_config_value($key) {
|
||||
final public static function get_behat_run_config_value($key) {
|
||||
$parallelrunconfigfile = self::get_behat_run_config_file_path();
|
||||
|
||||
if (file_exists($parallelrunconfigfile)) {
|
||||
|
@ -214,7 +214,7 @@ class behat_config_manager {
|
|||
* @param string $key Key to store
|
||||
* @param string|int|array $value to store.
|
||||
*/
|
||||
public final static function set_behat_run_config_value($key, $value) {
|
||||
final public static function set_behat_run_config_value($key, $value) {
|
||||
$parallelrunconfigs = array();
|
||||
$parallelrunconfigfile = self::get_behat_run_config_file_path();
|
||||
|
||||
|
@ -232,7 +232,7 @@ class behat_config_manager {
|
|||
*
|
||||
* @return bool true on success else false.
|
||||
*/
|
||||
public final static function drop_parallel_site_links() {
|
||||
final public static function drop_parallel_site_links() {
|
||||
global $CFG;
|
||||
|
||||
// Get parallel test runs.
|
||||
|
@ -264,7 +264,7 @@ class behat_config_manager {
|
|||
* @param int $torun last run.
|
||||
* @return bool true for sucess, else false.
|
||||
*/
|
||||
public final static function create_parallel_site_links($fromrun, $torun) {
|
||||
final public static function create_parallel_site_links($fromrun, $torun) {
|
||||
global $CFG;
|
||||
|
||||
// Create site symlink if necessary.
|
||||
|
|
|
@ -1068,7 +1068,7 @@ class behat_config_util {
|
|||
* @param string $path
|
||||
* @return string The string without the last /tests part
|
||||
*/
|
||||
public final function clean_path($path) {
|
||||
final public function clean_path($path) {
|
||||
|
||||
$path = rtrim($path, DIRECTORY_SEPARATOR);
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ class behat_config_util {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
public static final function get_behat_tests_path() {
|
||||
final public static function get_behat_tests_path() {
|
||||
return DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'behat';
|
||||
}
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ class behat_config_util {
|
|||
* @param bool $includeclass if class should be included.
|
||||
* @return string
|
||||
*/
|
||||
public static final function get_behat_theme_selector_override_classname($themename, $selectortype, $includeclass = false) {
|
||||
final public static function get_behat_theme_selector_override_classname($themename, $selectortype, $includeclass = false) {
|
||||
global $CFG;
|
||||
|
||||
if ($selectortype !== 'named_partial' && $selectortype !== 'named_exact') {
|
||||
|
|
|
@ -163,7 +163,7 @@ abstract class behat_generator_base {
|
|||
*
|
||||
* @return array entity name => information about how to generate.
|
||||
*/
|
||||
protected abstract function get_creatable_entities(): array;
|
||||
abstract protected function get_creatable_entities(): array;
|
||||
|
||||
/**
|
||||
* Get the list of available generators for this class.
|
||||
|
|
|
@ -384,7 +384,7 @@ class behat_util extends testing_util {
|
|||
* Returns the path to the file which specifies if test environment is enabled
|
||||
* @return string
|
||||
*/
|
||||
public final static function get_test_file_path() {
|
||||
final public static function get_test_file_path() {
|
||||
return behat_command::get_parent_behat_dir() . '/test_environment_enabled.txt';
|
||||
}
|
||||
|
||||
|
|
|
@ -97,5 +97,5 @@ abstract class activity_dates {
|
|||
* label - The label for the date
|
||||
* timestamp - The date
|
||||
*/
|
||||
protected abstract function get_dates(): array;
|
||||
abstract protected function get_dates(): array;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ abstract class scanner {
|
|||
*
|
||||
* @return bool True if plugin has been configured.
|
||||
*/
|
||||
public abstract function is_configured();
|
||||
abstract public function is_configured();
|
||||
|
||||
/**
|
||||
* Scan file.
|
||||
|
@ -110,7 +110,7 @@ abstract class scanner {
|
|||
* @param string $filename Name of the file (could be different from physical file if temp file is used).
|
||||
* @return int Scanning result constants.
|
||||
*/
|
||||
public abstract function scan_file($file, $filename);
|
||||
abstract public function scan_file($file, $filename);
|
||||
|
||||
/**
|
||||
* Scan data.
|
||||
|
|
|
@ -62,7 +62,7 @@ class manager {
|
|||
*
|
||||
* @return array of check objects
|
||||
*/
|
||||
static public function get_performance_checks() : array {
|
||||
public static function get_performance_checks(): array {
|
||||
$checks = [
|
||||
new performance\designermode(),
|
||||
new performance\cachejs(),
|
||||
|
|
|
@ -170,7 +170,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @throws \coding_exception
|
||||
*/
|
||||
public static final function create(array $data = null) {
|
||||
final public static function create(array $data = null) {
|
||||
global $USER, $CFG;
|
||||
|
||||
$data = (array)$data;
|
||||
|
@ -296,7 +296,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
protected abstract function init();
|
||||
abstract protected function init();
|
||||
|
||||
/**
|
||||
* Let developers validate their custom data (such as $this->data['other'], contextlevel, etc.).
|
||||
|
@ -376,7 +376,7 @@ abstract class base implements \IteratorAggregate {
|
|||
* @param array $logextra the format is standardised by logging API
|
||||
* @return bool|\core\event\base
|
||||
*/
|
||||
public static final function restore(array $data, array $logextra) {
|
||||
final public static function restore(array $data, array $logextra) {
|
||||
$classname = $data['eventname'];
|
||||
$component = $data['component'];
|
||||
$action = $data['action'];
|
||||
|
@ -427,7 +427,7 @@ abstract class base implements \IteratorAggregate {
|
|||
* @param array $logextra
|
||||
* @return unknown_logged
|
||||
*/
|
||||
protected static final function restore_unknown(array $data, array $logextra) {
|
||||
final protected static function restore_unknown(array $data, array $logextra) {
|
||||
$classname = '\core\event\unknown_logged';
|
||||
|
||||
/** @var unknown_logged $event */
|
||||
|
@ -447,7 +447,7 @@ abstract class base implements \IteratorAggregate {
|
|||
* @param \stdClass $legacy
|
||||
* @return base
|
||||
*/
|
||||
public static final function restore_legacy($legacy) {
|
||||
final public static function restore_legacy($legacy) {
|
||||
$classname = get_called_class();
|
||||
/** @var base $event */
|
||||
$event = new $classname();
|
||||
|
@ -606,7 +606,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @return array Static information about the event.
|
||||
*/
|
||||
public static final function get_static_info() {
|
||||
final public static function get_static_info() {
|
||||
/** Var \core\event\base $event. */
|
||||
$event = new static();
|
||||
// Set static event data specific for child class.
|
||||
|
@ -772,7 +772,7 @@ abstract class base implements \IteratorAggregate {
|
|||
/**
|
||||
* Trigger event.
|
||||
*/
|
||||
public final function trigger() {
|
||||
final public function trigger() {
|
||||
global $CFG;
|
||||
|
||||
if ($this->restored) {
|
||||
|
@ -802,7 +802,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public final function is_triggered() {
|
||||
final public function is_triggered() {
|
||||
return $this->triggered;
|
||||
}
|
||||
|
||||
|
@ -811,7 +811,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public final function is_dispatched() {
|
||||
final public function is_dispatched() {
|
||||
return $this->dispatched;
|
||||
}
|
||||
|
||||
|
@ -820,7 +820,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public final function is_restored() {
|
||||
final public function is_restored() {
|
||||
return $this->restored;
|
||||
}
|
||||
|
||||
|
@ -835,7 +835,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @throws \coding_exception if used after ::trigger()
|
||||
*/
|
||||
public final function add_record_snapshot($tablename, $record) {
|
||||
final public function add_record_snapshot($tablename, $record) {
|
||||
global $DB, $CFG;
|
||||
|
||||
if ($this->triggered) {
|
||||
|
@ -876,7 +876,7 @@ abstract class base implements \IteratorAggregate {
|
|||
*
|
||||
* @throws \coding_exception if used after ::restore()
|
||||
*/
|
||||
public final function get_record_snapshot($tablename, $id) {
|
||||
final public function get_record_snapshot($tablename, $id) {
|
||||
global $DB;
|
||||
|
||||
if ($this->restored) {
|
||||
|
|
|
@ -57,7 +57,7 @@ class competency_evidence_created extends base {
|
|||
* @return evidence_created
|
||||
* @throws \coding_exception
|
||||
*/
|
||||
public static final function create_from_evidence(evidence $evidence, user_competency $usercompetency, $recommend) {
|
||||
final public static function create_from_evidence(evidence $evidence, user_competency $usercompetency, $recommend) {
|
||||
// Make sure we have a valid evidence.
|
||||
if (!$evidence->get('id')) {
|
||||
throw new \coding_exception('The evidence ID must be set.');
|
||||
|
|
|
@ -48,7 +48,7 @@ class competency_framework_created extends base {
|
|||
* @param competency_framework $framework The framework.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_framework(competency_framework $framework) {
|
||||
final public static function create_from_framework(competency_framework $framework) {
|
||||
if (!$framework->get('id')) {
|
||||
throw new \coding_exception('The competency framework ID must be set.');
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class competency_framework_deleted extends base {
|
|||
* @param competency_framework $framework The framework.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_framework(competency_framework $framework) {
|
||||
final public static function create_from_framework(competency_framework $framework) {
|
||||
if (!$framework->get('id')) {
|
||||
throw new \coding_exception('The competency framework ID must be set.');
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class competency_framework_updated extends base {
|
|||
* @param competency_framework $framework The framework.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_framework(competency_framework $framework) {
|
||||
final public static function create_from_framework(competency_framework $framework) {
|
||||
if (!$framework->get('id')) {
|
||||
throw new \coding_exception('The competency framework ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_approved extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_completed extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class competency_plan_created extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class competency_plan_deleted extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_reopened extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_review_request_cancelled extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_review_requested extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_review_started extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_review_stopped extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class competency_plan_unapproved extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class competency_plan_unlinked extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class competency_plan_updated extends base {
|
|||
* @param plan $plan The plan.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_plan(plan $plan) {
|
||||
final public static function create_from_plan(plan $plan) {
|
||||
if (!$plan->get('id')) {
|
||||
throw new \coding_exception('The plan ID must be set.');
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class competency_template_created extends base {
|
|||
* @param template $template The template.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_template(template $template) {
|
||||
final public static function create_from_template(template $template) {
|
||||
if (!$template->get('id')) {
|
||||
throw new \coding_exception('The template ID must be set.');
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ class competency_template_deleted extends base {
|
|||
* @param template $template The template.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_template(template $template) {
|
||||
final public static function create_from_template(template $template) {
|
||||
if (!$template->get('id')) {
|
||||
throw new \coding_exception('The template ID must be set.');
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ class competency_template_updated extends base {
|
|||
* @param template $template The template.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_template(template $template) {
|
||||
final public static function create_from_template(template $template) {
|
||||
if (!$template->get('id')) {
|
||||
throw new \coding_exception('The template ID must be set.');
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class competency_user_evidence_created extends base {
|
|||
* @param user_evidence $userevidence The evidence of prior learning.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_user_evidence(user_evidence $userevidence) {
|
||||
final public static function create_from_user_evidence(user_evidence $userevidence) {
|
||||
if (!$userevidence->get('id')) {
|
||||
throw new \coding_exception('The evidence of prior learning ID must be set.');
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class competency_user_evidence_deleted extends base {
|
|||
* @param user_evidence $userevidence The evidence of prior learning.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_user_evidence(user_evidence $userevidence) {
|
||||
final public static function create_from_user_evidence(user_evidence $userevidence) {
|
||||
if (!$userevidence->get('id')) {
|
||||
throw new \coding_exception('The evidence of prior learning ID must be set.');
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class competency_user_evidence_updated extends base {
|
|||
* @param user_evidence $userevidence The evidence of prior learning.
|
||||
* @return self
|
||||
*/
|
||||
public static final function create_from_user_evidence(user_evidence $userevidence) {
|
||||
final public static function create_from_user_evidence(user_evidence $userevidence) {
|
||||
if (!$userevidence->get('id')) {
|
||||
throw new \coding_exception('The evidence of prior learning ID must be set.');
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ class course_module_created extends base {
|
|||
*
|
||||
* @return \core\event\base returns instance of new event
|
||||
*/
|
||||
public static final function create_from_cm($cm, $modcontext = null) {
|
||||
final public static function create_from_cm($cm, $modcontext = null) {
|
||||
// If not set, get the module context.
|
||||
if (empty($modcontext)) {
|
||||
$modcontext = \context_module::instance($cm->id);
|
||||
|
|
|
@ -107,7 +107,7 @@ class course_module_updated extends base {
|
|||
* @param \context_module $modcontext module context instance
|
||||
* @return \core\event\base returns instance of new event
|
||||
*/
|
||||
public static final function create_from_cm($cm, $modcontext = null) {
|
||||
final public static function create_from_cm($cm, $modcontext = null) {
|
||||
// If not set, get the module context.
|
||||
if (empty($modcontext)) {
|
||||
$modcontext = \context_module::instance($cm->id);
|
||||
|
|
|
@ -47,7 +47,7 @@ class enrol_instance_created extends base {
|
|||
* @param \stdClass $enrol record from DB table 'enrol'
|
||||
* @return \core\event\base returns instance of new event
|
||||
*/
|
||||
public static final function create_from_record($enrol) {
|
||||
final public static function create_from_record($enrol) {
|
||||
$event = static::create(array(
|
||||
'context' => \context_course::instance($enrol->courseid),
|
||||
'objectid' => $enrol->id,
|
||||
|
|
|
@ -47,7 +47,7 @@ class enrol_instance_deleted extends base {
|
|||
* @param \stdClass $enrol record from DB table 'enrol'
|
||||
* @return \core\event\base returns instance of new event
|
||||
*/
|
||||
public static final function create_from_record($enrol) {
|
||||
final public static function create_from_record($enrol) {
|
||||
$event = static::create(array(
|
||||
'context' => \context_course::instance($enrol->courseid),
|
||||
'objectid' => $enrol->id,
|
||||
|
|
|
@ -47,7 +47,7 @@ class enrol_instance_updated extends base {
|
|||
* @param \stdClass $enrol record from DB table 'enrol'
|
||||
* @return \core\event\base returns instance of new event
|
||||
*/
|
||||
public static final function create_from_record($enrol) {
|
||||
final public static function create_from_record($enrol) {
|
||||
$event = static::create(array(
|
||||
'context' => \context_course::instance($enrol->courseid),
|
||||
'objectid' => $enrol->id,
|
||||
|
|
2
lib/classes/external/persistent_exporter.php
vendored
2
lib/classes/external/persistent_exporter.php
vendored
|
@ -65,7 +65,7 @@ abstract class persistent_exporter extends exporter {
|
|||
*
|
||||
* @return array Keys are the property names, and value their definition.
|
||||
*/
|
||||
protected final static function define_properties() {
|
||||
final protected static function define_properties() {
|
||||
$classname = static::define_class();
|
||||
return $classname::properties_definition();
|
||||
}
|
||||
|
|
|
@ -301,7 +301,7 @@ abstract class persistent extends moodleform {
|
|||
* @param array $files
|
||||
* @return array
|
||||
*/
|
||||
public final function validation($data, $files) {
|
||||
final public function validation($data, $files) {
|
||||
$errors = parent::validation($data, $files);
|
||||
$data = $this->get_submitted_data();
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ abstract class handler {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected abstract function get_description();
|
||||
abstract protected function get_description();
|
||||
|
||||
/**
|
||||
* Return a name for the current handler.
|
||||
|
@ -212,7 +212,7 @@ abstract class handler {
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
protected abstract function get_name();
|
||||
abstract protected function get_name();
|
||||
|
||||
/**
|
||||
* Process the message against the current handler.
|
||||
|
@ -220,7 +220,7 @@ abstract class handler {
|
|||
* @param \stdClass $record The Inbound Message Handler record
|
||||
* @param \stdClass $messagedata The message data
|
||||
*/
|
||||
public abstract function process_message(\stdClass $record, \stdClass $messagedata);
|
||||
abstract public function process_message(\stdClass $record, \stdClass $messagedata);
|
||||
|
||||
/**
|
||||
* Return the content of any success notification to be sent.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue