Open dmitriim opened 1 week ago
A list of constants here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/classes/condition_base.php#L31 is ugly and shouldn't really belong to base class.
On top of that those operator values can get mixed up if used for conflicting type of fields. E.g. date and text types operators. Like here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/classes/condition_base.php#L31 or here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/classes/local/tool_dynamic_cohorts/condition/fields_trait.php#L65
This can lead to bugs and unexpected results.
A list of constants here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/classes/condition_base.php#L31 is ugly and shouldn't really belong to base class.
On top of that those operator values can get mixed up if used for conflicting type of fields. E.g. date and text types operators. Like here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/classes/condition_base.php#L31 or here https://github.com/catalyst/moodle-tool_dynamic_cohorts/blob/MOODLE_404_STABLE/classes/local/tool_dynamic_cohorts/condition/fields_trait.php#L65
This can lead to bugs and unexpected results.