Skip to content

Commit 160bc68

Browse files
authored
Merge pull request #177 from learnweb/update/m42
Update for Moodle 4.2
2 parents b9447ab + 0403483 commit 160bc68

File tree

4 files changed

+34
-12
lines changed

4 files changed

+34
-12
lines changed

.github/workflows/moodle-ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: ['8.0']
12-
moodle-branch: ['MOODLE_401_STABLE']
11+
php: ['8.1']
12+
moodle-branch: ['MOODLE_402_STABLE']
1313
database: ['pgsql']
1414

1515
steps:
@@ -107,8 +107,8 @@ jobs:
107107
strategy:
108108
fail-fast: false
109109
matrix:
110-
php: ['8.0']
111-
moodle-branch: ['MOODLE_311_STABLE', 'MOODLE_400_STABLE', 'MOODLE_401_STABLE']
110+
php: ['8.0', '8.1']
111+
moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE']
112112
database: ['mariadb', 'pgsql']
113113
include:
114114
- php: '7.4'
@@ -117,6 +117,18 @@ jobs:
117117
- php: '7.4'
118118
moodle-branch: 'MOODLE_39_STABLE'
119119
database: 'pgsql'
120+
- php: '8.0'
121+
moodle-branch: 'MOODLE_311_STABLE'
122+
database: 'mariadb'
123+
- php: '8.0'
124+
moodle-branch: 'MOODLE_311_STABLE'
125+
database: 'pgsql'
126+
- php: '8.0'
127+
moodle-branch: 'MOODLE_400_STABLE'
128+
database: 'mariadb'
129+
- php: '8.0'
130+
moodle-branch: 'MOODLE_400_STABLE'
131+
database: 'pgsql'
120132

121133
steps:
122134
- name: Start MariaDB

.github/workflows/moodle-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
--data-urlencode "altdownloadurl=${ZIPURL}" \
4545
--data-urlencode "releasenotes=${BODY}" \
4646
--data-urlencode "releasenotesformat=4")
47-
echo "::set-output name=response::${RESPONSE}"
47+
echo "response=${RESPONSE}" >> $GITHUB_OUTPUT
4848
- name: Evaluate the response
4949
id: evaluate-response
5050
env:

classes/local/backup/backup_lifecycle_workflow.php

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ public function send_temp_file() {
107107
*/
108108
private function write_workflow() {
109109
foreach (get_object_vars($this->workflow) as $prop => $value) {
110-
$this->writer->writeAttribute($prop, $value);
110+
if (!is_null($value)) {
111+
$this->writer->writeAttribute($prop, $value);
112+
}
111113
}
112114
}
113115

@@ -118,13 +120,17 @@ private function write_triggers() {
118120
foreach ($this->trigger as $trigger) {
119121
$this->writer->startElement("trigger");
120122
foreach (get_object_vars($trigger) as $prop => $value) {
121-
$this->writer->writeAttribute($prop, $value);
123+
if (!is_null($value)) {
124+
$this->writer->writeAttribute($prop, $value);
125+
}
122126
}
123127
$settings = settings_manager::get_settings($trigger->id, settings_type::TRIGGER);
124128
foreach ($settings as $name => $value) {
125129
$this->writer->startElement("setting");
126130
$this->writer->writeAttribute('name', $name);
127-
$this->writer->writeAttribute('value', $value);
131+
if (!is_null($value)) {
132+
$this->writer->writeAttribute('value', $value);
133+
}
128134
$this->writer->endElement();
129135
}
130136
$this->writer->endElement();
@@ -139,13 +145,17 @@ private function write_steps() {
139145
foreach ($this->steps as $step) {
140146
$this->writer->startElement("step");
141147
foreach (get_object_vars($step) as $prop => $value) {
142-
$this->writer->writeAttribute($prop, $value);
148+
if (!is_null($value)) {
149+
$this->writer->writeAttribute($prop, $value);
150+
}
143151
}
144152
$settings = settings_manager::get_settings($step->id, settings_type::STEP);
145153
foreach ($settings as $name => $value) {
146154
$this->writer->startElement("setting");
147155
$this->writer->writeAttribute('name', $name);
148-
$this->writer->writeAttribute('value', $value);
156+
if (!is_null($value)) {
157+
$this->writer->writeAttribute('value', $value);
158+
}
149159
$this->writer->endElement();
150160
}
151161
$this->writer->endElement();

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
defined('MOODLE_INTERNAL') || die;
2626

2727
$plugin->maturity = MATURITY_BETA;
28-
$plugin->version = 2022112400;
28+
$plugin->version = 2023050200;
2929
$plugin->component = 'tool_lifecycle';
3030
$plugin->requires = 2020061500; // Requires Moodle 3.9+.
31-
$plugin->release = 'v4.1-r1';
31+
$plugin->release = 'v4.2-r1';

0 commit comments

Comments
 (0)