Here's what I did. I backed up a Moodle 4 course with questions at the "system" level. I included users and question banks. Then, I restored this in Moodle 5 (Moodle 5.0 (Build: 20250414)). As expected, the system-level questions ended up in the course-level "System shared question bank" bank. Then, I went into a quiz that had randomly picked questions, and clicked on "Questions" on the upper (tabbed) navigation line. I got those warning messages, line 1311, just as above. However, I did not get the "Missing question category" (red) buttons. On this Moodle, I have debugging (DEVELOPER) turned on. If I turn developer debugging off, those "line 1311" warnings do not show.