Skip to content
Snippets Groups Projects
Unverified Commit 160bc686 authored by Nina Herrmann's avatar Nina Herrmann Committed by GitHub
Browse files

Merge pull request #177 from learnweb/update/m42

Update for Moodle 4.2
parents b9447abd 04034838
Branches
No related tags found
No related merge requests found
......@@ -8,8 +8,8 @@ jobs:
strategy:
matrix:
php: ['8.0']
moodle-branch: ['MOODLE_401_STABLE']
php: ['8.1']
moodle-branch: ['MOODLE_402_STABLE']
database: ['pgsql']
steps:
......@@ -107,8 +107,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0']
moodle-branch: ['MOODLE_311_STABLE', 'MOODLE_400_STABLE', 'MOODLE_401_STABLE']
php: ['8.0', '8.1']
moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE']
database: ['mariadb', 'pgsql']
include:
- php: '7.4'
......@@ -117,6 +117,18 @@ jobs:
- php: '7.4'
moodle-branch: 'MOODLE_39_STABLE'
database: 'pgsql'
- php: '8.0'
moodle-branch: 'MOODLE_311_STABLE'
database: 'mariadb'
- php: '8.0'
moodle-branch: 'MOODLE_311_STABLE'
database: 'pgsql'
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
database: 'mariadb'
- php: '8.0'
moodle-branch: 'MOODLE_400_STABLE'
database: 'pgsql'
steps:
- name: Start MariaDB
......
......@@ -44,7 +44,7 @@ jobs:
--data-urlencode "altdownloadurl=${ZIPURL}" \
--data-urlencode "releasenotes=${BODY}" \
--data-urlencode "releasenotesformat=4")
echo "::set-output name=response::${RESPONSE}"
echo "response=${RESPONSE}" >> $GITHUB_OUTPUT
- name: Evaluate the response
id: evaluate-response
env:
......
......@@ -107,9 +107,11 @@ class backup_lifecycle_workflow {
*/
private function write_workflow() {
foreach (get_object_vars($this->workflow) as $prop => $value) {
if (!is_null($value)) {
$this->writer->writeAttribute($prop, $value);
}
}
}
/**
* Write all trigger of the workflow with all their attributes to the xmlwriter.
......@@ -118,13 +120,17 @@ class backup_lifecycle_workflow {
foreach ($this->trigger as $trigger) {
$this->writer->startElement("trigger");
foreach (get_object_vars($trigger) as $prop => $value) {
if (!is_null($value)) {
$this->writer->writeAttribute($prop, $value);
}
}
$settings = settings_manager::get_settings($trigger->id, settings_type::TRIGGER);
foreach ($settings as $name => $value) {
$this->writer->startElement("setting");
$this->writer->writeAttribute('name', $name);
if (!is_null($value)) {
$this->writer->writeAttribute('value', $value);
}
$this->writer->endElement();
}
$this->writer->endElement();
......@@ -139,13 +145,17 @@ class backup_lifecycle_workflow {
foreach ($this->steps as $step) {
$this->writer->startElement("step");
foreach (get_object_vars($step) as $prop => $value) {
if (!is_null($value)) {
$this->writer->writeAttribute($prop, $value);
}
}
$settings = settings_manager::get_settings($step->id, settings_type::STEP);
foreach ($settings as $name => $value) {
$this->writer->startElement("setting");
$this->writer->writeAttribute('name', $name);
if (!is_null($value)) {
$this->writer->writeAttribute('value', $value);
}
$this->writer->endElement();
}
$this->writer->endElement();
......
......@@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die;
$plugin->maturity = MATURITY_BETA;
$plugin->version = 2022112400;
$plugin->version = 2023050200;
$plugin->component = 'tool_lifecycle';
$plugin->requires = 2020061500; // Requires Moodle 3.9+.
$plugin->release = 'v4.1-r1';
$plugin->release = 'v4.2-r1';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment