Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#166] Fix Unexpected Moodle Internal errors/warnings in CI #167

Merged
merged 1 commit into from
Jan 19, 2022
Merged
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
2 changes: 0 additions & 2 deletions classes/event_processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
use tool_trigger\helper\processor_helper;
use tool_trigger\task\process_workflows;

defined('MOODLE_INTERNAL') || die();

/**
* Process trigger system events.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/helper/datafield_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

namespace tool_trigger\helper;

defined('MOODLE_INTERNAL') || die;

/**
* A lookup step that takes a user's ID and adds standard data about the
* user.
Expand Down
2 changes: 0 additions & 2 deletions classes/helper/processor_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

namespace tool_trigger\helper;

defined('MOODLE_INTERNAL') || die();

trait processor_helper {

/**
Expand Down
2 changes: 0 additions & 2 deletions classes/json/json_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger\json;

defined('MOODLE_INTERNAL') || die();

/**
* Process trigger system events.
*
Expand Down
1 change: 0 additions & 1 deletion classes/learn_process.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/

namespace tool_trigger;
defined('MOODLE_INTERNAL') || die();
/**
* Process learnt events.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/output/manageworkflows/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger\output\manageworkflows;

defined('MOODLE_INTERNAL') || die;

/**
* Renderer class for manage rules page.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*/
namespace tool_trigger\privacy;

defined('MOODLE_INTERNAL') || die();

use core_privacy\local\metadata\collection;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\approved_contextlist;
Expand Down
4 changes: 2 additions & 2 deletions classes/steps/actions/assign_cohort_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
defined('MOODLE_INTERNAL') || die;
require_once($CFG->dirroot.'/cohort/lib.php');

class assign_cohort_action_step extends base_action_step
{
class assign_cohort_action_step extends base_action_step {


use \tool_trigger\helper\datafield_manager;

Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/base_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

use tool_trigger\steps\base\base_step;

defined('MOODLE_INTERNAL') || die;

/**
* Base action step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/email_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die;

/**
* email action step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/http_post_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die;

/**
* HTTP Post action step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/logdump_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die;

/**
* Action step that just does a var_dump to the logs.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/role_assign_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die;

class role_assign_action_step extends base_action_step {

use \tool_trigger\helper\datafield_manager;
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/role_unassign_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die;

class role_unassign_action_step extends base_action_step {

use \tool_trigger\helper\datafield_manager;
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/actions/roles_unassign_action_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger\steps\actions;

defined('MOODLE_INTERNAL') || die;

/**
* HTTP Post action step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/base/base_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger\steps\base;

defined('MOODLE_INTERNAL') || die;

/**
* Base step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/debounce/debounce_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
use xmldb_table;
use xmldb_field;

defined('MOODLE_INTERNAL') || die;

/**
* Debounce step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/filters/base_filter_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

use tool_trigger\steps\base\base_step;

defined('MOODLE_INTERNAL') || die;

/**
* Base filter step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/filters/fail_filter_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

namespace tool_trigger\steps\filters;

defined('MOODLE_INTERNAL') || die;

/**
* Fail filter step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/filters/numcompare_filter_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

namespace tool_trigger\steps\filters;

defined('MOODLE_INTERNAL') || die;

/**
* Base filter step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/filters/stringcompare_filter_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

namespace tool_trigger\steps\filters;

defined('MOODLE_INTERNAL') || die;

/**
* Base filter step class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/lookups/base_lookup_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

use tool_trigger\steps\base\base_step;

defined('MOODLE_INTERNAL') || die;

/**
* Base lookup step class.
*
Expand Down
5 changes: 2 additions & 3 deletions classes/steps/lookups/cohort_lookup_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

namespace tool_trigger\steps\lookups;

defined('MOODLE_INTERNAL') || die;
/**
* A lookup step that takes a user's ID and returns a string of
* all the cohorts that the user is currently assigned to
Expand All @@ -26,8 +25,8 @@
* @copyright Catalyst IT, 2018
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class cohort_lookup_step extends base_lookup_step
{
class cohort_lookup_step extends base_lookup_step {


use \tool_trigger\helper\datafield_manager;

Expand Down
2 changes: 0 additions & 2 deletions classes/steps/lookups/course_cat_lookup_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

namespace tool_trigger\steps\lookups;

defined('MOODLE_INTERNAL') || die;

/**
* A lookup step that takes a category ID and adds all data about the category.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/lookups/course_lookup_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

namespace tool_trigger\steps\lookups;

defined('MOODLE_INTERNAL') || die;

/**
* A lookup step that takes a course's ID and adds standard data about the
* course.
Expand Down
2 changes: 0 additions & 2 deletions classes/steps/lookups/roles_lookup_step.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

namespace tool_trigger\steps\lookups;

defined('MOODLE_INTERNAL') || die;

/**
* A lookup step that takes a user's ID and adds roles of the user.
*
Expand Down
1 change: 0 additions & 1 deletion classes/task/cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

namespace tool_trigger\task;

defined('MOODLE_INTERNAL') || die();
/**
* Task to cleanup old queue.
*/
Expand Down
1 change: 0 additions & 1 deletion classes/task/cleanup_history.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

namespace tool_trigger\task;

defined('MOODLE_INTERNAL') || die();
/**
* Task to cleanup old queue.
*/
Expand Down
1 change: 0 additions & 1 deletion classes/task/learn.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

namespace tool_trigger\task;

defined('MOODLE_INTERNAL') || die();
/**
* Task to learn from processed events.
*/
Expand Down
1 change: 0 additions & 1 deletion classes/task/process_workflows.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

use tool_trigger\helper\processor_helper;

defined('MOODLE_INTERNAL') || die();
/**
* Simple task to rocess queued workflows.
*/
Expand Down
2 changes: 0 additions & 2 deletions classes/task/update_trigger_helper_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

namespace tool_trigger\task;

defined('MOODLE_INTERNAL') || die();


/**
* Helper task to offload upgrade processing
Expand Down
2 changes: 0 additions & 2 deletions classes/workflow.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger;

defined('MOODLE_INTERNAL') || die();

/**
* Worklfow class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/workflow_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger;

defined('MOODLE_INTERNAL') || die();

/**
* Workflow manager class.
*
Expand Down
2 changes: 0 additions & 2 deletions classes/workflow_process.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

namespace tool_trigger;

defined('MOODLE_INTERNAL') || die();

/**
* Process workflow form.
*
Expand Down
2 changes: 0 additions & 2 deletions db/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die;

/**
* Add events fields from fixture file to database.
*/
Expand Down
2 changes: 0 additions & 2 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

/**
* Upgrade the plugin.
*
Expand Down
2 changes: 0 additions & 2 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
use tool_trigger\steps\base\base_form;
use tool_trigger\import_form;

defined('MOODLE_INTERNAL') || die;

/**
* Renders the top part of the "new workflow step" modal form. (The part with
* the "Step type" and "Step" menus.
Expand Down
2 changes: 0 additions & 2 deletions tests/privacy_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

defined('MOODLE_INTERNAL') || die();

use \tool_trigger\privacy\provider;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\approved_userlist;
Expand Down