mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'MDL-59619-master' of git://github.com/jleyva/moodle
This commit is contained in:
commit
9ee4ab6330
@ -596,7 +596,7 @@ class mod_data_external extends external_api {
|
||||
|
||||
$params = array('databaseid' => $databaseid);
|
||||
$params = self::validate_parameters(self::get_fields_parameters(), $params);
|
||||
$warnings = array();
|
||||
$fields = $warnings = array();
|
||||
|
||||
list($database, $course, $cm, $context) = self::validate_database($params['databaseid']);
|
||||
|
||||
|
@ -659,6 +659,18 @@ class mod_data_external_testcase extends externallib_advanced_testcase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get_fields_database_without_fields.
|
||||
*/
|
||||
public function test_get_fields_database_without_fields() {
|
||||
|
||||
$this->setUser($this->student1);
|
||||
$result = mod_data_external::get_fields($this->database->id);
|
||||
$result = external_api::clean_returnvalue(mod_data_external::get_fields_returns(), $result);
|
||||
|
||||
$this->assertEmpty($result['fields']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test search_entries.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user