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 reading from database when assign mentors #54

Open
phartphlang opened this Issue Apr 15, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@phartphlang

phartphlang commented Apr 15, 2018

i use moodle 3.3 , PostgreSQL 9.5 and install NED mentor manager plugin and create mentor-system and mentor-user rule , every thing ok, but after i add a mentor manager block on frontpage then click mentors (assign) it not work and "error reading from database when assign mentors"**

i installed new moodle instance with MySQL and install NED.. and set everything ... test assign mentor ..IT work OK

because my production site used PostgreSQL
any idea or anyone please help me to solve this issue

Thank you very much

Phartphlang

@phartphlang

This comment has been minimized.

phartphlang commented Apr 16, 2018

detail of error

Debug info: ERROR: column "u.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT u.id,
^
SELECT u.id,
u.firstname,
u.lastname,
u.email
FROM mdl_role_assignments ra
INNER JOIN mdl_user u
ON ra.userid = u.id

WHERE u.deleted = $1
AND u.suspended = $2
AND ra.roleid = $3

GROUP BY ra.userid
ORDER BY u.lastname ASC
[array (
0 => 0,
1 => 0,
2 => '5',
)]
Error code: dmlreadexception

×Stack trace:
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 242 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 778 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 81 of /blocks/fn_mentor/lib.php: call to pgsql_native_moodle_database->get_records_sql()
line 73 of /blocks/fn_mentor/assign.php: call to block_fn_mentor_get_all_students()

@aimeesheehan

This comment has been minimized.

aimeesheehan commented Sep 27, 2018

I'm having the same problem :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment