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
1 change: 1 addition & 0 deletions db/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<FIELD NAME="triggeredperday" TYPE="int" LENGTH="5" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="andor" TYPE="int" LENGTH="1" NOTNULL="false" DEFAULT="0" SEQUENCE="false"/>
<FIELD NAME="description" TYPE="char" LENGTH="500" NOTNULL="false" SEQUENCE="false"/>
<FIELD NAME="forum_discussion" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
Expand Down
29 changes: 14 additions & 15 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,21 +664,6 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2026012001, 'tool', 'lifecycle');
}

if ($oldversion < 2026012002) {

// Define field forum_discussion to be added to tool_lifecycle_workflow.
$table = new xmldb_table('tool_lifecycle_workflow');
$field = new xmldb_field('forum_discussion', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'description');

// Conditionally launch add field forum_discussion.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}

// Lifecycle savepoint reached.
upgrade_plugin_savepoint(true, 2026012002, 'tool', 'lifecycle');
}

if ($oldversion < 2026012003) {

$sql = "SELECT s.instanceid
Expand Down Expand Up @@ -743,5 +728,19 @@ function xmldb_tool_lifecycle_upgrade($oldversion) {
upgrade_plugin_savepoint(true, 2026060101, 'tool', 'lifecycle');
}

if ($oldversion < 2026082501) {
// Define field forum_discussion to be added to tool_lifecycle_workflow.
$table = new xmldb_table('tool_lifecycle_workflow');
$field = new xmldb_field('forum_discussion', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'description');

// Conditionally launch add field forum_discussion.
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);
}

// Lifecycle savepoint reached.
upgrade_plugin_savepoint(true, 2026082501, 'tool', 'lifecycle');
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

$plugin->component = 'tool_lifecycle';
$plugin->maturity = MATURITY_STABLE;
$plugin->version = 2026060101;
$plugin->version = 2026082501;
$plugin->requires = 2024100700; // Requires Moodle 5.0+.
$plugin->supported = [500, 502];
$plugin->release = 'v5.2-r2';
Loading