2 require_once(dirname(dirname(__FILE__)) . '/config.php');
4 if (empty($CFG->enableportfolios)) {
5 print_error('disabled', 'portfolio');
7 require_once($CFG->libdir . '/portfoliolib.php');
11 if (!$dataid = optional_param('id', '', PARAM_INT) ) {
12 if (isset($SESSION->portfolioexport)) {
13 $dataid = $SESSION->portfolioexport;
17 $table = new StdClass;
19 get_string('displayarea', 'portfolio'),
20 get_string('plugin', 'portfolio'),
21 get_string('displayinfo', 'portfolio'),
23 $table->data = array();
26 $exporter = portfolio_exporter::rewaken_object($dataid);
27 $exporter->verify_rewaken();
28 $table->data[] = array(
29 $exporter->get('caller')->display_name(),
30 ($exporter->get('instance') ? $exporter->get('instance')->get('name') : get_string('notyetselected', 'portfolio')),
31 $exporter->get('caller')->heading_summary(),
33 } catch (portfolio_exception $e) { }
36 $strheading = get_string('activeexport', 'portfolio');
37 print_header($strheading, $strheading);
39 notice_yesno(get_string('alreadyexporting', 'portfolio'), $CFG->wwwroot . '/portfolio/add.php', $CFG->wwwroot . '/portfolio/add.php?cancel=1');
41 if (count($table->data) > 0) {