}
if (!property_exists($user, $column) or !property_exists($existinguser, $column)) {
// this should never happen
+ debugging("Could not find $column on the user objects", DEBUG_DEVELOPER);
continue;
}
if ($updatetype == UU_UPDATE_MISSING) {
if (!$minstance) {
// This should never happen unless adding of default instance fails unexpectedly.
+ debugging('Failed to find manual enrolment instance', DEBUG_DEVELOPER);
continue;
}
$scale = $outcome->load_scale();
if (empty($scale->id)) { // hopefully never happens
$line[] = $scale->get_name();
+ debugging("Found a scale with no ID ({$scale->get_name()}) while outputting course outcomes", DEBUG_DEVELOPER);
} else {
if (empty($scale->courseid)) {
$caneditthisscale = $caneditsystemscales;
$scale = $outcome->load_scale();
if (empty($scale->id)) { // hopefully never happens
$line[] = $scale->get_name();
+ debugging("Found a scale with no ID ({$scale->get_name()}) while outputting global outcomes", DEBUG_DEVELOPER);
} else {
if (empty($scale->courseid)) {
$caneditthisscale = $caneditsystemscales;
if (!isset($USER->id)) {
// should never happen
$USER->id = 0;
+ debugging('Capability check being performed on a user with no ID.', DEBUG_DEVELOPER);
}
// make sure there is a real user specified
if (!isset($USER->id)) {
// should never happen
$USER->id = 0;
+ debugging('Course access check being performed on a user with no ID.', DEBUG_DEVELOPER);
}
// make sure there is a user specified
static $mainadmin = null;
static $prevadmins = null;
- if (empty($CFG->siteadmins)) { // Should not happen on an ordinary site.
+ if (empty($CFG->siteadmins)) {
+ // Should not happen on an ordinary site.
+ // It does however happen during unit tests.
return false;
}