Skip to content

Commit

Permalink
Merge branch 'MDL-68793-master' of git://github.com/lameze/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jun 2, 2020
2 parents cd61a8a + 1179f07 commit b2caa50
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
6 changes: 3 additions & 3 deletions lib/db/services.php
Expand Up @@ -2764,10 +2764,10 @@
'capabilities' => '',
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
],
'core_table_dynamic_fetch' => [
'classname' => 'core_table\external\dynamic\fetch',
'core_table_get_dynamic_table_content' => [
'classname' => 'core_table\external\dynamic\get',
'methodname' => 'execute',
'description' => 'Fetch a dynamic table view raw html',
'description' => 'Get the dynamic table content raw html',
'type' => 'read',
'ajax' => true,
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
Expand Down
2 changes: 1 addition & 1 deletion lib/table/amd/build/local/dynamic/repository.min.js

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

2 changes: 1 addition & 1 deletion lib/table/amd/build/local/dynamic/repository.min.js.map

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

2 changes: 1 addition & 1 deletion lib/table/amd/src/local/dynamic/repository.js
Expand Up @@ -54,7 +54,7 @@ export const fetch = (component, handler, uniqueid, {
hiddenColumns = {}
} = {}, resetPreferences = false) => {
return fetchMany([{
methodname: `core_table_dynamic_fetch`,
methodname: `core_table_get_dynamic_table_content`,
args: {
component,
handler,
Expand Down
Expand Up @@ -31,7 +31,6 @@
use external_single_structure;
use external_value;
use external_warnings;
use moodle_url;

/**
* Core table external functions.
Expand All @@ -41,7 +40,7 @@
* @copyright 2020 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fetch extends external_api {
class get extends external_api {

/**
* Describes the parameters for fetching the table html.
Expand Down Expand Up @@ -140,7 +139,7 @@ public static function execute_parameters(): external_function_parameters {
}

/**
* External function to fetch a table view.
* External function to get the table view content.
*
* @param string $component The component.
* @param string $handler Dynamic table class name.
Expand Down
Expand Up @@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Unit tests for core_table\external\fetch;
* Unit tests for core_table\external\dynamic\get;
*
* @package core_table
* @category test
Expand All @@ -31,14 +31,14 @@
use advanced_testcase;

/**
* Unit tests for core_table\external\fetch;
* Unit tests for core_table\external\dynamic\get;
*
* @package core_table
* @category test
* @copyright 2020 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class fetch_test extends advanced_testcase {
class get_test extends advanced_testcase {

/**
* Setup before class.
Expand All @@ -55,7 +55,7 @@ public function test_execute_invalid_component_format(): void {
$this->resetAfterTest();

$this->expectException(\invalid_parameter_exception::class);
fetch::execute(
get::execute(
"core-user",
"participants",
"",
Expand All @@ -79,7 +79,7 @@ public function test_execute_invalid_component(): void {
$this->resetAfterTest();

$this->expectException(\UnexpectedValueException::class);
fetch::execute(
get::execute(
"core_users",
"participants",
"",
Expand All @@ -106,7 +106,7 @@ public function test_execute_invalid_handler(): void {
$this->expectExceptionMessage("Table handler class {$handler} not found. Please make sure that your table handler class is under the \\core_user\\table namespace.");

// Tests that invalid users_participants_table class gets an exception.
fetch::execute(
get::execute(
"core_user",
"users_participants_table",
"",
Expand Down Expand Up @@ -143,7 +143,7 @@ public function test_execute_invalid_filter(): void {
$this->expectExceptionMessage("Invalid parameter value detected (filters => Invalid parameter value detected " .
"(Missing required key in single structure: name): Missing required key in single structure: name");

fetch::execute(
get::execute(
"core_user",
"participants", "user-index-participants-{$course->id}",
$this->get_sort_array(['firstname' => SORT_ASC]),
Expand All @@ -153,9 +153,9 @@ public function test_execute_invalid_filter(): void {
}

/**
* Test execute fetch table.
* Test execute method.
*/
public function test_execute_fetch_table(): void {
public function test_table_get_execute(): void {
$this->resetAfterTest();

$course = $this->getDataGenerator()->create_course();
Expand All @@ -176,7 +176,7 @@ public function test_execute_fetch_table(): void {
]
];

$participantstable = fetch::execute(
$participantstable = get::execute(
"core_user",
"participants",
"user-index-participants-{$course->id}",
Expand Down
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -29,7 +29,7 @@

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

$version = 2020052900.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2020052900.01; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '3.9dev+ (Build: 20200529)'; // Human-friendly version name
Expand Down

0 comments on commit b2caa50

Please sign in to comment.