Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / enrol / imsenterprise / importnow.php
blobc16b8df95b2868b79f9295dd92c36130f39cddef
1 <?php
2 require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
3 require_login();
4 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
6 if (!$site = get_site()) {
7 redirect("index.php");
10 /// get language strings
11 $str = get_strings(array('enrolments', 'users', 'administration', 'settings'));
12 $navlinks = array();
13 $navlinks[] = array('name' => $str->administration, 'link' => "../../$CFG->admin/index.php", 'type' => 'misc');
14 $navlinks[] = array('name' => $str->enrolments, 'link' => null, 'type' => 'misc');
15 $navlinks[] = array('name' => 'IMS import', 'link' => null, 'type' => 'misc');
16 $navigation = build_navigation($navlinks);
18 print_header("$site->shortname: $str->enrolments", $site->fullname, $navigation);
20 require_once('enrol.php');
22 //echo "Creating the IMS Enterprise enroller object\n";
23 $enrol = new enrolment_plugin_imsenterprise();
26 <p>Launching the IMS Enterprise "cron" function. The import log will appear below (giving details of any
27 problems that might require attention).</p>
28 <pre style="margin:10px; padding: 2px; border: 1px solid black; background-color: white; color: black;"><?php
29 //error_reporting(E_ALL);
30 $enrol->cron();
31 ?></pre><?php
32 print_footer();
34 exit;