Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 21... Línea 21...
21
 * @copyright  2013 Frédéric Massart
21
 * @copyright  2013 Frédéric Massart
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
23
 */
Línea 24... Línea 24...
24
 
24
 
25
defined('MOODLE_INTERNAL') || die();
-
 
26
require_once($CFG->dirroot . '/cache/lib.php');
25
defined('MOODLE_INTERNAL') || die();
27
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
26
require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
Línea 28... Línea 27...
28
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
27
require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
29
 
28
 
Línea 176... Línea 175...
176
     * The result is cached for faster execution.
175
     * The result is cached for faster execution.
177
     *
176
     *
178
     * @return enrol_plugin[]
177
     * @return enrol_plugin[]
179
     */
178
     */
180
    public static function get_enrolment_plugins() {
179
    public static function get_enrolment_plugins() {
181
        $cache = cache::make('tool_uploadcourse', 'helper');
-
 
182
        if (($enrol = $cache->get('enrol')) === false) {
-
 
183
            $enrol = enrol_get_plugins(false);
180
        return enrol_get_plugins(false);
184
            $cache->set('enrol', $enrol);
-
 
185
        }
-
 
186
        return $enrol;
-
 
187
    }
181
    }
Línea 188... Línea 182...
188
 
182
 
189
    /**
183
    /**
190
     * Get the restore content tempdir.
184
     * Get the restore content tempdir.
Línea 603... Línea 597...
603
        if ($id == -1) {
597
        if ($id == -1) {
604
            $id = false;
598
            $id = false;
605
        }
599
        }
606
        return $id;
600
        return $id;
607
    }
601
    }
608
}
-
 
609
602
}
-
 
603