Description of the problem
For certain users at our site, the list of courses to import content from (settings -> import) is empty even though these users are editing teachers in a large number of courses. Furthermore, there is no way to search for specific courses once the error message is shown (contrary to the situation where a user has more than 10 potential courses to import from).
Likely explaination
According to our current understanding of moodle/backup/util/ui/restore_ui_components.php, the list of potential source courses is generated along the lines of
- query (essentially) for all courses, limit the number of courses to (an arbitrary?) number of 250 results by means of $limitfrom/$limitnum parameters to the get_recordset_sql function @ line 167
- iterate over all results in the recordset
- determine whether the user has the proper capabilities (in our case this seems to be moodle/restore:restorecourse)
- If courses where found in that way, display a list of said courses plus a search field to find additional courses outside the scope of this test
- If no courses where found, display an error message (cf. attached screenshot)
Our installation is rather large with approximately 600 (editing)teachers and currently about 11000 courses (most of them invisible, but still). Therefore, it is likely that a teacher ends up with an empty list after the first 250 results of the query have been processed. Since the generated dialog offers no means to narrow the search by hand, the user is essentially stuck at this point.
- duplicates
-
MDL-26037 Import search list only checks first 250 courses to list
-
- Closed
-