Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions step/setcustomfield/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# moodle-lifecyclestep_setcustomfield

This plugin adds a step to the admin lifecycle plugin that allows setting a custom course field.

43 changes: 43 additions & 0 deletions step/setcustomfield/classes/privacy/provider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace lifecyclestep_setcustomfield\privacy;

use core_privacy\local\metadata\null_provider;


/**
* Privacy provider for lifecyclestep_setcustomfield.
*
* @package lifecyclestep_setcustomfield
* @copyright 2025 Ostfalia
* @author Karin Borm
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements null_provider {

/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.

*
* @return string the reason
*/
public static function get_reason(): string {

return 'privacy:metadata';
}
}
40 changes: 40 additions & 0 deletions step/setcustomfield/lang/de/lifecyclestep_setcustomfield.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Lang Strings for Custom field Step
*
* @package lifecyclestep_setcustomfield
* @copyright 2025 Ostfalia
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['action'] = 'Setze Feld auf';
$string['action_help'] = 'Wie soll das Kursfeld gesetzt werden?';
$string['customfield'] = 'Kursfeld';
$string['customfield_help'] = 'Der Schritt verändert das Kursfeld.';
$string['error.invalidvalue'] = 'Der Wert ist ungültig';

$string['plugindescription'] = 'Es wird ein bestimmtes Kursfeld gesetzt.';
$string['pluginname'] = 'Nutzerdefiniertes Kursfeld setzen - Schritt';
$string['privacy:metadata'] = 'Speichert keine personenbezogenen Daten';

$string['setempty'] = 'leer';
$string['settimestamp'] = 'aktuellen Zeitstempel (jetzt)';
$string['setvalue'] = 'festen Wert';

$string['value'] = 'Wert';
$string['value_help'] = 'Wert, auf den gesetzt werden soll (nur falls "fester Wert" ausgewählt ist). Bei Auswahlfelder kann dies sowohl der Index als auch der Wert selbst sein.';
40 changes: 40 additions & 0 deletions step/setcustomfield/lang/en/lifecyclestep_setcustomfield.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Lang Strings for Custom field Step
*
* @package lifecyclestep_setcustomfield
* @copyright 2025 Ostfalia
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['action'] = 'Set field to';
$string['action_help'] = 'How shall the custom field be set?';
$string['customfield'] = 'Course customfield';
$string['customfield_help'] = 'The step updates the value of the course customfield.';
$string['error.invalidvalue'] = 'Invalid value';

$string['plugindescription'] = 'Sets a course custom field.';
$string['pluginname'] = 'Set course custom field step';
$string['privacy:metadata'] = 'Does not store any data';

$string['setempty'] = 'empty';
$string['settimestamp'] = 'current timestamp (now)';
$string['setvalue'] = 'specific value';

$string['value'] = 'Value';
$string['value_help'] = 'Value to be set (if action is \'specific value\'). For select fields this can be either index or text.';
Loading