Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Velosy committed Sep 25, 2024
1 parent 15131ea commit 578fec4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 38 deletions.
11 changes: 0 additions & 11 deletions classes/filter_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ public function check_access_for_dynamic_submission(): void {
}

public function set_data_for_dynamic_submission(): void {
// Since this runs after definition(), we are not using it, as the form's composition already depends on the data loaded.
global $DB;

$datalynx_id = $this->_ajaxformdata["d"];
$filter_id = $this->_ajaxformdata["fid"];

Expand All @@ -74,14 +71,6 @@ public function set_data_for_dynamic_submission(): void {
}

public function process_dynamic_submission() {

$datalynx_id = $this->_ajaxformdata["d"];
$filter_id = $this->_ajaxformdata["fid"];

if ($datalynx_id == null || $filter_id == null) {
return;
}

$this->_df = \mod_datalynx\datalynx::get_datalynx_by_instance($datalynx_id);
$fm = $this->_df->get_filter_manager();
$this->_filter = $fm->get_filter_from_id($filter_id);
Expand Down
1 change: 0 additions & 1 deletion datalynx.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// You should have received a copy of the GNU General Public License
// Along with Moodle. If not, see <http:// Www.gnu.org/licenses/>.


/**
* @package mod_datalynx
* @copyright 2013 onwards David Bogner, Michael Pollak, Ivan Sakic and others.
Expand Down
17 changes: 0 additions & 17 deletions field/field_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,15 +847,6 @@ public function is_datalynx_content() {
protected function filearea($suffix = null) {
return false;
}

// TODO: Git PR to move this to the base class.
public function get_argument_count(string $operator) {
if ($operator === "") { // "Empty" operator
return 0;
} else {
return 1;
}
}
}

/**
Expand Down Expand Up @@ -1036,14 +1027,6 @@ public function parse_search($formdata, $i) {
public static function is_customfilterfield() {
return true;
}

public function get_argument_count(string $operator) {
if ($operator === "") { // "Empty" operator
return 0;
} else {
return 1;
}
}
}

/**
Expand Down
8 changes: 0 additions & 8 deletions field/select/field_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,4 @@ public function get_search_value($value) {
return '';
}
}

public function get_argument_count(string $operator) {
if ($operator === "") { // "Empty" operator
return 0;
} else {
return 1;
}
}
}
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@

echo html_writer::empty_tag('br');
echo html_writer::tag('div', html_writer::table($table), array('class' => 'no-overflow'));
echo $OUTPUT->footer();
echo $OUTPUT->footer();

0 comments on commit 578fec4

Please sign in to comment.