Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on "Compentencies linked in the course activities" #1

Open
phildespres opened this issue Jun 1, 2022 · 2 comments
Open

Error on "Compentencies linked in the course activities" #1

phildespres opened this issue Jun 1, 2022 · 2 comments

Comments

@phildespres
Copy link

This is the output I get:

Debug info: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 6: ORDER BY cm.added ASC
^
SELECT DISTINCT(cm.id)
FROM mdl_course_modules cm
RIGHT JOIN mdl_competency_modulecomp cmcomp
ON cm.id = cmcomp.cmid
WHERE cm.visible = 1 AND cm.course = $1
ORDER BY cm.added ASC
[array (
0 => '7',
)]
Error code: dmlreadexception
Stack trace:

line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 920 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 625 of /admin/tool/cmcompetency/classes/api.php: call to pgsql_native_moodle_database->get_records_sql()
line 35 of /admin/tool/cmcompetency/userreport.php: call to tool_cmcompetency\api::get_list_course_modules_with_competencies()
@taboubi
Copy link
Contributor

taboubi commented Jun 1, 2022

I did not the test for postgresql. I will take the time to fix, or if you have time you can share a pathc.

@phildespres
Copy link
Author

Changing "ORDER BY cm.added ASC';" by "ORDER BY cm.id ASC';" at line 123 of classes/api.php did the trick. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants