assignment error 3.4

assignment error 3.4

by Leif Soderlund -
Number of replies: 3

I clicked as a admin on the assignment and got this error_log text at the server.

//
[02-Dec-2017 13:18:38 Europe/Stockholm] Default exception handler: Fel vid läsning av databas Debug: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
                                        AND userid NOT IN (
                  ' at line 6
SELECT u.id
              FROM mdl_user u
            LEFT OUTER JOIN mdl_user_lastaccess ul ON (ul.userid = u.id AND ul.courseid = 334)
JOIN (SELECT DISTINCT userid FROM ( SELECT userid
                                   FROM mdl_role_assignments
                                  WHERE contextid IN (1,42624,53,42621,42617,43009) AND roleid IN ()
                                        AND userid NOT IN (
                                            SELECT userid
                                              FROM mdl_role_assignments
                                             WHERE contextid IN (1,42624,53,42621,42617,43009)
                                                    AND roleid IN ()
                                                        ) ) us) ra ON ra.userid = u.id
            WHERE u.deleted = 0 AND u.id <> ?
          ORDER BY ul.timeaccess
[array (
  0 => '1',
)]
Error code: dmlreadexception
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1216 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 3490 of /lib/accesslib.php: call to mysqli_native_moodle_database->get_records_sql()
* line 73 of /availability/classes/capability_checker.php: call to get_users_by_capability()
* line 647 of /availability/classes/info.php: call to core_availability\capability_checker->get_users_by_capability()
* line 106 of /availability/classes/info_module.php: call to core_availability\info->filter_user_list()
* line 2021 of /mod/assign/locallib.php: call to core_availability\info_module->filter_user_list()
* line 2128 of /mod/assign/locallib.php: call to assign->list_participants()
* line 5329 of /mod/assign/locallib.php: call to assign->count_participants()
* line 5384 of /mod/assign/locallib.php: call to assign->get_assign_grading_summary_renderable()
* line 615 of /mod/assign/locallib.php: call to assign->view_submission_page()
* line 55 of /mod/assign/view.php: call to assign->view()
//
And I got this as a php error on moodle:

Notice: Undefined offset: 0 in /home/sih98c2/public_html/iterum-YH/lib/accesslib.php on line 3456

Warning: array_keys() expects parameter 1 to be array, null given in /home/sih98c2/public_html/iterum-YH/lib/accesslib.php on line 3456

Warning: implode(): Invalid arguments passed in /home/sih98c2/public_html/iterum-YH/lib/accesslib.php on line 3456

Notice: Undefined offset: 0 in /home/sih98c2/public_html/iterum-YH/lib/accesslib.php on line 3461

Warning: array_keys() expects parameter 1 to be array, null given in /home/sih98c2/public_html/iterum-YH/lib/accesslib.php on line 3461

Warning: implode(): Invalid arguments passed in /home/sih98c2/public_html/iterum-YH/lib/accesslib.php on line 3461

Error reading database
ANY Ideas!?


Average of ratings: -
In reply to Leif Soderlund

Re: assignment error 3.4

by Leif Soderlund -

Hehe

Solved. I upgraded to moodle 3.4 and run a sql collatation script to the tables but did´nt note the importance och involve the table columns. That caused a lot of strange problems.

Average of ratings: Useful (1)
In reply to Leif Soderlund

Re: assignment error 3.4 [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Glad to hear that the problem is solved. Thanks for posting.

In reply to Helen Foster

Re: assignment error 3.4 [Solved]

by Leif Soderlund -

Hello again

The problem appeared again after a short moment. User overrides did´nt work - not either assignments for the teacher but the students.

I was shouting yes to early - It was more likely to be the same problem as Sergio had.

https://tracker.moodle.org/browse/MDL-60987

We reverted the php-version from 7.1 to 7.0 and suudenly it disappeared!

smile