Skip to content

Commit

Permalink
Fix views index bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed Jan 25, 2024
1 parent 42b9cfb commit f35f9ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions classes/datalynx.php
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ public function get_views_by_type($type, $forceget = false) {
* @return array of view objects indexed by view id or false if no views are found
*/
public function get_views(array $exclude = [], bool $forceget = false, string $sort = '') {
if (!empty($this->get_view_records($forceget, $sort))) {
if (empty($this->get_view_records($forceget, $sort))) {
return false;
}

Expand Down Expand Up @@ -1691,7 +1691,7 @@ public function process_views($action, $vids, $confirmed = false) {

if ($vids) { // Some views are specified for action.
$views = array();
$viewobjs = $this->get_views(false, true);
$viewobjs = $this->get_views([], true);
foreach (explode(',', $vids) as $vid) {
if (!empty($viewobjs[$vid])) {
$views[$vid] = $viewobjs[$vid];
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_datalynx';
$plugin->version = 2024012501;
$plugin->version = 2024012502;
$plugin->release = 'v3.3-DataIntelligence'; // Data words like data science, data mining.
$plugin->requires = 2022112800;
$plugin->maturity = MATURITY_STABLE;
Expand Down
2 changes: 1 addition & 1 deletion view/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@

// Any notifications?
$dl->notifications['bad']['defaultview'] = '';
$views = $dl->get_views(null, true,
$views = $dl->get_views([], true,
flexible_table::get_sort_for_table('datalynxviewsindex' . $dl->id()));
if (!$views) {
$dl->notifications['bad']['getstartedviews'] = get_string('viewnoneindatalynx', 'datalynx'); // Nothing.
Expand Down

0 comments on commit f35f9ae

Please sign in to comment.