Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.2.4, 2.5.1
-
Component/s: Backup
-
Testing Instructions:
-
Workaround:
-
Affected Branches:MOODLE_22_STABLE, MOODLE_25_STABLE
-
Fixed Branches:MOODLE_27_STABLE, MOODLE_28_STABLE
-
Pull from Repository:
-
Pull Master Branch:
MDL-35494_master -
Pull Master Diff URL:
-
Sprint:BACKEND Sprint 18
Description
If the user/instructor has only one course, s/he cannot pick the course after uploading an activity file. The user got an error message instead:
"There are no categories or existing courses you can restore to."
Looking at /backup/util/ui/renderer.php, line 256 calls $courses->get_count(), which doesn't include current course, thus returning 0. $courses->set_include_currentcourse() is only called if the code can get pass the get_count() condition. Thus, for a user with only 1 course, this is a deadlock.
Given the fact that the user can proceed normally if s/he has restore capability in more than 1 courses, I assume this is a bug.
Moodle 2.2.4+ (Build: 20120831)