When using upload courses and a course template, or when Importing from another course, or when Restoring a course into another course, the Restrict access - other course completion condition on sections is incomplete. It uploads as:
Not available unless: You have completed course {$a} (hidden otherwise)
It is supposed to be enabled, and it is supposed to be (hidden otherwise). But the course which should be completed does not "carry through." This is despite it being apparently properly referenced in the .mbz file of the backed-up course:
<availabilityjson>{"op":"&","c":[{"type":"othercompleted","cm":44959,"e":1}],"showc":[false]}</availabilityjson>
In this case, the course which is supposed to be trigger does have course id 44959.
Note that, if the condition is "Restrict access based on course completion", but visible, the same problem occurs.