Skip to content

Commit

Permalink
Merge branch 'MDL-77164-master' of https://github.com/marinaglancy/mo…
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Apr 13, 2023
2 parents d46db80 + 8fc1486 commit 9ce4fb6
Show file tree
Hide file tree
Showing 603 changed files with 970 additions and 799 deletions.
4 changes: 1 addition & 3 deletions admin/presets/classes/local/setting/adminpresets_setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function set_attribute_value($name, $value) {
/**
* Saves the setting attributes values
*
* @return array Array of inserted ids (in config_log)
* @return array|false Array of inserted ids (in config_log) or false if nothing was inserted
*/
public function save_attributes_values() {
// Plugin name or null.
Expand Down Expand Up @@ -209,8 +209,6 @@ public function save_attributes_values() {
* @param bool $name Setting name to store.
* @param mixed $value Setting value to store.
* @return int|false config_log inserted id or false whenever the new value is the same as old value.
* @throws dml_exception
* @throws moodle_exception
*/
public function save_value($name = false, $value = null) {
// Object values if no arguments.
Expand Down
3 changes: 2 additions & 1 deletion admin/presets/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ public function get_site_settings(): array {
* @param boolean $sitedbvalues Indicates if $dbsettings comes from the site db or not
* @param array $settings Array format $array['plugin']['settingname'] = settings_types child class
* @param array|false $children Array of admin_category children or false
* @return array Array format $array['plugin']['settingname'] = settings_types child class
* @return \core_adminpresets\local\setting\adminpresets_setting[][] Array format
* $array['plugin']['settingname'] = adminpresets_setting child class
*/
public function get_settings(array $dbsettings, bool $sitedbvalues = false, array $settings = [], $children = false): array {
global $DB;
Expand Down
2 changes: 1 addition & 1 deletion admin/presets/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public static function export_user_data(approved_contextlist $contextlist) {
/**
* Delete all data for all users in the specified context.
*
* @param context $context The specific context to delete data for.
* @param \context $context The specific context to delete data for.
*/
public static function delete_data_for_all_users_in_context(\context $context) {
// None of the the data from these tables should be deleted.
Expand Down
5 changes: 2 additions & 3 deletions admin/roles/classes/allow_view_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ protected function set_allow($fromroleid, $targetroleid) {

/**
* Get tool tip for cell.
* @param string $fromrole
* @param string $targetrole
* @param stdClass $fromrole
* @param stdClass $targetrole
* @return string
* @throws \coding_exception
*/
protected function get_cell_tooltip($fromrole, $targetrole) {
$a = new stdClass;
Expand Down
4 changes: 4 additions & 0 deletions admin/roles/tests/privacy/provider_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function test_export_user_preferences() {
$showadvanced = 1;
set_user_preference('definerole_showadvanced', $showadvanced);
provider::export_user_preferences($user->id);
/** @var \core_privacy\tests\request\content_writer $writer */
$writer = writer::with_context(\context_system::instance());
$prefs = $writer->get_user_preferences('core_role');
$this->assertEquals(transform::yesno($showadvanced), transform::yesno($prefs->definerole_showadvanced->value));
Expand Down Expand Up @@ -184,6 +185,7 @@ public function test_export_user_data() {
// Retrieve role capabilities and role assignments.
provider::export_user_data($approvedcontextlist);
foreach ($contextlist as $context) {
/** @var \core_privacy\tests\request\content_writer $writer */
$writer = writer::with_context($context);
$this->assertTrue($writer->has_any_data());
if ($context->contextlevel == CONTEXT_MODULE) {
Expand Down Expand Up @@ -413,6 +415,7 @@ public function test_export_user_role_to_cohort() {
];
// Test User is assigned role teacher to cohort.
provider::export_user_role_to_cohort($user->id);
/** @var \core_privacy\tests\request\content_writer $writer */
$writer = writer::with_context($contextuserassignover);
$this->assertTrue($writer->has_any_data());
$exported = (array)$writer->get_related_data($subcontextteacher, 'cohortroles');
Expand All @@ -430,6 +433,7 @@ public function test_export_user_role_to_cohort() {
api::create_cohort_role_assignment($params);
api::sync_all_cohort_roles();
provider::export_user_role_to_cohort($user->id);
/** @var \core_privacy\tests\request\content_writer $writer */
$writer = writer::with_context($contextuser);
$this->assertTrue($writer->has_any_data());
$exported = (array)$writer->get_related_data($subcontextteacher, 'cohortroles');
Expand Down
2 changes: 1 addition & 1 deletion admin/templates/setting_encryptedpassword.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core_admin/admin_setting_encryptedpassword
@template core_admin/setting_encryptedpassword
Admin encrypted password template.
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/admin_presets/classes/local/action/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class base {
/** @var int The output content to display in the page. **/
protected $outputs;

/** @var int The moodle form to display in the page. **/
/** @var \moodleform The moodle form to display in the page. **/
protected $moodleform;

/** @var manager The manager helper class instance. **/
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/analytics/classes/external.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static function potential_contexts(?string $query = null, ?int $modelid =
* potential_contexts return
*
* @since Moodle 3.8
* @return external_description
* @return \core_external\external_description
*/
public static function potential_contexts_returns() {
return new external_multiple_structure(
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/analytics/classes/output/restorable_models.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(array $models) {
/**
* Export the list of models to be rendered.
*
* @param renderer_base $output
* @param \renderer_base $output
* @return string
*/
public function export_for_template(\renderer_base $output) {
Expand Down
1 change: 0 additions & 1 deletion admin/tool/brickfield/classes/brickfieldconnect.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ protected function get_registration_id_for_credentials(string $apikey = null, st
/**
* Get the check registration API URI.
* @return string
* @throws dml_exception
*/
protected function get_baseapiuri(): string {
$baseapiuri = get_config(manager::PLUGINNAME, 'baseapiuri');
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/brickfield/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ public static function store_result_summary(int $courseid = null) {
* Get course module summary information for a course.
*
* @param int $courseid
* @return stdClass[]
* @return \stdClass[]
*/
public static function get_cm_summary_for_course(int $courseid): array {
global $DB;
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/brickfield/templates/chartsingle.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tool_brickfield/checktypes
@template tool_brickfield/chartsingle
This template renders the charts for the different check groups
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/brickfield/templates/tabtree.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tabtree
@template tool_brickfield/tabtree
Tab tree.
Expand Down
4 changes: 3 additions & 1 deletion admin/tool/dataprivacy/classes/metadata_registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
namespace tool_dataprivacy;

use core_privacy\local\metadata\types\type;

defined('MOODLE_INTERNAL') || die();

/**
Expand Down Expand Up @@ -114,7 +116,7 @@ public function get_registry_metadata() {
/**
* Formats the metadata for use with a template.
*
* @param array $collection The collection associated with the component that we want to expand and format.
* @param type[] $collection The collection associated with the component that we want to expand and format.
* @param string $component The component that we are dealing in
* @param array $internaldata The array to add the formatted metadata to.
* @return array The internal data array with the formatted metadata.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tool_dataprivacy/context_tree
@template tool_dataprivacy/context_tree_branches
Context tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tool_dataprivacy/context_tree_branch
@template tool_dataprivacy/context_tree_node
A tree branch.
Expand Down
1 change: 1 addition & 0 deletions admin/tool/log/classes/plugininfo/logstore.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function get_settings_section_name() {

public function load_settings(part_of_admin_tree $adminroot, $parentnodename, $hassiteconfig) {
global $CFG, $USER, $DB, $OUTPUT, $PAGE; // In case settings.php wants to refer to them.
/** @var \admin_root $ADMIN */
$ADMIN = $adminroot; // May be used in settings.php.
$section = $this->get_settings_section_name();

Expand Down
2 changes: 1 addition & 1 deletion admin/tool/lp/amd/build/competency_rule.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ce4fb6

Please sign in to comment.