Skip to content

Commit

Permalink
Import class in view base, adapt behat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed Sep 5, 2024
1 parent 6045d1b commit 5b2f8dd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion classes/view/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use datalynx_entries;
use datalynx_filter;
use datalynxfield__rating;
use datalynxfield__status;
use datalynxview_entries_form;
use datalynxview_patterns;
use HTML_QuickForm;
Expand Down Expand Up @@ -1576,7 +1577,7 @@ public function process_entries_data() {
} else {
$this->_editentries = 0;
}
$this->_returntoentriesform = false;
$this->_returntoentriesform = true;
return $processed;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions tests/behat/customfilter_multiselect.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Feature: Create entry, add multiselect and use customfilter
| multiselect | Select (multiple) | | Opt1,Opt2,Opt3,Opt4,Opt5 | | |

And I add to "Datalynx Test Instance" datalynx the view of "Grid" type with:
| name | Gridview |
| description | Testgrid |
| name | description |
| Gridview | Testgrid |
And I follow "Set as default view"
And I follow "Set as edit view"

Expand Down
3 changes: 2 additions & 1 deletion tests/behat/update_entrieswithfiles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Feature: In a datalynx instance create, update, and delete entries
| number | Number | 3 | 2 | | |
| file | File | My file | | 2 | |
And I add to "Datalynx Test Instance" datalynx the view of "Tabular" type with:
| name | Tabular |
| name | description |
| Tabular | Tabular view |
And I follow "Set as default view"
And I follow "Set as edit view"
And I am on "Course 1" course homepage
Expand Down
1 change: 1 addition & 0 deletions view/tabular/view_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public function display(array $options = []): string {
global $PAGE;
$PAGE->requires->js_init_call('M.datalynxview_tabular.init', array(), false,
$this->get_js_module());
return '';
}

private function get_js_module() {
Expand Down

0 comments on commit 5b2f8dd

Please sign in to comment.