a4763136 |
1 | <?php |
2 | require_once(dirname(dirname(__FILE__)) . '/config.php'); |
3 | |
4 | if (empty($CFG->enableportfolios)) { |
5 | print_error('disabled', 'portfolio'); |
6 | } |
6e6cf8a3 |
7 | require_once($CFG->libdir . '/portfoliolib.php'); |
8 | |
9 | $dataid = 0; |
10 | $currentinfo = null; |
11 | if (!$dataid = optional_param('id', '', PARAM_INT) ) { |
12 | if (isset($SESSION->portfolioexport)) { |
13 | $dataid = $SESSION->portfolioexport; |
14 | } |
15 | } |
16 | |
17 | $table = new StdClass; |
18 | $table->head = array( |
19 | get_string('displayarea', 'portfolio'), |
1369d8e1 |
20 | get_string('destination', 'portfolio'), |
6e6cf8a3 |
21 | get_string('displayinfo', 'portfolio'), |
22 | ); |
23 | $table->data = array(); |
24 | if ($dataid) { |
25 | try { |
26 | $exporter = portfolio_exporter::rewaken_object($dataid); |
27 | $exporter->verify_rewaken(); |
28 | $table->data[] = array( |
29 | $exporter->get('caller')->display_name(), |
612a14c5 |
30 | ($exporter->get('instance') ? $exporter->get('instance')->get('name') : get_string('notyetselected', 'portfolio')), |
6e6cf8a3 |
31 | $exporter->get('caller')->heading_summary(), |
32 | ); |
33 | } catch (portfolio_exception $e) { } |
34 | } |
a4763136 |
35 | |
36 | $strheading = get_string('activeexport', 'portfolio'); |
37 | print_header($strheading, $strheading); |
38 | |
39 | notice_yesno(get_string('alreadyexporting', 'portfolio'), $CFG->wwwroot . '/portfolio/add.php', $CFG->wwwroot . '/portfolio/add.php?cancel=1'); |
40 | |
6e6cf8a3 |
41 | if (count($table->data) > 0) { |
42 | print_table($table); |
43 | } |
44 | |
a4763136 |
45 | print_footer(); |
46 | |
47 | ?> |