2006-03-10 02:01:06 +00:00
|
|
|
<?php
|
2013-10-03 11:22:50 +08:00
|
|
|
// This file is part of Moodle - http://moodle.org/
|
|
|
|
//
|
|
|
|
// Moodle is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Moodle is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Import IMS Enterprise file immediately.
|
|
|
|
*
|
|
|
|
* @package enrol_imsenterprise
|
|
|
|
* @copyright 2006 Dan Stowell
|
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
|
|
|
*/
|
2016-02-26 17:47:58 +11:00
|
|
|
require(__DIR__.'/../../config.php');
|
2010-07-19 04:31:47 +00:00
|
|
|
require_login(0, false);
|
2012-07-23 16:08:41 +08:00
|
|
|
require_capability('moodle/site:config', context_system::instance());
|
2014-01-28 15:35:42 +08:00
|
|
|
require_sesskey();
|
2006-03-10 02:01:06 +00:00
|
|
|
|
2009-11-01 09:21:41 +00:00
|
|
|
$site = get_site();
|
2006-03-10 02:01:06 +00:00
|
|
|
|
2013-10-03 11:22:50 +08:00
|
|
|
// Get language strings.
|
2012-07-23 16:08:41 +08:00
|
|
|
$PAGE->set_context(context_system::instance());
|
2006-03-10 02:01:06 +00:00
|
|
|
|
2010-01-16 15:39:56 +00:00
|
|
|
$PAGE->set_url('/enrol/imsenterprise/importnow.php');
|
2010-07-19 04:31:47 +00:00
|
|
|
$PAGE->set_title(get_string('importimsfile', 'enrol_imsenterprise'));
|
|
|
|
$PAGE->set_heading(get_string('importimsfile', 'enrol_imsenterprise'));
|
|
|
|
$PAGE->navbar->add(get_string('administrationsite'));
|
|
|
|
$PAGE->navbar->add(get_string('plugins', 'admin'));
|
|
|
|
$PAGE->navbar->add(get_string('enrolments', 'enrol'));
|
2013-10-03 11:22:50 +08:00
|
|
|
$PAGE->navbar->add(get_string('pluginname', 'enrol_imsenterprise'),
|
|
|
|
new moodle_url('/admin/settings.php', array('section' => 'enrolsettingsimsenterprise')));
|
2010-07-19 04:31:47 +00:00
|
|
|
$PAGE->navbar->add(get_string('importimsfile', 'enrol_imsenterprise'));
|
|
|
|
$PAGE->navigation->clear_cache();
|
|
|
|
|
2009-09-04 06:29:26 +00:00
|
|
|
echo $OUTPUT->header();
|
2006-03-10 02:01:06 +00:00
|
|
|
|
2010-07-19 04:31:47 +00:00
|
|
|
require_once('lib.php');
|
2006-03-10 02:01:06 +00:00
|
|
|
|
2010-07-19 04:31:47 +00:00
|
|
|
$enrol = new enrol_imsenterprise_plugin();
|
2006-03-10 02:01:06 +00:00
|
|
|
|
|
|
|
?>
|
2007-08-17 19:09:11 +00:00
|
|
|
<p>Launching the IMS Enterprise "cron" function. The import log will appear below (giving details of any
|
2006-03-10 02:01:06 +00:00
|
|
|
problems that might require attention).</p>
|
|
|
|
<pre style="margin:10px; padding: 2px; border: 1px solid black; background-color: white; color: black;"><?php
|
|
|
|
$enrol->cron();
|
|
|
|
?></pre><?php
|
2009-08-06 14:11:55 +00:00
|
|
|
echo $OUTPUT->footer();
|