mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
MDL-46991 Availability: Conditional dates not updated on restore
This commit is contained in:
parent
272fec367f
commit
5176504d3f
8 changed files with 158 additions and 55 deletions
|
@ -606,10 +606,13 @@ class tree extends tree_node {
|
|||
public function save() {
|
||||
$result = new \stdClass();
|
||||
$result->op = $this->op;
|
||||
if ($this->op === self::OP_AND || $this->op === self::OP_NOT_OR) {
|
||||
$result->showc = $this->showchildren;
|
||||
} else {
|
||||
$result->show = $this->show;
|
||||
// Only root tree has the 'show' options.
|
||||
if ($this->root) {
|
||||
if ($this->op === self::OP_AND || $this->op === self::OP_NOT_OR) {
|
||||
$result->showc = $this->showchildren;
|
||||
} else {
|
||||
$result->show = $this->show;
|
||||
}
|
||||
}
|
||||
$result->c = array();
|
||||
foreach ($this->children as $child) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue