-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.5, 3.4.2
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE
-
MDL-61974-master -
Here is a test.
/**
|
* Test export and recover with children.
|
*/
|
public function test_get_data_with_children() {
|
$writer = $this->get_writer_instance();
|
$context = \context_system::instance();
|
|
$writer->set_context($context)
|
->export_data(['a'], (object) ['parent' => true])
|
->export_data(['a', 'b'], (object) ['parent' => false]);
|
|
$this->assertTrue($writer->get_data(['a'])->parent);
|
$this->assertFalse($writer->get_data(['a', 'b'])->parent);
|
$this->assertSame([], $writer->get_data(['a', 'b', 'c']));
|
}
|
I identified two issues:
- Writing a sub context overrides the parent
- Getting a sub context that does not exist returns the parent
Andrew mentioned that this will likely affect other `get_*` methods.
- blocks
-
MDL-61836 Implement core_privacy for core_blog
-
- Closed
-