Skip to content

Commit

Permalink
Bug #169215 fix: Reports > Reports having dynamic column shows differ…
Browse files Browse the repository at this point in the history
…ent data with / without loading params (#209)

* Bug #169215 fix: Single course report shows different data with / without loading params and also some language constants are missing after loading params in report.

* Bug #169215 fix: Single course report shows different data with / without loading params.

* Bug #169215 fix: Single course report shows different data with / without loading params.
  • Loading branch information
pranotiTechjoomla authored Mar 16, 2021
1 parent 19e358b commit eba708a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
- #169471 Reports > In report data not showing count with link, it's showing href string
- #169429 Reports > Frontend > Reports > Radio button and Export CSV alignment messed up
- #169428 Reports > Frontend > Reports > Language constant missing
- #169215 Reports > Reports having dynamic column shows different data with / without loading params
9 changes: 9 additions & 0 deletions tjreports/administrator/models/tjreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ public function getReportPluginData($pluginId, $pluginName = null)
* so false value column not display on report by default.*/
if (!empty($defaultColToHide))
{
// Here remove dynamic column(for example: lesson::lesson_status) from defaultColToHide because no need to load dynamic column.
foreach ($defaultColToHide as $key => $colHide)
{
if (strpos($key, '::') !== false)
{
unset($defaultColToHide[$key]);
}
}

$params['colToshow'] = array_merge($params['colToshow'], $defaultColToHide);
}

Expand Down

0 comments on commit eba708a

Please sign in to comment.