X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=portfolio%2Falready.php;h=05fc4da43fe9ba84141fcaef9c32de9fd053e7d1;hp=4bbf4c4bd4b64fec5c364e633a6f8315d5c8e18c;hb=5c1fb7d4d16684487dd9231500c6c281b6cfd0e1;hpb=a4763136395853dbcdb113a98a29f0bb2e001951;ds=inline diff --git a/portfolio/already.php b/portfolio/already.php index 4bbf4c4bd4b..05fc4da43fe 100644 --- a/portfolio/already.php +++ b/portfolio/already.php @@ -4,12 +4,44 @@ require_once(dirname(dirname(__FILE__)) . '/config.php'); if (empty($CFG->enableportfolios)) { print_error('disabled', 'portfolio'); } +require_once($CFG->libdir . '/portfoliolib.php'); + +$dataid = 0; +$currentinfo = null; +if (!$dataid = optional_param('id', '', PARAM_INT) ) { + if (isset($SESSION->portfolioexport)) { + $dataid = $SESSION->portfolioexport; + } +} + +$table = new StdClass; +$table->head = array( + get_string('displayarea', 'portfolio'), + get_string('destination', 'portfolio'), + get_string('displayinfo', 'portfolio'), +); +$table->data = array(); +if ($dataid) { + try { + $exporter = portfolio_exporter::rewaken_object($dataid); + $exporter->verify_rewaken(); + $table->data[] = array( + $exporter->get('caller')->display_name(), + ($exporter->get('instance') ? $exporter->get('instance')->get('name') : get_string('notyetselected', 'portfolio')), + $exporter->get('caller')->heading_summary(), + ); + } catch (portfolio_exception $e) { } +} $strheading = get_string('activeexport', 'portfolio'); print_header($strheading, $strheading); notice_yesno(get_string('alreadyexporting', 'portfolio'), $CFG->wwwroot . '/portfolio/add.php', $CFG->wwwroot . '/portfolio/add.php?cancel=1'); +if (count($table->data) > 0) { + print_table($table); +} + print_footer(); ?>