Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 218... Línea 218...
218
                throw new \coding_exception('Invalid availability structure (child not object)');
218
                throw new \coding_exception('Invalid availability structure (child not object)');
219
            }
219
            }
Línea 220... Línea 220...
220
 
220
 
221
            // First see if it's a condition. These have a defined type.
221
            // First see if it's a condition. These have a defined type.
222
            if (isset($child->type)) {
222
            if (isset($child->type)) {
223
                // Look for a plugin of this type.
223
                /** @var \core_availability\condition $classname */
224
                $classname = '\availability_' . $child->type . '\condition';
224
                $classname = '\availability_' . $child->type . '\condition';
225
                if (!array_key_exists($child->type, $enabled)) {
225
                if (!array_key_exists($child->type, $enabled) || !class_exists($classname)) {
226
                    if ($lax) {
226
                    if ($lax) {
227
                        // On load of existing settings, ignore if class
227
                        // On load of existing settings, ignore if class
228
                        // doesn't exist.
228
                        // doesn't exist.
229
                        continue;
229
                        continue;