Reviewed: https://reviews.mahara.org/10252 Committed: https://git.mahara.org/mahara/mahara/commit/1d2bad4edf84c0c5b24c6196e2a7953f375a1a0f Submitter: Robert Lyon ([email protected]) Branch: master
commit 1d2bad4edf84c0c5b24c6196e2a7953f375a1a0f Author: Shalu Garg <[email protected]> Date: Wed Aug 7 17:23:19 2019 +0100 Bug 1839499: Site pages and collections, Site unavailable error after enabling lti plugin Fixing the issue of sql exception on pages & collections page after logging in as a non admin user on enabling lti_assessment plugin. This is caused by calling a select statement for lti_assessmentid column with aggregate function and group by condition, but missing group by condition for lti_assessmentid. Change-Id: I0a040018fadcf543452b24174964e929f286e552 -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1839499 Title: Site pages and collections : Site unavailable error after enabling lti plugin. Status in Mahara: New Status in Mahara 19.04 series: New Status in Mahara 19.10 series: New Bug description: Hi, I use Mahara 18.10.1 on ubunto 16.04.3, php 7.0.8, apache2 and Postgres 10.6. After enabling LTI plugin , and logging as a non-admin user , if we visit pages and collections page, it will through site unavailable error. Steps to reproduce * Visit the site. * Make sure we have enabled the LTI Plugin. * Login as a non-admin user. * Go to the Pages and collections page(Main menu->Create->Pages and Collections) * Site unavailable Error More precisely,On switching on the debug mode We are getting this error because of an Sql Exception after swtiching on the lTI plugin.It says group by is required while selecting a.id (lti as a )when using aggregate function. Here goes the git diff output: diff --git a/htdocs/lib/view.php b/htdocs/lib/view.php --- a/htdocs/lib/view.php +++ b/htdocs/lib/view.php @@ -4168,8 +4168,9 @@ class View { $collfrom .= $fromstr; if (!empty($groupby)) { - $groupby .= ', g.id, h.wwwroot'; - $collgroupby .= ', g.id, h.wwwroot'; + // CATALYST CUSTOM - adding groupby condition for lti_assessment id column. + $groupby .= ', g.id, h.wwwroot' . ($haslti ? ', a.id' : ''); + $collgroupby .= ', g.id, h.wwwroot' . ($haslti ? ', a.id' : ''); } $sort = ' ORDER BY ' . $order . ' vtitle, vid'; To correct this problem we need to add the LTI (a.id) in the group by condition(with a condition if LTI is enabled) To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1839499/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

