MDL-27156 repositories: altered a check as the !empty() test on $PAGE->course was...