Skip to content
Snippets Groups Projects
Commit 7923a9f8 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

PHPCS

parent 65b024e6
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,8 @@ class step_manager extends subplugin_manager { ...@@ -160,7 +160,8 @@ class step_manager extends subplugin_manager {
* @param int $workflowid id of the workflow * @param int $workflowid id of the workflow
* @return array of step instances. * @return array of step instances.
*/ */
public static function get_step_instances($workflowid) { //TODO: Alter calls to include workflow id. public static function get_step_instances($workflowid) {
// TODO: Alter calls to include workflow id.
global $DB; global $DB;
$records = $DB->get_records('tool_cleanupcourses_step', $records = $DB->get_records('tool_cleanupcourses_step',
array( array(
......
...@@ -250,7 +250,7 @@ class trigger_manager extends subplugin_manager { ...@@ -250,7 +250,7 @@ class trigger_manager extends subplugin_manager {
} }
if ($action === ACTION_WORKFLOW_TRIGGER) { if ($action === ACTION_WORKFLOW_TRIGGER) {
self::change_workflow($subplugin, optional_param('workflow', null, PARAM_INT)); self::change_workflow($subplugin, optional_param('workflow', null, PARAM_INT));
//TODO: Adjust the param to 'workflow' in the GUI // TODO: Adjust the param to 'workflow' in the GUI.
} }
} }
......
...@@ -44,11 +44,11 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) { ...@@ -44,11 +44,11 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) {
$dbman->create_table($table); $dbman->create_table($table);
} }
// Changing precision of field followedby on table tool_cleanupcourses_step to (10). // Changing structure of table tool_cleanupcourses_step.
$table = new xmldb_table('tool_cleanupcourses_step'); $table = new xmldb_table('tool_cleanupcourses_step');
$field = new xmldb_field('followedby'); $field = new xmldb_field('followedby');
// Conditionally drop followedby field // Conditionally drop followedby field.
if ($dbman->field_exists($table, $field)) { if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field); $dbman->drop_field($table, $field);
} }
...@@ -73,12 +73,12 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) { ...@@ -73,12 +73,12 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) {
$table = new xmldb_table('tool_cleanupcourses_trigger'); $table = new xmldb_table('tool_cleanupcourses_trigger');
$field = new xmldb_field('followedby'); $field = new xmldb_field('followedby');
// Conditionally drop followedby field // Conditionally drop followedby field.
if ($dbman->field_exists($table, $field)) { if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field); $dbman->drop_field($table, $field);
} }
// Add workflowfield to trigger // Add workflowfield to trigger.
$field = new xmldb_field('workflowid', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'enabled'); $field = new xmldb_field('workflowid', XMLDB_TYPE_INTEGER, '10', null, null, null, null, 'enabled');
$key = new xmldb_key('workflowid_fk', XMLDB_KEY_FOREIGN, array('workflowid'), 'tool_cleanupcourses_workflow', array('id')); $key = new xmldb_key('workflowid_fk', XMLDB_KEY_FOREIGN, array('workflowid'), 'tool_cleanupcourses_workflow', array('id'));
...@@ -92,7 +92,7 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) { ...@@ -92,7 +92,7 @@ function xmldb_tool_cleanupcourses_upgrade($oldversion) {
$table = new xmldb_table('tool_cleanupcourses_process'); $table = new xmldb_table('tool_cleanupcourses_process');
$field = new xmldb_field('stepid'); $field = new xmldb_field('stepid');
// Conditionally drop followedby field // Conditionally drop followedby field.
if ($dbman->field_exists($table, $field)) { if ($dbman->field_exists($table, $field)) {
$dbman->drop_field($table, $field); $dbman->drop_field($table, $field);
} }
......
...@@ -51,7 +51,7 @@ class tool_cleanupcourses_generator extends testing_module_generator { ...@@ -51,7 +51,7 @@ class tool_cleanupcourses_generator extends testing_module_generator {
* Creates an artificial workflow without steps. * Creates an artificial workflow without steps.
*/ */
public static function create_active_workflow() { public static function create_active_workflow() {
// Create Workflow // Create Workflow.
$record = new stdClass(); $record = new stdClass();
$record->id = null; $record->id = null;
$record->title = 'myworkflow'; $record->title = 'myworkflow';
...@@ -90,7 +90,7 @@ class tool_cleanupcourses_generator extends testing_module_generator { ...@@ -90,7 +90,7 @@ class tool_cleanupcourses_generator extends testing_module_generator {
* creates two instances of createbackup, which it is followed by. * creates two instances of createbackup, which it is followed by.
*/ */
public static function create_real_trigger_with_workflow() { public static function create_real_trigger_with_workflow() {
// Create Workflow // Create Workflow.
$record = new stdClass(); $record = new stdClass();
$record->id = null; $record->id = null;
$record->title = 'myworkflow'; $record->title = 'myworkflow';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment