center-for-learning-management / moodle-local_edusupport

Plugin to manage a moodle based helpdesk
GNU General Public License v3.0
4 stars 3 forks source link

Moodle 3.9 - Report Problem broken #7

Closed lassnj closed 4 years ago

lassnj commented 4 years ago

When trying to Report a Problem, Upper Right Corner, Help Icon, the following error occurs:

Tried with account of Susanne in School Overview: https://t1.eduvidual.org/local/eduvidual/pages/myorgs.php

Objects are are not allowed: stdClass

Error code: codingerror
* line 875 of /lib/dml/moodle_database.php: coding_exception thrown
* line 894 of /lib/dml/moodle_database.php: call to moodle_database->detect_objects()
* line 1206 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->fix_sql_params()
* line 1955 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_recordset_sql()
* line 1940 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_sql()
* line 1924 of /lib/dml/moodle_database.php: call to moodle_database->record_exists_select()
* line 431 of /lib/grouplib.php: call to moodle_database->record_exists()
* line 3765 of /mod/forum/lib.php: call to groups_is_member()
* line 244 of /local/edusupport/classes/lib.php: call to forum_user_can_post_discussion()
* line 294 of /local/edusupport/classes/lib.php: call to local_edusupport\lib::get_groups_for_user()
* line 68 of /local/edusupport/classes/issue_create_form.php: call to local_edusupport\lib::get_potentialtargets()
* line 214 of /lib/formslib.php: call to issue_create_form->definition()
* line 323 of /local/edusupport/externallib.php: call to moodleform->__construct()
* line 255 of /lib/externallib.php: call to local_edusupport_external::create_form()
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
rschrenk commented 4 years ago

according to the documentation the function forum_user_can_post_discussion takes a group object as second parameter, but in fact it requires the groupid... fixed in 209378ed0e581064f4dc43ffde50e82527cce880