Merge branch 'MDL-28387-master' of git://github.com/ankitagarwal/moodle
[moodle.git] / enrol / imsenterprise / importnow.php
blobe9379bc22256da0e349c29b4c4112988b81cceae
1 <?php
2 require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
3 require_login(0, false);
4 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
6 $site = get_site();
8 /// get language strings
9 $PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
11 $PAGE->set_url('/enrol/imsenterprise/importnow.php');
12 $PAGE->set_title(get_string('importimsfile', 'enrol_imsenterprise'));
13 $PAGE->set_heading(get_string('importimsfile', 'enrol_imsenterprise'));
14 $PAGE->navbar->add(get_string('administrationsite'));
15 $PAGE->navbar->add(get_string('plugins', 'admin'));
16 $PAGE->navbar->add(get_string('enrolments', 'enrol'));
17 $PAGE->navbar->add(get_string('pluginname', 'enrol_imsenterprise'), new moodle_url('/admin/settings.php', array('section'=>'enrolsettingsimsenterprise')));
18 $PAGE->navbar->add(get_string('importimsfile', 'enrol_imsenterprise'));
19 $PAGE->navigation->clear_cache();
21 echo $OUTPUT->header();
23 require_once('lib.php');
25 //echo "Creating the IMS Enterprise enroller object\n";
26 $enrol = new enrol_imsenterprise_plugin();
29 <p>Launching the IMS Enterprise "cron" function. The import log will appear below (giving details of any
30 problems that might require attention).</p>
31 <pre style="margin:10px; padding: 2px; border: 1px solid black; background-color: white; color: black;"><?php
32 //error_reporting(E_ALL);
33 $enrol->cron();
34 ?></pre><?php
35 echo $OUTPUT->footer();
37 exit;