Details
Description
To import content from one course to another requires two capabilities. The user must have "backuptargetimport" in the source course and "restoretargetimport" in the destination course. The capabililty "backuptargetimport" has a captype "write", which usually doesn't matter, but when the source course is in frozen context, all write capabilities are disallowed; therefore people cannot import from a frozen course, even when they have the capability to do so. I contest that people should be able to import from a read-only, frozen course into an active course and that creating a backup to import is not a write action where restoring the backup in an import is writing.
I'm not sure if there are wider implications of changing this capability to a "read" captype, but when I made this change (and flushed caches), importing worked as expected from a frozen course and the world didn't end.
In Dev chat, Marina suggested this was a bug, so I am reporting it here.
Replication steps...
- Turn on context freezing (Site admin > Developement > Experimental features)
- Create a category with a course in it (including some course content)
- Freeze the category (Site admin > Manage courses and categories > cog next to category)
- Go to a course outside the frozen category using a user who is a teacher in the frozen course and the regular course.
- Start an import
Expected result
- The frozen course appears in the list of import sources and allows content to be imported into the regular course.
Actual result
- The frozen course is not given as a source course.
Changing the captype of "backuptargetimport" to "read" allows the expected result.