MDL-18167 towareds reimplementing of win installer support
[moodle.git] / portfolio / type / download / file.php
CommitLineData
abcd0fc5 1<?php
2
3require_once(dirname(dirname(dirname(dirname(__FILE__)))) . '/config.php');
214b1cf7 4require_once($CFG->libdir.'/portfoliolib.php');
ac324e05 5require_js(array('yui_yahoo', 'yui_dom'));
abcd0fc5 6$id = required_param('id', PARAM_INT);
7
8$exporter = portfolio_exporter::rewaken_object($id);
9$exporter->verify_rewaken();
10
11$exporter->print_header(get_string('downloading', 'portfolio_download'), false);
12$returnurl = $exporter->get('caller')->get_return_url();
13notify('<a href="' . $returnurl . '">' . get_string('returntowhereyouwere', 'portfolio') . '</a><br />');
14
15echo '<div id="redirect">
16 <form action="' . $exporter->get('instance')->get_base_file_url() . '" method="post" id="redirectform">
17 <input type="submit" value="' . get_string('downloadfile', 'portfolio_download') . '" />
18 </form>
19 <script language="javascript">
20 f = YAHOO.util.Dom.get("redirectform");
21 YAHOO.util.Dom.addClass(f.parentNode, "hide");
22 f.submit();
23 </script>';
24
25print_footer();
26
27?>