Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 161... Línea 161...
161
            $ADMIN->add($parentnodename, $settings);
161
            $ADMIN->add($parentnodename, $settings);
162
        }
162
        }
163
    }
163
    }
Línea 164... Línea 164...
164
 
164
 
165
    /**
165
    /**
166
     * Allow all activity modules but Forum to be uninstalled.
-
 
167
     *
-
 
168
     * This exception for the Forum has been hard-coded in Moodle since ages,
-
 
169
     * we may want to re-think it one day.
166
     * Activity modules that declare feature flag FEATURE_CAN_UNINSTALL as false cannot be uninstalled.
170
     */
167
     */
171
    public function is_uninstall_allowed() {
168
    public function is_uninstall_allowed() {
172
        if ($this->name === 'forum') {
-
 
173
            return false;
-
 
174
        } else {
-
 
175
            return true;
-
 
176
        }
169
        return plugin_supports('mod', $this->name, FEATURE_CAN_UNINSTALL, true);
Línea 177... Línea 170...
177
    }
170
    }
178
 
171
 
179
    /**
172
    /**