Skip to content

Commit

Permalink
feature - Upgrade for M415+
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoticDalo committed Oct 2, 2023
1 parent 48f85bb commit e2d0ebc
Show file tree
Hide file tree
Showing 799 changed files with 2,534 additions and 1,340 deletions.
2 changes: 1 addition & 1 deletion .grunt/jsdoc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Moodle - the world's open source learning platform
This generated documentation includes API documentation for JavaScript written in the AMD and ES2015 module formats within Moodle.

## Related information
See [https://docs.moodle.org/dev](https://docs.moodle.org/dev) for other related Developer Documentation.
See [https://moodledev.io](https://moodledev.io) for other related Developer Documentation.
2 changes: 1 addition & 1 deletion .grunt/jsdoc/jsdoc.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ module.exports = {
],
"menu": {
"Developer Docs": {
href: "https://docs.moodle.org/dev",
href: "https://moodledev.io",
target: "_blank",
"class": "menu-item",
id: "devdocs"
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ of developers, designers, teachers, testers, translators and other users. We
work in universities, schools, companies and other places. You are very welcome
to join us and contribute to the project.

See <https://docs.moodle.org/dev/Contributing_to_Moodle> for the many ways you
See <https://moodledev.io/general/community/contribute> for the many ways you
can help, not only with coding.

Moodle is open to community contributions to core, though all code must go
Expand Down Expand Up @@ -35,7 +35,7 @@ submitted patches has evolved.
* New features are developed on the master branch. Bug fixes are also
backported to currently supported maintenance (stable) branches.

For further details, see <https://docs.moodle.org/dev/Process>.
For further details, see <https://moodledev.io/general/development/process>.

Moodle plugins
--------------
Expand All @@ -53,4 +53,4 @@ be easily installed and updated via the Moodle administration interface.
the plugins directory. We do not pull from your code repository; you must do
it explicitly.

For further details, see <https://docs.moodle.org/dev/Plugin_contribution>.
For further details, see <https://moodledev.io/general/community/plugincontribution>.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Moodle is widely used around the world by universities, schools, companies and
all manner of organisations and individuals.

Moodle is provided freely as open source software, under the GNU General Public
License <https://docs.moodle.org/dev/License>.
License <https://moodledev.io/general/license>.

Moodle is written in PHP and JavaScript and uses an SQL database for storing
the data.
Expand Down
3 changes: 1 addition & 2 deletions admin/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@
$outputhtml .= html_writer::end_tag('div');
}

$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $settingspage->visiblepath));
$PAGE->set_heading($SITE->fullname);
if ($buttons) {
$PAGE->set_button($buttons);
Expand Down
2 changes: 2 additions & 0 deletions admin/environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4301,6 +4301,8 @@
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_mod_assignment" level="required">
</CUSTOM_CHECK>
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_db_prefix_length" level="required">
</CUSTOM_CHECK>
</CUSTOM_CHECKS>
</MOODLE>
</COMPATIBILITY_MATRIX>
6 changes: 3 additions & 3 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
$strlicense = get_string('license');

$PAGE->navbar->add($strlicense);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->set_title($strinstallation . moodle_page::TITLE_SEPARATOR . 'Moodle ' . $CFG->target_release, false);
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);

Expand Down Expand Up @@ -267,7 +267,7 @@
upgrade_init_javascript();

$PAGE->navbar->add($strdatabasesetup);
$PAGE->set_title($strinstallation.' - Moodle '.$CFG->target_release);
$PAGE->set_title($strinstallation . moodle_page::TITLE_SEPARATOR . $CFG->target_release, false);
$PAGE->set_heading($strinstallation);
$PAGE->set_cacheable(false);

Expand Down Expand Up @@ -811,7 +811,7 @@

if (!has_capability('moodle/site:config', $context)) {
// Do not throw exception display an empty page with administration menu if visible for current user.
$PAGE->set_title($SITE->fullname);
$PAGE->set_title(get_string('home'));
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();
echo $OUTPUT->footer();
Expand Down
2 changes: 1 addition & 1 deletion admin/localplugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Displays the list of found local plugins, their version (if found) and
* a link to delete the local plugin.
*
* @see http://docs.moodle.org/dev/Local_customisation
* @see https://moodledev.io/docs/apis/plugintypes/local
* @package admin
* @copyright 2010 David Mudrak <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
2 changes: 1 addition & 1 deletion admin/plagiarism.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Displays the list of found plagiarism plugins, their version (if found) and
* a link to uninstall the plagiarism plugin.
*
* @see http://docs.moodle.org/dev/Plagiarism_API
* @see https://moodledev.io/docs/apis/subsystems/plagiarism
* @package admin
* @copyright 2012 Dan Marsden <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Expand Down
14 changes: 8 additions & 6 deletions admin/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function install_licence_page() {
$output .= $this->heading(get_string('copyrightnotice'));
$output .= $this->box($copyrightnotice, 'copyrightnotice');
$output .= html_writer::empty_tag('br');
$output .= $this->confirm(get_string('doyouagree'), $continue, "http://docs.moodle.org/dev/License");
$output .= $this->confirm(get_string('doyouagree'), $continue, "https://moodledev.io/general/license");
$output .= $this->footer();

return $output;
Expand Down Expand Up @@ -746,10 +746,10 @@ protected function moodle_copyright() {
//////////////////////////////////////////////////////////////////////////////////////////////////
//// IT IS ILLEGAL AND A VIOLATION OF THE GPL TO HIDE, REMOVE OR MODIFY THIS COPYRIGHT NOTICE ///
$copyrighttext = '<a href="http://moodle.org/">Moodle</a> '.
'<a href="http://docs.moodle.org/dev/Releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'<a href="https://moodledev.io/general/releases" title="'.$CFG->version.'">'.$CFG->release.'</a><br />'.
'Copyright &copy; 1999 onwards, Martin Dougiamas<br />'.
'and <a href="http://moodle.org/dev">many other contributors</a>.<br />'.
'<a href="http://docs.moodle.org/dev/License">GNU Public License</a>';
'<a href="https://moodledev.io/general/license">GNU Public License</a>';
//////////////////////////////////////////////////////////////////////////////////////////////////

return $this->box($copyrighttext, 'copyright');
Expand Down Expand Up @@ -898,7 +898,8 @@ protected function campaign_content(bool $showcampaigncontent): string {
$url = "https://campaign.moodle.org/current/lms/{$lang}/install/";
$params = [
'url' => $url,
'iframeid' => 'campaign-content'
'iframeid' => 'campaign-content',
'title' => get_string('campaign', 'admin'),
];

return $this->render_from_template('core/external_content_banner', $params);
Expand All @@ -919,7 +920,8 @@ protected function services_and_support_content(bool $showservicesandsupport): s
$url = "https://campaign.moodle.org/current/lms/{$lang}/servicesandsupport/";
$params = [
'url' => $url,
'iframeid' => 'services-support-content'
'iframeid' => 'services-support-content',
'title' => get_string('supportandservices', 'admin'),
];

return $this->render_from_template('core/external_content_banner', $params);
Expand Down Expand Up @@ -991,7 +993,7 @@ protected function moodle_available_update_info(\core\update\info $updateinfo) {
* @return string HTML to output.
*/
protected function release_notes_link() {
$releasenoteslink = get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/dev/Releases');
$releasenoteslink = get_string('releasenoteslink', 'admin', 'https://moodledev.io/general/releases');
$releasenoteslink = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $releasenoteslink); // extremely ugly validation hack
return $this->box($releasenoteslink, 'generalbox alert alert-info');
}
Expand Down
2 changes: 1 addition & 1 deletion admin/searchreindex.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

// Start page output.
$heading = get_string('gradualreindex', 'search', '');
$PAGE->set_title($PAGE->title . ': ' . $heading);
$PAGE->set_title($areaname . ' - ' . get_string('gradualreindex', 'search', ''));
$PAGE->navbar->add($heading);
echo $OUTPUT->header();
echo $OUTPUT->heading($heading);
Expand Down
4 changes: 1 addition & 3 deletions admin/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@
$PAGE->set_button($buttons);
}

$visiblepathtosection = array_reverse($settingspage->visiblepath);

$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_title(implode(moodle_page::TITLE_SEPARATOR, $settingspage->visiblepath));
$PAGE->set_heading($SITE->fullname);
echo $OUTPUT->header();

Expand Down
12 changes: 12 additions & 0 deletions admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,18 @@

// "htmlsettings" settingpage
$temp = new admin_settingpage('htmlsettings', new lang_string('htmlsettings', 'admin'));
$sitenameintitleoptions = [
'shortname' => new lang_string('shortname'),
'fullname' => new lang_string('fullname'),
];
$sitenameintitleconfig = new admin_setting_configselect(
'sitenameintitle',
new lang_string('sitenameintitle', 'admin'),
new lang_string('sitenameintitle_help', 'admin'),
'shortname',
$sitenameintitleoptions
);
$temp->add($sitenameintitleconfig);
$temp->add(new admin_setting_configcheckbox('formatstringstriptags', new lang_string('stripalltitletags', 'admin'), new lang_string('configstripalltitletags', 'admin'), 1));
$temp->add(new admin_setting_emoticons());
$ADMIN->add('appearance', $temp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ menu: "main"

## Moodle templates

[Moodle templates](https://docs.moodle.org/dev/Templates) are use to write HTML and Javascript using mustache files.
[Moodle templates](https://moodledev.io/docs/guides/templates) are use to write HTML and Javascript using mustache files.

If you are creating your own pages in the UI Component library you can load core templates using this (shortcode) syntax:

Expand Down Expand Up @@ -51,4 +51,3 @@ This is the result of adding the core/notification template on this page:
"extraclasses": "foo bar"
}
{{< /mustache >}}

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tags:

## How to use moodle forms

Forms are constructed using lib/formslib.php. Using the addElement methods in php a set of different form element types can be added to a form. For more info visit the [Moodledocs](https://docs.moodle.org/dev/lib/formslib.php_Form_Definition) page for forms
Forms are constructed using lib/formslib.php. Using the addElement methods in php a set of different form element types can be added to a form. For more info visit the [Moodledocs](https://moodledev.io/docs/apis/subsystems/form) page for forms

{{< php >}}
$mform->addElement('button', 'intro', get_string("buttonlabel"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Disabled toggle with extra classes.

## Use toggle as a template block

It is also possible to include *core/toggle* in any other template using [blocks](https://docs.moodle.org/dev/Templates#Blocks), instead of rendering it with a context.
It is also possible to include *core/toggle* in any other template using [blocks](https://moodledev.io/docs/guides/templates#blocks), instead of rendering it with a context.
The parameters that you can define are:
* id: Unique id for the toggle input.
* extraclasses: Any extra classes added to the toggle input outer container.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class behat_tool_dataprivacy extends behat_base {
);

/**
* Creates the specified element. More info about available elements in http://docs.moodle.org/dev/Acceptance_testing#Fixtures.
* Creates the specified element. More info about available elements in https://moodledev.io/general/development/tools/behat.
*
* @Given /^the following data privacy "(?P<element_string>(?:[^"]|\\")*)" exist:$/
*
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/filetypes/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
$PAGE->navbar->add($title);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);
$PAGE->set_primary_active_tab('siteadminnode');
$PAGE->set_secondary_active_tab('server');

Expand Down
2 changes: 1 addition & 1 deletion admin/tool/filetypes/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
$PAGE->navbar->add($oldextension ? s($oldextension) : $title);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);

// Display the page.
echo $OUTPUT->header();
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/filetypes/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$PAGE->set_url(new \moodle_url('/admin/tool/filetypes/index.php'));
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);

$renderer = $PAGE->get_renderer('tool_filetypes');

Expand Down
2 changes: 1 addition & 1 deletion admin/tool/filetypes/revert.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
$PAGE->navbar->add($title);
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);

// Display the page.
echo $OUTPUT->header();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class behat_tool_lp_data_generators extends behat_base {
);

/**
* Creates the specified element. More info about available elements in http://docs.moodle.org/dev/Acceptance_testing#Fixtures.
* Creates the specified element. More info about available elements in https://moodledev.io/general/development/tools/behat.
*
* @Given /^the following lp "(?P<element_string>(?:[^"]|\\")*)" exist:$/
*
Expand Down
8 changes: 6 additions & 2 deletions admin/tool/mobile/classes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,12 @@ public static function get_plugins_supporting_mobile() {
$langs = $stringmanager->get_list_of_translations(true);
foreach ($langs as $langid => $langname) {
foreach ($addoninfo['lang'] as $stringinfo) {
$lang[$langid][$stringinfo[0]] =
$stringmanager->get_string($stringinfo[0], $stringinfo[1], null, $langid);
$lang[$langid][$stringinfo[0]] = $stringmanager->get_string(
$stringinfo[0],
$stringinfo[1] ?? '',
null,
$langid
);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/mobile/logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
$PAGE->set_url(new \moodle_url('/'.$CFG->admin.'/tool/mobile/logout.php'));
$PAGE->navbar->add($title);
$PAGE->set_context($context);
$PAGE->set_title($SITE->fullname. ': ' . $title);
$PAGE->set_title($title);

// Display the page.
echo $OUTPUT->header();
Expand Down
10 changes: 9 additions & 1 deletion admin/tool/moodlenet/tests/local/remote_resource_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ public function test_network_features() {
]
);

$this->assertGreaterThan(0, $remoteres->get_download_size());
// We need to handle size of -1 (missing "Content-Length" header), or where it is set and greater than zero.
$this->assertThat(
$remoteres->get_download_size(),
$this->logicalOr(
$this->equalTo(-1),
$this->greaterThan(0),
),
);

[$path, $name] = $remoteres->download_to_requestdir();
$this->assertIsString($path);
$this->assertEquals('test.html', $name);
Expand Down
20 changes: 13 additions & 7 deletions admin/webservice/documentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@

admin_externalpage_setup('webservicedocumentation');

// get all the function descriptions
$functions = $DB->get_records('external_functions', array(), 'name');
$functiondescs = array();
foreach ($functions as $function) {
$functiondescs[$function->name] = external_api::external_function_info($function);
}

// TODO: MDL-76078 - Incorrect inter-communication, core cannot have plugin dependencies like this.

//display the documentation for all documented protocols,
Expand All @@ -50,6 +43,19 @@
/// OUTPUT
echo $OUTPUT->header();

// Get all the function descriptions.
$functions = $DB->get_records('external_functions', [], 'name');
$functiondescs = [];
foreach ($functions as $function) {

// Skip invalid or otherwise incorrectly defined functions, otherwise the entire page is rendered inaccessible.
try {
$functiondescs[$function->name] = external_api::external_function_info($function);
} catch (Throwable $exception) {
echo $OUTPUT->notification($exception->getMessage(), \core\output\notification::NOTIFY_ERROR);
}
}

$renderer = $PAGE->get_renderer('core', 'webservice');
echo $renderer->documentation_html($functiondescs,
$printableformat, $protocols, array(), $PAGE->url);
Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/ntlmsso_attempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// when we've already left the page that set the timer.
$loginsite = get_string("loginsite");
$PAGE->navbar->add($loginsite);
$PAGE->set_title("$site->fullname: $loginsite");
$PAGE->set_title($loginsite);
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();

Expand Down
2 changes: 1 addition & 1 deletion auth/ldap/ntlmsso_finish.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
// here (and not add 3 more secs).
$loginsite = get_string("loginsite");
$PAGE->navbar->add($loginsite);
$PAGE->set_title("$site->fullname: $loginsite");
$PAGE->set_title($loginsite);
$PAGE->set_heading($site->fullname);
echo $OUTPUT->header();
redirect($CFG->wwwroot . '/login/index.php?authldap_skipntlmsso=1',
Expand Down
2 changes: 1 addition & 1 deletion auth/shibboleth/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
$PAGE->set_url('/auth/shibboleth/login.php');
$PAGE->set_context(context_system::instance());
$PAGE->navbar->add($loginsite);
$PAGE->set_title("$site->fullname: $loginsite");
$PAGE->set_title($loginsite);
$PAGE->set_heading($site->fullname);
$PAGE->set_pagelayout('login');

Expand Down
2 changes: 1 addition & 1 deletion auth/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ information provided here is intended especially for developers.
* The auth_db and auth_ldap plugins' implementations of update_user_record() have been removed and both now
call the new implementation added in the base class.
* Self registration plugins should use core_privacy\local\sitepolicy\manager instead of directly checking
$CFG->sitepolicy , especially in custom signup forms. See https://docs.moodle.org/dev/Site_policy_handler
$CFG->sitepolicy , especially in custom signup forms.

=== 3.3 ===

Expand Down
Loading

0 comments on commit e2d0ebc

Please sign in to comment.