Skip to content

Commit

Permalink
Advanced tha category setting to have either a specified level or the…
Browse files Browse the repository at this point in the history
… _closest_ level
  • Loading branch information
NinaHerrmann committed Jun 10, 2024
1 parent d47f4d5 commit 7d5329f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions lang/en/tool_lifecycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
$string['config_delay_duration_desc'] = 'This setting defines the default delay duration of a workflow
in case one of its processes is rolled back or finishes.
The delay duration determines how long a course will be excepted from being processed again in either of the cases.';
$string['config_enablecategoryhierachy'] = 'Enable to show a specified level of the course category hierarchy in the interaction table.';
$string['config_enablecategoryhierachy_desc'] = 'By default the directly assigned course category is shown when teachers manage the status of their courses on the view.php. The setting enables to show a specified level of the course category tree.';
$string['config_showcoursecounts'] = 'Show amount of courses which will be triggered';
$string['config_showcoursecounts_desc'] = 'The workflow overview page by default shows the amount of courses which will be
triggered by the configured triggers which can be load heavy. Disable this option if you experience issues loading the workflow
Expand Down
13 changes: 11 additions & 2 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,19 @@
get_string('config_showcoursecounts', 'tool_lifecycle'),
get_string('config_showcoursecounts_desc', 'tool_lifecycle'),
1));
$settings->add(new admin_setting_configtext('tool_lifecycle/coursecategorydepth',
$settingenablehierachy = new admin_setting_configcheckbox('tool_lifecycle/enablecategoryhierachy',
get_string('config_enablecategoryhierachy', 'tool_lifecycle'),
get_string('config_enablecategoryhierachy_desc', 'tool_lifecycle'),
false);
// $settingenablehierachy->set_updatedcallback('tool_lifecycle_');
$settings->add($settingenablehierachy);
$coursehierachysetting = new admin_setting_configtext('tool_lifecycle/coursecategorydepth',
get_string('config_coursecategorydepth', 'tool_lifecycle'),
get_string('config_coursecategorydepth_desc', 'tool_lifecycle'),
1, PARAM_INT));
0, PARAM_INT);
$coursehierachysetting->add_dependent_on('tool_lifecycle/enablecategoryhierachy');
$settings->add($coursehierachysetting);
$settings->hide_if('tool_lifecycle/coursecategorydepth', 'tool_lifecycle/enablecategoryhierachy', 'notchecked');

$ADMIN->add('lifecycle_category', new admin_externalpage('tool_lifecycle_workflow_drafts',
get_string('workflow_drafts_header', 'tool_lifecycle'),
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die;

$plugin->maturity = MATURITY_BETA;
$plugin->version = 2024042301;
$plugin->version = 2024042302;
$plugin->component = 'tool_lifecycle';
$plugin->requires = 2022112800; // Requires Moodle 4.1+.
$plugin->release = 'v4.4-r1';

0 comments on commit 7d5329f

Please sign in to comment.