Skip to content

Commit

Permalink
MDL-69521 core: Move all comments in code from 4.1 to 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 8, 2020
1 parent 6a60111 commit 74ee34f
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions analytics/classes/local/analyser/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ public function __construct($modelid, \core_analytics\local\target\base $target,
* \core_analytics\local\analyser\by_course and \core_analytics\local\analyser\sitewide are implementing
* this method returning site courses (by_course) and the whole system (sitewide) as analysables.
*
* @todo MDL-65284 This will be removed in Moodle 4.1
* @todo MDL-65284 This will be removed in Moodle 3.11
* @deprecated
* @see get_analysables_iterator
* @throws \coding_exception
* @return \core_analytics\analysable[] Array of analysable elements using the analysable id as array key.
*/
public function get_analysables() {
// This function should only be called from get_analysables_iterator and we keep it here until Moodle 4.1
// This function should only be called from get_analysables_iterator and we keep it here until Moodle 3.11
// for backwards compatibility.
throw new \coding_exception('This method is deprecated in favour of get_analysables_iterator.');
}
Expand Down
4 changes: 2 additions & 2 deletions analytics/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public static function get_all_time_splittings() {
* Returns the enabled time splitting methods.
*
* @deprecated since Moodle 3.7
* @todo MDL-65086 This will be deleted in Moodle 4.1
* @todo MDL-65086 This will be deleted in Moodle 3.11
* @see \core_analytics\manager::get_time_splitting_methods_for_evaluation
* @return \core_analytics\local\time_splitting\base[]
*/
Expand Down Expand Up @@ -604,7 +604,7 @@ public static function get_prediction($predictionid, $requirelogin = false) {
* Used to be used to add models included with the Moodle core.
*
* @deprecated Deprecated since Moodle 3.7 (MDL-61667) - Use lib/db/analytics.php instead.
* @todo Remove this method in Moodle 4.1 (MDL-65186).
* @todo Remove this method in Moodle 3.11 (MDL-65186).
* @return void
*/
public static function add_builtin_models() {
Expand Down
16 changes: 8 additions & 8 deletions auth/ldap/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ function sync_users($do_updates=true) {

do {
if ($ldappagedresults) {
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldapcookie);
Expand All @@ -722,7 +722,7 @@ function sync_users($do_updates=true) {
}
if ($this->config->search_sub) {
// Use ldap_search to find first user from subtree.
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldapresult = ldap_search($ldapconnection, $context, $filter, array($this->config->user_attribute));
} else {
Expand All @@ -731,7 +731,7 @@ function sync_users($do_updates=true) {
}
} else {
// Search only in this context.
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldapresult = ldap_list($ldapconnection, $context, $filter, array($this->config->user_attribute));
} else {
Expand All @@ -745,7 +745,7 @@ function sync_users($do_updates=true) {
if ($ldappagedresults) {
// Get next server cookie to know if we'll need to continue searching.
$ldapcookie = '';
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
$pagedresp = ldap_control_paged_result_response($ldapconnection, $ldapresult, $ldapcookie);
Expand Down Expand Up @@ -1554,7 +1554,7 @@ function ldap_get_userlist($filter='*') {

do {
if ($ldap_pagedresults) {
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result($ldapconnection, $this->config->pagesize, true, $ldap_cookie);
Expand All @@ -1567,7 +1567,7 @@ function ldap_get_userlist($filter='*') {
}
if ($this->config->search_sub) {
// Use ldap_search to find first user from subtree.
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldap_result = ldap_search($ldapconnection, $context, $filter, array($this->config->user_attribute));
} else {
Expand All @@ -1576,7 +1576,7 @@ function ldap_get_userlist($filter='*') {
}
} else {
// Search only in this context.
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldap_result = ldap_list($ldapconnection, $context, $filter, array($this->config->user_attribute));
} else {
Expand All @@ -1590,7 +1590,7 @@ function ldap_get_userlist($filter='*') {
if ($ldap_pagedresults) {
// Get next server cookie to know if we'll need to continue searching.
$ldap_cookie = '';
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result_response($ldapconnection, $ldap_result, $ldap_cookie);
Expand Down
2 changes: 1 addition & 1 deletion enrol/database/cli/sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* - use "su" if "sudo" not available
*
* @deprecated since Moodle 3.7 MDL-59986 - please do not use this CLI script any more, use scheduled task instead.
* @todo MDL-63266 This will be deleted in Moodle 4.1.
* @todo MDL-63266 This will be deleted in Moodle 3.11.
* @package enrol_database
* @copyright 2010 Petr Skoda {@link http://skodak.org}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
16 changes: 8 additions & 8 deletions enrol/ldap/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public function sync_enrolments(progress_trace $trace, $onecourse = null) {
$flat_records = array();
do {
if ($ldap_pagedresults) {
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result($this->ldapconnection, $this->config->pagesize, true, $ldap_cookie);
Expand All @@ -403,7 +403,7 @@ public function sync_enrolments(progress_trace $trace, $onecourse = null) {

if ($this->config->course_search_sub) {
// Use ldap_search to find first user from subtree
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldap_result = @ldap_search($this->ldapconnection, $ldap_context,
$ldap_search_pattern, $ldap_fields_wanted);
Expand All @@ -414,7 +414,7 @@ public function sync_enrolments(progress_trace $trace, $onecourse = null) {
}
} else {
// Search only in this context
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldap_result = @ldap_list($this->ldapconnection, $ldap_context,
$ldap_search_pattern, $ldap_fields_wanted);
Expand All @@ -431,7 +431,7 @@ public function sync_enrolments(progress_trace $trace, $onecourse = null) {
if ($ldap_pagedresults) {
// Get next server cookie to know if we'll need to continue searching.
$ldap_cookie = '';
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result_response($this->ldapconnection, $ldap_result, $ldap_cookie);
Expand Down Expand Up @@ -806,7 +806,7 @@ protected function find_ext_enrolments($memberuid, $role) {
$flat_records = array();
do {
if ($ldap_pagedresults) {
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result($this->ldapconnection, $this->config->pagesize, true, $ldap_cookie);
Expand All @@ -820,7 +820,7 @@ protected function find_ext_enrolments($memberuid, $role) {

if ($this->get_config('course_search_sub')) {
// Use ldap_search to find first user from subtree
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldap_result = @ldap_search($this->ldapconnection, $context,
$ldap_search_pattern, $ldap_fields_wanted);
Expand All @@ -831,7 +831,7 @@ protected function find_ext_enrolments($memberuid, $role) {
}
} else {
// Search only in this context
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
$ldap_result = @ldap_list($this->ldapconnection, $context,
$ldap_search_pattern, $ldap_fields_wanted);
Expand All @@ -849,7 +849,7 @@ protected function find_ext_enrolments($memberuid, $role) {
if ($ldap_pagedresults) {
// Get next server cookie to know if we'll need to continue searching.
$ldap_cookie = '';
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 4.1).
// TODO: Remove the old branch of code once PHP 7.3.0 becomes required (Moodle 3.11).
if (version_compare(PHP_VERSION, '7.3.0', '<')) {
// Before 7.3, use this function that was deprecated in PHP 7.4.
ldap_control_paged_result_response($this->ldapconnection, $ldap_result, $ldap_cookie);
Expand Down
4 changes: 2 additions & 2 deletions lib/adminlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -6538,7 +6538,7 @@ public function search($query) {
* Default message outputs configuration
*
* @deprecated since Moodle 3.7 MDL-64495. Please use admin_page_managemessageoutputs instead.
* @todo MDL-64866 This will be deleted in Moodle 4.1.
* @todo MDL-64866 This will be deleted in Moodle 3.11.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand All @@ -6547,7 +6547,7 @@ class admin_page_defaultmessageoutputs extends admin_page_managemessageoutputs {
* Calls parent::__construct with specific arguments
*
* @deprecated since Moodle 3.7 MDL-64495. Please use admin_page_managemessageoutputs instead.
* @todo MDL-64866 This will be deleted in Moodle 4.1.
* @todo MDL-64866 This will be deleted in Moodle 3.11.
*/
public function __construct() {
global $CFG;
Expand Down
6 changes: 3 additions & 3 deletions lib/behat/behat_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
* be enough.
*
* @deprecated since Moodle 3.7 MDL-64979 - please use get_reduced_timeout() instead
* @todo MDL-64982 This will be deleted in Moodle 4.1
* @todo MDL-64982 This will be deleted in Moodle 3.11
* @see behat_base::get_reduced_timeout()
*/
const REDUCED_TIMEOUT = 2;
Expand All @@ -75,7 +75,7 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
* The timeout for each Behat step (load page, wait for an element to load...).
*
* @deprecated since Moodle 3.7 MDL-64979 - please use get_timeout() instead
* @todo MDL-64982 This will be deleted in Moodle 4.1
* @todo MDL-64982 This will be deleted in Moodle 3.11
* @see behat_base::get_timeout()
*/
const TIMEOUT = 6;
Expand All @@ -84,7 +84,7 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
* And extended timeout for specific cases.
*
* @deprecated since Moodle 3.7 MDL-64979 - please use get_extended_timeout() instead
* @todo MDL-64982 This will be deleted in Moodle 4.1
* @todo MDL-64982 This will be deleted in Moodle 3.11
* @see behat_base::get_extended_timeout()
*/
const EXTENDED_TIMEOUT = 10;
Expand Down
2 changes: 1 addition & 1 deletion lib/deprecatedlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2761,7 +2761,7 @@ function message_get_contact() {
* in such a large SELECT
*
* @deprecated since Moodle 3.7
* @todo The final deprecation of this function will take place in Moodle 41 - see MDL-65319.
* @todo The final deprecation of this function will take place in Moodle 3.11 - see MDL-65319.
*
* @param string|int $categoryid Either a category id or 'all' for everything
* @param string $sort A field and direction to sort by
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/behat/behat_deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class behat_deprecated extends behat_base {
* @param string $blockname
* @return void
* @deprecated since Moodle 3.7 MDL-64506 - please do not use this definition step any more.
* @todo MDL-65215 This will be deleted in Moodle 4.1.
* @todo MDL-65215 This will be deleted in Moodle 3.11.
*/
public function i_dock_block($blockname) {

Expand Down
2 changes: 1 addition & 1 deletion message/defaultoutputs.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*
* @deprecated since Moodle 3.7 MDL-64495. Please use /admin/message.php instead.
* @todo MDL-64866 This will be deleted in Moodle 4.1.
* @todo MDL-64866 This will be deleted in Moodle 3.11.
*/
require_once(__DIR__ . '/../config.php');
require_once($CFG->dirroot . '/message/lib.php');
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/deprecatedlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions = -1, $
* @param bool $children
* @return int
* @deprecated since Moodle 3.7
* @todo MDL-65252 This will be removed in Moodle 4.1
* @todo MDL-65252 This will be removed in Moodle 3.11
*/
function forum_count_replies($post, $children = true) {
global $USER;
Expand Down
2 changes: 1 addition & 1 deletion mod/forum/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public static function get_forum_discussion_posts_parameters() {
*
* @return array the forum post details
* @since Moodle 2.7
* @todo MDL-65252 This will be removed in Moodle 4.1
* @todo MDL-65252 This will be removed in Moodle 3.11
*/
public static function get_forum_discussion_posts($discussionid, $sortby = "created", $sortdirection = "DESC") {
global $CFG, $DB, $USER, $PAGE;
Expand Down

0 comments on commit 74ee34f

Please sign in to comment.