You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I got this error in db postgres during the scheduled task's run :
ERROR: column "mdl_logstore_standard_log.timecreated" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ... courseid, userid, contextinstanceid, timecreate...
I think it's enought add the field in the group by clause...
Here the complete log:
Execute scheduled task: Cron to store user logins in temporary table (local_kopere_dashboard\task\db_course_access)
... started 16:48:04. Current memory use 5.7 MB.
... used 2 dbqueries
... used 0.0085229873657227 seconds
Scheduled task failed: Cron to store user logins in temporary table (local_kopere_dashboard\task\db_course_access),Si è verificato un errore durante la lettura del database (ERROR: column "mdl_logstore_standard_log.timecreated" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ... courseid, userid, contextinstanceid, timecreate...
^
SELECT CONCAT(courseid,userid,contextinstanceid) AS a, COUNT(*) AS contagem,
courseid, userid, contextinstanceid, timecreated
FROM mdl_logstore_standard_log
WHERE action = 'viewed'
GROUP BY courseid, userid, contextinstanceid
ORDER BY timecreated DESC
[array (
)])
Debug info:
ERROR: column "mdl_logstore_standard_log.timecreated" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ... courseid, userid, contextinstanceid, timecreate...
^
SELECT CONCAT(courseid,userid,contextinstanceid) AS a, COUNT(*) AS contagem,
courseid, userid, contextinstanceid, timecreated
FROM mdl_logstore_standard_log
WHERE action = 'viewed'
GROUP BY courseid, userid, contextinstanceid
ORDER BY timecreated DESC
[array (
)]
Backtrace:
line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
line 358 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
line 1044 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 59 of /local/kopere_dashboard/classes/task/db_course_access.php: call to pgsql_native_moodle_database->get_records_sql()
line 410 of /lib/classes/cron.php: call to local_kopere_dashboard\task\db_course_access->execute()
line 208 of /lib/classes/cron.php: call to core\cron::run_inner_scheduled_task()
line 125 of /lib/classes/cron.php: call to core\cron::run_scheduled_tasks()
line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hi,
I got this error in db postgres during the scheduled task's run :
ERROR: column "mdl_logstore_standard_log.timecreated" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ... courseid, userid, contextinstanceid, timecreate...
I think it's enought add the field in the group by clause...
Here the complete log:
Execute scheduled task: Cron to store user logins in temporary table (local_kopere_dashboard\task\db_course_access)
... started 16:48:04. Current memory use 5.7 MB.
... used 2 dbqueries
... used 0.0085229873657227 seconds
Scheduled task failed: Cron to store user logins in temporary table (local_kopere_dashboard\task\db_course_access),Si è verificato un errore durante la lettura del database (ERROR: column "mdl_logstore_standard_log.timecreated" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ... courseid, userid, contextinstanceid, timecreate...
^
[array (
)])
Debug info:
ERROR: column "mdl_logstore_standard_log.timecreated" must appear in the GROUP BY clause or be used in an aggregate function
LINE 3: ... courseid, userid, contextinstanceid, timecreate...
^
[array (
)]
Backtrace:
Thanks in advance
The text was updated successfully, but these errors were encountered: